text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">I have a query to join 2 tables ( t_order, t_order_item).<br> <strong>sql:</strong><br> SELECT<br> i.goods_pic,<br> o.order_id,<br> o.create_time,<br> i.store_id AS shop_id,<br> i.store_name AS shop_name,<br> o.total_amount,<br> o.receiver_detail_address AS receiver_address,<br> o.freight_amount,<br> o.<code class="notranslate">status</code>,<br> i.goods_id,<br> i.goods_name,<br> i.goods_price,<br> i.goods_brand,<br> i.create_time<br> FROM<br> t_order AS o,<br> t_order_item AS i<br> WHERE<br> o.order_id = i.order_id<br> AND o.user_id = '322';</p> <p dir="auto">I found that very strange. That sql run in sharding-proxy is good, but not in sharding-jdbc.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6037435/92714444-cf79e800-f38e-11ea-8b86-df968702a3ea.png"><img src="https://user-images.githubusercontent.com/6037435/92714444-cf79e800-f38e-11ea-8b86-df968702a3ea.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>ENV:</strong><br> mybatis: 3.5.0<br> sharding-jdbc: 4.1.1<br> spring-cloud:<br> <strong>Log:</strong></p> <h3 dir="auto">Error querying database. Cause: groovy.lang.MissingMethodException: No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2]</h3> <p dir="auto">Possible solutions: drop(int), any(), find(), find(groovy.lang.Closure), find(java.util.regex.Pattern), is(java.lang.Object)</p> <h3 dir="auto">The error may exist in file [E:\workspace\my project\mall\mall\mall\order-service\target\classes\mapper\OrderMapper.xml]</h3> <h3 dir="auto">The error may involve com.codebattery.repository.OrderMapper.getMemberOrders-Inline</h3> <h3 dir="auto">The error occurred while setting parameters</h3> <h3 dir="auto">SQL: SELECT i.goods_pic, o.order_id, o.create_time, i.store_id AS shop_id, i.store_name AS shop_name, o.total_amount, o.receiver_detail_address AS receiver_address, o.freight_amount, o.<code class="notranslate">status</code>, i.goods_id, i.goods_name, i.goods_price, i.goods_brand, i.create_time FROM t_order AS o, t_order_item AS i WHERE o.order_id = i.order_id and o.user_id = ?</h3> <h3 dir="auto">Cause: groovy.lang.MissingMethodException: No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2]</h3> <p dir="auto">Possible solutions: drop(int), any(), find(), find(groovy.lang.Closure), find(java.util.regex.Pattern), is(java.lang.Object)] with root cause</p> <p dir="auto">groovy.lang.MissingMethodException: No signature of method: java.lang.String.mod() is applicable for argument types: (java.lang.Integer) values: [2]<br> Possible solutions: drop(int), any(), find(), find(groovy.lang.Closure), find(java.util.regex.Pattern), is(java.lang.Object)<br> at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at Script3$_run_closure1.doCall(Script3.groovy:1) ~[na:na]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]<br> at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at groovy.lang.Closure.call(Closure.java:426) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at groovy.lang.Closure.call(Closure.java:420) ~[groovy-2.4.5-indy.jar:2.4.5]<br> at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.execute(InlineShardingStrategy.java:94) ~[sharding-core-common-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:76) ~[sharding-core-common-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:63) ~[sharding-core-common-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeDataSources(ShardingStandardRoutingEngine.java:204) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route0(ShardingStandardRoutingEngine.java:192) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(ShardingStandardRoutingEngine.java:121) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditions(ShardingStandardRoutingEngine.java:115) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.getDataNodes(ShardingStandardRoutingEngine.java:96) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:74) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.type.complex.ShardingComplexRoutingEngine.route(ShardingComplexRoutingEngine.java:59) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:69) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.sharding.route.engine.ShardingRouteDecorator.decorate(ShardingRouteDecorator.java:53) ~[sharding-core-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:91) ~[shardingsphere-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76) ~[shardingsphere-route-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83) ~[shardingsphere-pluggable-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:143) ~[sharding-jdbc-core-4.1.1.jar:4.1.1]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]<br> at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.0.jar:3.5.0]<br> at com.sun.proxy.$Proxy188.execute(Unknown Source) ~[na:na]<br> at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.0.jar:3.5.0]<br> at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:108) ~[pagehelper-5.1.8.jar:na]<br> at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.5.0.jar:3.5.0]<br> at com.sun.proxy.$Proxy186.query(Unknown Source) ~[na:na]<br> at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.5.0.jar:3.5.0]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]<br> at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.0.jar:2.0.0]<br> at com.sun.proxy.$Proxy137.selectList(Unknown Source) ~[na:na]<br> at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) ~[mybatis-spring-2.0.0.jar:2.0.0]<br> at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:144) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:77) ~[mybatis-3.5.0.jar:3.5.0]<br> at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.0.jar:3.5.0]<br> at com.sun.proxy.$Proxy138.getMemberOrders(Unknown Source) ~[na:na]<br> at com.codebattery.service.OrderService.getMemberOrders(OrderService.java:203) ~[classes/:na]<br> at com.codebattery.service.OrderService$$FastClassBySpringCGLIB$$49ca46bb.invoke() ~[classes/:na]<br> at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750) ~[spring-aop-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at io.seata.spring.annotation.GlobalTransactionalInterceptor.invoke(GlobalTransactionalInterceptor.java:128) ~[seata-all-1.3.0.jar:1.3.0]<br> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689) ~[spring-aop-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at com.codebattery.service.OrderService$$EnhancerBySpringCGLIB$$3990292e.getMemberOrders() ~[classes/:na]<br> at com.codebattery.controller.OrderController.getMemberOrders(OrderController.java:55) ~[classes/:na]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]<br> at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:893) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:798) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88) ~[spring-boot-actuator-2.1.10.RELEASE.jar:2.1.10.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114) ~[spring-boot-actuator-2.1.10.RELEASE.jar:2.1.10.RELEASE]<br> at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104) ~[spring-boot-actuator-2.1.10.RELEASE.jar:2.1.10.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.11.RELEASE.jar:5.1.11.RELEASE]<br> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]<br> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]<br> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.27.jar:9.0.27]<br> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]</p> <p dir="auto"><strong>Files:</strong><br> ddl:<br> <a href="https://github.com/apache/shardingsphere/files/5200689/2.table.ddl.zip">2 table ddl.zip</a></p> <p dir="auto">sharding-rule:</p> <p dir="auto"><a href="https://github.com/apache/shardingsphere/files/5200713/ShardingDataSourceConfig.txt">ShardingDataSourceConfig.txt</a></p> <p dir="auto"><strong>help, please</strong></p>
<p dir="auto">sql like that insert into table(id, name) values (1, ?)on duplicate key update name = ?<br> when parameter after on duplicate key update that has some bug</p>
0
<p dir="auto">Please go to Stack Overflow for help and support:</p> <p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p> <p dir="auto">If you open a GitHub issue, here is our policy:</p> <ol dir="auto"> <li>It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).</li> <li>The form below must be filled out.</li> <li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li> </ol> <p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p> <hr> <h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Microsoft Windows [Version 6.1.7601]</li> <li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>:</li> <li><strong>TensorFlow installed from (source or binary)</strong>: pip command</li> <li><strong>TensorFlow version (use command below)</strong>:</li> <li><strong>Python version</strong>: Python 3.6.4</li> <li><strong>Bazel version (if compiling from source)</strong>:</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>:</li> <li><strong>CUDA/cuDNN version</strong>:</li> <li><strong>GPU model and memory</strong>:</li> <li><strong>Exact command to reproduce</strong>:</li> </ul> <p dir="auto">You can collect some of this information using our environment capture script:</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p> <p dir="auto">You can obtain the TensorFlow version with</p> <p dir="auto">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</p> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p> <p dir="auto">I have researched most of the issue but it seems none of them resolves mine.</p> <h3 dir="auto">Source code / logs</h3> <p dir="auto">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. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.</p> <p dir="auto">Microsoft Windows [Version 6.1.7601]<br> Copyright (c) 2009 Microsoft Corporation. All rights reserved.</p> <p dir="auto">C:\Users\Anmol Anand&gt;python<br> Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)]<br> on win32<br> Type "help", "copyright", "credits" or "license" for more information.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">import tensorflow<br> Traceback (most recent call last):<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper</p> </blockquote> </blockquote> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(_"><pre class="notranslate"><code class="notranslate">fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(_ </code></pre></div> <p dir="auto"><em>file</em>_)])<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\imp.p<br> y", line 297, in find_module<br> raise ImportError(_ERR_MSG.format(name), name=name)<br> ImportError: No module named '_pywrap_tensorflow'</p> <p dir="auto">During handling of the above exception, another exception occurred:</p> <p dir="auto">Traceback (most recent call last):<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python_<em>init</em>_.py", line 66, in <br> from tensorflow.python import pywrap_tensorflow<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <br> _pywrap_tensorflow = swig_import_helper()<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import _pywrap_tensorflow"><pre class="notranslate"><code class="notranslate">import _pywrap_tensorflow </code></pre></div> <p dir="auto">ModuleNotFoundError: No module named '_pywrap_tensorflow'</p> <p dir="auto">During handling of the above exception, another exception occurred:</p> <p dir="auto">Traceback (most recent call last):<br> File "", line 1, in <br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow_<em>init</em>_.py", line 24, in <br> from tensorflow.python import *<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python_<em>init</em>_.py", line 72, in <br> raise ImportError(msg)<br> ImportError: Traceback (most recent call last):<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(_"><pre class="notranslate"><code class="notranslate">fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(_ </code></pre></div> <p dir="auto"><em>file</em>_)])<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\imp.p<br> y", line 297, in find_module<br> raise ImportError(_ERR_MSG.format(name), name=name)<br> ImportError: No module named '_pywrap_tensorflow'</p> <p dir="auto">During handling of the above exception, another exception occurred:</p> <p dir="auto">Traceback (most recent call last):<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python_<em>init</em>_.py", line 66, in <br> from tensorflow.python import pywrap_tensorflow<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <br> _pywrap_tensorflow = swig_import_helper()<br> File "C:\Users\Anmol Anand\AppData\Local\Programs\Python\Python36-32\lib\site-<br> packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import _pywrap_tensorflow"><pre class="notranslate"><code class="notranslate">import _pywrap_tensorflow </code></pre></div> <p dir="auto">ModuleNotFoundError: No module named '_pywrap_tensorflow'</p> <p dir="auto">Failed to load the native TensorFlow runtime.</p> <p dir="auto">See <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_st">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_st</a><br> arted/os_setup.md#import_error</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> <blockquote> <blockquote> <blockquote> </blockquote> </blockquote> </blockquote>
<p dir="auto">As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:</p> <ul dir="auto"> <li><code class="notranslate">ImportError: DLL load failed:</code></li> <li>A crash with return code 132</li> </ul> <p dir="auto">Our recommendation is to build TF from sources on these systems.</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</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: ubuntu/windows/macos</li> <li><strong>TensorFlow installed from (source or binary)</strong>: binary</li> <li><strong>TensorFlow version (use command below)</strong>: 1.6 and up</li> <li><strong>Python version</strong>: 2.7, 3.3, 3.4, 3.5, 3.6 and any newer</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>: any</li> <li><strong>GPU model and memory</strong>: any</li> <li><strong>Exact command to reproduce</strong>: python -c "import tensorflow as tf"</li> </ul>
1
<p dir="auto">Hi guys,<br> I'm trying to test the performance of my app by using react perf tools. The problem is its not working.<br> I call</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Perf.start() Perf.stop() Perf.printWasted()"><pre class="notranslate"><code class="notranslate">Perf.start() Perf.stop() Perf.printWasted() </code></pre></div> <p dir="auto">in the console, which works (no console errors or warnings), but <code class="notranslate">printWasted()</code> always returns empty Array and a message</p> <blockquote> <p dir="auto">Total time: 0.00 ms</p> </blockquote> <p dir="auto">This also happens for other functions like <code class="notranslate">printInclusive()</code> and <code class="notranslate">printExclusive()</code><br> What can be the problem?<br> P.S I'm using react-router, how is react perf performing with that? Maybe that's causing some issues?<br> Also, <code class="notranslate">process.env.NODE_ENV</code> is not set to production, and I'm using <code class="notranslate">React 0.13.3</code></p>
<p dir="auto">It would be great if in debug mode react would warn you when you pass in a property on props which is not specified in the propTypes object for that component. i.e. a way to enforce that props should ONLY have the props specified in propTypes and no others.</p> <p dir="auto">This would prevent use of undocumented properties and also allow better code maintenance as unused props would be more easily removed.</p>
0
<p dir="auto">Just a remark, though: the default key bindings for "Shrink/expand selection" (Shift+Alt+Left/Right) conflict with a feature that doesn't exist yet, but which I hope will be implemented someday: column selection. In Visual Studio, and many other editors, if you hold Alt at the same time as you change the selection with Shift+arrows, it changes the selection across multiple lines. So Shift+Alt+arrows should be reserved for column selection, unless you plan to never implement this (very useful) feature.</p>
<p dir="auto">Please Implement Column Mode selection/editing.</p> <p dir="auto">Previously requested here<br> <a href="https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing" rel="nofollow">https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing</a></p> <p dir="auto">On Mac preferred shortcut is cmd+option(alt) like Sublime Text does.</p>
1
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.3 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">Our schedulers have crashed on two occasions after upgrading to Airflow 2.3.3. The same DAG is responsible each time, but this is likely due to the fact that it is the only dynamic task mapping DAG running right now (catching up some historical data). This DAG uses the same imported <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/task/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/task">@task</a> function that many other DAGs used successfully with no errors. The issue has only occurred after upgrading to Airflow 2.3.3</p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">This error should not be raised - there should be no record of this task instance because, according to the UI, the task has not run yet. The extract task is green but the transform task which raised the error is blank. The DAG run is stuck in the running state until eventually the scheduler dies and the Airflow banner notifies me that there is no scheduler heartbeat.</p> <p dir="auto">Also, this same DAG (and other which use the same imported external <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/task/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/task">@task</a> function) ran for hours before the upgrade to Airflow 2.3.3.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-07-13 22:49:55,880] {process_utils.py:75} INFO - Process psutil.Process(pid=143, status='terminated', started='22:49:52') (143) terminated with exit code None File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/base.py&quot;, line 476, in checkout [SQL: UPDATE task_instance SET map_index=%(map_index)s WHERE task_instance.task_id = %(task_instance_task_id)s AND task_instance.dag_id = %(task_instance_dag_id)s AND task_instance.run_id = %(task_instance_run_id)s AND task_instance.map_index = %(task_instance_map_index)s] File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/base.py&quot;, line 476, in checkout compat.raise_( [2022-07-13 22:50:23,909] {scheduler_job.py:780} INFO - Exited execute loop [parameters: {'map_index': 0, 'task_instance_task_id': 'transform', 'task_instance_dag_id': 'dag-id', 'task_instance_run_id': 'scheduled__2022-06-04T14:05:00+00:00', 'task_instance_map_index': -1}] File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/create.py&quot;, line 590, in connect rec = pool._do_get() rec = pool._do_get() File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py&quot;, line 145, in _do_get return dialect.connect(*cargs, **cparams) File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py&quot;, line 145, in _do_get File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/util/compat.py&quot;, line 207, in raise_ (Background on this error at: https://sqlalche.me/e/14/gkpj) [parameters: {'map_index': 0, 'task_instance_task_id': 'transform', 'task_instance_dag_id': 'dag_id, 'task_instance_run_id': 'scheduled__2022-06-04T14:05:00+00:00', 'task_instance_map_index': -1}] [SQL: UPDATE task_instance SET map_index=%(map_index)s WHERE task_instance.task_id = %(task_instance_task_id)s AND task_instance.dag_id = %(task_instance_dag_id)s AND task_instance.run_id = %(task_instance_run_id)s AND task_instance.map_index = %(task_instance_map_index)s] [2022-07-13 22:49:25,323] {scheduler_job.py:780} INFO - Exited execute loop raise exception [2022-07-13 22:49:56,001] {process_utils.py:240} INFO - Waiting up to 5 seconds for processes to exit... [2022-07-13 22:49:56,014] {process_utils.py:75} INFO - Process psutil.Process(pid=144, status='terminated', started='22:49:52') (144) terminated with exit code None compat.raise_( Traceback (most recent call last): File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1802, in _execute_context [2022-07-13 22:49:56,016] {process_utils.py:75} INFO - Process psutil.Process(pid=140, status='terminated', exitcode=0, started='22:49:51') (140) terminated with exit code 0 self.dialect.do_execute( File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1802, in _execute_context [2022-07-13 22:49:56,018] {scheduler_job.py:780} INFO - Exited execute loop File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py&quot;, line 719, in do_execute self.dialect.do_execute( Traceback (most recent call last): cursor.execute(statement, parameters) File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py&quot;, line 719, in do_execute File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py&quot;, line 1802, in _execute_context psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint &quot;task_instance_pkey&quot; cursor.execute(statement, parameters) self.dialect.do_execute( DETAIL: Key (dag_id, task_id, run_id, map_index)=(oportun-five9-calls-ccvcc-v1, transform, scheduled__2022-06-04T14:05:00+00:00, 0) already exists. psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint &quot;task_instance_pkey&quot; File &quot;/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py&quot;, line 719, in do_execute "><pre class="notranslate"><code class="notranslate">[2022-07-13 22:49:55,880] {process_utils.py:75} INFO - Process psutil.Process(pid=143, status='terminated', started='22:49:52') (143) terminated with exit code None File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 476, in checkout [SQL: UPDATE task_instance SET map_index=%(map_index)s WHERE task_instance.task_id = %(task_instance_task_id)s AND task_instance.dag_id = %(task_instance_dag_id)s AND task_instance.run_id = %(task_instance_run_id)s AND task_instance.map_index = %(task_instance_map_index)s] File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/base.py", line 476, in checkout compat.raise_( [2022-07-13 22:50:23,909] {scheduler_job.py:780} INFO - Exited execute loop [parameters: {'map_index': 0, 'task_instance_task_id': 'transform', 'task_instance_dag_id': 'dag-id', 'task_instance_run_id': 'scheduled__2022-06-04T14:05:00+00:00', 'task_instance_map_index': -1}] File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 590, in connect rec = pool._do_get() rec = pool._do_get() File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get return dialect.connect(*cargs, **cparams) File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 207, in raise_ (Background on this error at: https://sqlalche.me/e/14/gkpj) [parameters: {'map_index': 0, 'task_instance_task_id': 'transform', 'task_instance_dag_id': 'dag_id, 'task_instance_run_id': 'scheduled__2022-06-04T14:05:00+00:00', 'task_instance_map_index': -1}] [SQL: UPDATE task_instance SET map_index=%(map_index)s WHERE task_instance.task_id = %(task_instance_task_id)s AND task_instance.dag_id = %(task_instance_dag_id)s AND task_instance.run_id = %(task_instance_run_id)s AND task_instance.map_index = %(task_instance_map_index)s] [2022-07-13 22:49:25,323] {scheduler_job.py:780} INFO - Exited execute loop raise exception [2022-07-13 22:49:56,001] {process_utils.py:240} INFO - Waiting up to 5 seconds for processes to exit... [2022-07-13 22:49:56,014] {process_utils.py:75} INFO - Process psutil.Process(pid=144, status='terminated', started='22:49:52') (144) terminated with exit code None compat.raise_( Traceback (most recent call last): File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context [2022-07-13 22:49:56,016] {process_utils.py:75} INFO - Process psutil.Process(pid=140, status='terminated', exitcode=0, started='22:49:51') (140) terminated with exit code 0 self.dialect.do_execute( File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context [2022-07-13 22:49:56,018] {scheduler_job.py:780} INFO - Exited execute loop File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 719, in do_execute self.dialect.do_execute( Traceback (most recent call last): cursor.execute(statement, parameters) File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 719, in do_execute File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1802, in _execute_context psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "task_instance_pkey" cursor.execute(statement, parameters) self.dialect.do_execute( DETAIL: Key (dag_id, task_id, run_id, map_index)=(oportun-five9-calls-ccvcc-v1, transform, scheduled__2022-06-04T14:05:00+00:00, 0) already exists. psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "task_instance_pkey" File "/home/airflow/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 719, in do_execute </code></pre></div> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Run a dynamic task mapping DAG in Airflow 2.3.3</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu 20.04</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">The 2.3.3 constraints file for Python 3.10 is used for the specific versions:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-celery apache-airflow-providers-docker apache-airflow-providers-ftp apache-airflow-providers-http apache-airflow-providers-microsoft-azure apache-airflow-providers-mysql apache-airflow-providers-postgres apache-airflow-providers-odbc apache-airflow-providers-redis apache-airflow-providers-salesforce apache-airflow-providers-sftp apache-airflow-providers-ssh apache-airflow-providers-google"><pre class="notranslate"><code class="notranslate">apache-airflow-providers-celery apache-airflow-providers-docker apache-airflow-providers-ftp apache-airflow-providers-http apache-airflow-providers-microsoft-azure apache-airflow-providers-mysql apache-airflow-providers-postgres apache-airflow-providers-odbc apache-airflow-providers-redis apache-airflow-providers-salesforce apache-airflow-providers-sftp apache-airflow-providers-ssh apache-airflow-providers-google </code></pre></div> <h3 dir="auto">Deployment</h3> <p dir="auto">Other Docker-based deployment</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">I am using two schedulers which run on separate nodes.</p> <h3 dir="auto">Anything else</h3> <p dir="auto">The DAG only allows 1 max active DAG run at a time. <code class="notranslate">catchup=True</code> is enabled and it has been running to fill in all tasks since 05/10 start_date.</p> <p dir="auto">The extract() task returns a list of 1 or more files which have been saved on cloud storage. The transform task processes each of these paths dynamically. I have used these same tasks (imported from another file) for over 15 different DAGs so far without issue. The problem only occurred yesterday sometime after updating Airflow to 2.3.3.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def dag_name(): retrieved = extract() transform = transform_files(retrieved) finalize = finalize_dataset(transform) consolidate = consolidate_staging(transform) retrieved &gt;&gt; transform &gt;&gt; finalize &gt;&gt; consolidate "><pre class="notranslate"><code class="notranslate">def dag_name(): retrieved = extract() transform = transform_files(retrieved) finalize = finalize_dataset(transform) consolidate = consolidate_staging(transform) retrieved &gt;&gt; transform &gt;&gt; finalize &gt;&gt; consolidate </code></pre></div> <p dir="auto">My <code class="notranslate">transform_files</code> task is just a function which expands the XCom Arg of the extract task and transforms each file. Nearly everything is based on DAG params which are customized in the DAG.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" transform_file_task = task(process_data) def transform_files(source): return ( transform_file_task.override(task_id=&quot;transform&quot;) .partial( destination=f&quot;{{{{ params.container }}}}/{{{{ dag.dag_id | dag_name }}}}/{{{{ ti.task_id }}}}&quot;, wasb_conn_id=&quot;{{ params.wasb_conn_id }}&quot;, pandas_options=&quot;{{ params.pandas_options}}&quot;, meta_columns=&quot;{{ params.meta_columns }}&quot;, script=&quot;{{ params.script }}&quot;, function_name=&quot;{{ params.function }}&quot;, schema_name=&quot;{{ params.schema }}&quot;, template=f&quot;{{{{ dag.dag_id | dag_version }}}}-{{{{ ti.run_id }}}}-{{{{ ti.map_index }}}}&quot;, existing_data_behavior=&quot;overwrite_or_ignore&quot;, partition_columns=&quot;{{ params.partition_columns }}&quot;, dag_name=&quot;{{ dag.dag_id | dag_name }}&quot;, failure_recipients=&quot;{{ params.recipients }}&quot;, success_recipients=&quot;{{ params.recipients }}&quot;, ) .expand(source=source) )"><pre class="notranslate"><code class="notranslate"> transform_file_task = task(process_data) def transform_files(source): return ( transform_file_task.override(task_id="transform") .partial( destination=f"{{{{ params.container }}}}/{{{{ dag.dag_id | dag_name }}}}/{{{{ ti.task_id }}}}", wasb_conn_id="{{ params.wasb_conn_id }}", pandas_options="{{ params.pandas_options}}", meta_columns="{{ params.meta_columns }}", script="{{ params.script }}", function_name="{{ params.function }}", schema_name="{{ params.schema }}", template=f"{{{{ dag.dag_id | dag_version }}}}-{{{{ ti.run_id }}}}-{{{{ ti.map_index }}}}", existing_data_behavior="overwrite_or_ignore", partition_columns="{{ params.partition_columns }}", dag_name="{{ dag.dag_id | dag_name }}", failure_recipients="{{ params.recipients }}", success_recipients="{{ params.recipients }}", ) .expand(source=source) ) </code></pre></div> <p dir="auto">Deleting the DAG run which caused the error and restarting the Airflow scheduler fixes the issue temporarily. If I do not delete the DAG run then the scheduler will keep dying.</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>
<p dir="auto"><strong>Description</strong></p> <p dir="auto">In order to use the production image we are already working on a helm chart, but we might want to add a production-ready docker compose that will be able to run airflow installation.</p> <p dir="auto"><strong>Use case / motivation</strong></p> <p dir="auto">For local tests/small deployments - being able to have such docker-compose environment would be really nice.</p> <p dir="auto">We seem to get to <a href="https://apache-airflow.slack.com/archives/CCPRP7943/p1598320605061700" rel="nofollow">consensus</a> that we need to have several docker-compose "sets" of files:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Local Executor</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Celery Executor</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Kubernetes Executor (??? do we need to have a Kubernetes Executor in a Compose ? I guess not...)</li> </ul> <p dir="auto">They should be varianted and possible to specify the number of parameters:</p> <ul dir="auto"> <li>Database (Postgres/MySQL)</li> <li>Redis vs. Rabitmq (should we choose one ???)</li> <li>Ports</li> <li>Volumes (persistent / not)</li> <li>Airflow Images</li> <li>Fernet Key</li> <li>RBAC</li> </ul> <p dir="auto">Depending on the setup, those Docker compose file should do proper DB initialisation.</p> <hr> <p dir="auto">Example Docker Compose (From <a href="https://apache-airflow.slack.com/archives/CQAMHKWSJ/p1587748008106000" rel="nofollow">https://apache-airflow.slack.com/archives/CQAMHKWSJ/p1587748008106000</a>) that we might use as a base and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606509422" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8548" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8548/hovercard" href="https://github.com/apache/airflow/issues/8548">#8548</a> . This is just example so this issue will not implement all of it and we will likely split those docker-compose into separate postgres/sqlite/mysql similarly as we do in CI script, so I wanted to keep it as separate issue - we will deal with user creation in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="608272731" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8606" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8606/hovercard" href="https://github.com/apache/airflow/issues/8606">#8606</a></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="version: '3' services: postgres: image: postgres:latest environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=airflow - POSTGRES_PORT=5432 ports: - 5432:5432 redis: image: redis:latest ports: - 6379:6379 flower: image: apache/airflow:1.10.10 volumes: - ./airflow-data/dags:/opt/airflow/dags environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: flower ports: - 5555:5555 airflow: image: apache/airflow:1.10.10 environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: webserver ports: - 8080:8080 volumes: - ./airflow-data/dags:/opt/airflow/dags - ./airflow-data/logs:/opt/airflow/logs - ./airflow-data/plugins:/opt/airflow/plugins airflow-scheduler: image: apache/airflow:1.10.10 container_name: airflow_scheduler_cont environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: scheduler volumes: - ./airflow-data/dags:/opt/airflow/dags - ./airflow-data/logs:/opt/airflow/logs - ./airflow-data/plugins:/opt/airflow/plugins airflow-worker1: image: apache/airflow:1.10.10 container_name: airflow_worker1_cont environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: worker volumes: - ./airflow-data/dags:/opt/airflow/dags - ./airflow-data/logs:/opt/airflow/logs - ./airflow-data/plugins:/opt/airflow/plugins airflow-worker2: image: apache/airflow:1.10.10 container_name: airflow_worker2_cont environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: worker volumes: - ./airflow-data/dags:/opt/airflow/dags - ./airflow-data/logs:/opt/airflow/logs - ./airflow-data/plugins:/opt/airflow/plugins airflow-worker3: image: apache/airflow:1.10.10 container_name: airflow_worker3_cont environment: - AIRFLOW__CORE__EXECUTOR=CeleryExecutor - AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0 - AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow - AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM= - AIRFLOW__CORE__LOAD_EXAMPLES=False - AIRFLOW__WEBSERVER__RBAC=True command: worker volumes: - ./airflow-data/dags:/opt/airflow/dags - ./airflow-data/logs:/opt/airflow/logs - ./airflow-data/plugins:/opt/airflow/plugins"><pre class="notranslate"><span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>3<span class="pl-pds">'</span></span> <span class="pl-ent">services</span>: <span class="pl-ent">postgres</span>: <span class="pl-ent">image</span>: <span class="pl-s">postgres:latest</span> <span class="pl-ent">environment</span>: - <span class="pl-s">POSTGRES_USER=postgres</span> - <span class="pl-s">POSTGRES_PASSWORD=postgres</span> - <span class="pl-s">POSTGRES_DB=airflow</span> - <span class="pl-s">POSTGRES_PORT=5432</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">5432:5432</span> <span class="pl-ent">redis</span>: <span class="pl-ent">image</span>: <span class="pl-s">redis:latest</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">6379:6379</span> <span class="pl-ent">flower</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">flower</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">5555:5555</span> <span class="pl-ent">airflow</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">webserver</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">8080:8080</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> - <span class="pl-s">./airflow-data/logs:/opt/airflow/logs</span> - <span class="pl-s">./airflow-data/plugins:/opt/airflow/plugins</span> <span class="pl-ent">airflow-scheduler</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">container_name</span>: <span class="pl-s">airflow_scheduler_cont</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">scheduler</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> - <span class="pl-s">./airflow-data/logs:/opt/airflow/logs</span> - <span class="pl-s">./airflow-data/plugins:/opt/airflow/plugins</span> <span class="pl-ent">airflow-worker1</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">container_name</span>: <span class="pl-s">airflow_worker1_cont</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">worker</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> - <span class="pl-s">./airflow-data/logs:/opt/airflow/logs</span> - <span class="pl-s">./airflow-data/plugins:/opt/airflow/plugins</span> <span class="pl-ent">airflow-worker2</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">container_name</span>: <span class="pl-s">airflow_worker2_cont</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">worker</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> - <span class="pl-s">./airflow-data/logs:/opt/airflow/logs</span> - <span class="pl-s">./airflow-data/plugins:/opt/airflow/plugins</span> <span class="pl-ent">airflow-worker3</span>: <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:1.10.10</span> <span class="pl-ent">container_name</span>: <span class="pl-s">airflow_worker3_cont</span> <span class="pl-ent">environment</span>: - <span class="pl-s">AIRFLOW__CORE__EXECUTOR=CeleryExecutor</span> - <span class="pl-s">AIRFLOW__CELERY__BROKER_URL=redis://:@redis:6379/0</span> - <span class="pl-s">AIRFLOW__CELERY__RESULT_BACKEND=db+postgresql://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://postgres:postgres@postgres:5432/airflow</span> - <span class="pl-s">AIRFLOW__CORE__FERNET_KEY=FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM=</span> - <span class="pl-s">AIRFLOW__CORE__LOAD_EXAMPLES=False</span> - <span class="pl-s">AIRFLOW__WEBSERVER__RBAC=True</span> <span class="pl-ent">command</span>: <span class="pl-s">worker</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./airflow-data/dags:/opt/airflow/dags</span> - <span class="pl-s">./airflow-data/logs:/opt/airflow/logs</span> - <span class="pl-s">./airflow-data/plugins:/opt/airflow/plugins</span></pre></div> <p dir="auto">Another example from <a href="https://apache-airflow.slack.com/archives/CQAMHKWSJ/p1587679356095400" rel="nofollow">https://apache-airflow.slack.com/archives/CQAMHKWSJ/p1587679356095400</a>:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="version: '3.7' networks: airflow: name: airflow attachable: true volumes: logs: x-database-env: &amp;database-env POSTGRES_USER: airflow POSTGRES_DB: airflow POSTGRES_PASSWORD: airflow x-airflow-env: &amp;airflow-env AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__WEBSERVER__RBAC: 'True' AIRFLOW__CORE__CHECK_SLAS: 'False' AIRFLOW__CORE__STORE_SERIALIZED_DAGS: 'False' AIRFLOW__CORE__PARALLELISM: 50 AIRFLOW__CORE__LOAD_EXAMPLES: 'False' AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS: 'False' AIRFLOW__SCHEDULER__SCHEDULER_HEARTBEAT_SEC: 10 services: postgres: image: postgres:11.5 environment: &lt;&lt;: *database-env PGDATA: /var/lib/postgresql/data/pgdata ports: - 5432:5432 volumes: - /var/run/docker.sock:/var/run/docker.sock - ./database/data:/var/lib/postgresql/data/pgdata - ./database/logs:/var/lib/postgresql/data/log command: &gt; postgres -c listen_addresses=* -c logging_collector=on -c log_destination=stderr -c max_connections=200 networks: - airflow redis: image: redis:5.0.5 environment: REDIS_HOST: redis REDIS_PORT: 6379 ports: - 6379:6379 networks: - airflow webserver: image: airflow:1.10.10 user: airflow ports: - 8090:8080 volumes: - ./dags:/opt/airflow/dags - logs:/opt/airflow/logs - ./files:/opt/airflow/files - /var/run/docker.sock:/var/run/docker.sock environment: &lt;&lt;: *database-env &lt;&lt;: *airflow-env ADMIN_PASSWORD: airflow depends_on: - postgres - redis command: webserver healthcheck: test: [&quot;CMD-SHELL&quot;, &quot;[ -f /opt/airflow/airflow-webserver.pid ]&quot;] interval: 30s timeout: 30s retries: 3 networks: - airflow flower: image: airflow:1.10.10 user: airflow ports: - 5555:5555 depends_on: - redis volumes: - logs:/opt/airflow/logs command: flower networks: - airflow scheduler: image: airflow:1.10.10 volumes: - ./dags:/opt/airflow/dags - logs:/opt/airflow/logs - ./files:/opt/airflow/files - /var/run/docker.sock:/var/run/docker.sock environment: &lt;&lt;: *database-env command: scheduler networks: - airflow worker: image: airflow:1.10.10 user: airflow volumes: - ./dags:/opt/airflow/dags - logs:/opt/airflow/logs - ./files:/opt/airflow/files - /var/run/docker.sock:/var/run/docker.sock environment: &lt;&lt;: *database-env command: worker depends_on: - scheduler"><pre class="notranslate"><span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>3.7<span class="pl-pds">'</span></span> <span class="pl-ent">networks</span>: <span class="pl-ent">airflow</span>: <span class="pl-ent">name</span>: <span class="pl-s">airflow</span> <span class="pl-ent">attachable</span>: <span class="pl-c1">true</span> <span class="pl-ent">volumes</span>: <span class="pl-ent">logs</span>: <span class="pl-ent">x-database-env</span>: <span class="pl-s">&amp;database-env</span> <span class="pl-ent">POSTGRES_USER</span>: <span class="pl-s">airflow</span> <span class="pl-ent">POSTGRES_DB</span>: <span class="pl-s">airflow</span> <span class="pl-ent">POSTGRES_PASSWORD</span>: <span class="pl-s">airflow</span> <span class="pl-ent">x-airflow-env</span>: <span class="pl-s">&amp;airflow-env</span> <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span> <span class="pl-ent">AIRFLOW__WEBSERVER__RBAC</span>: <span class="pl-s"><span class="pl-pds">'</span>True<span class="pl-pds">'</span></span> <span class="pl-ent">AIRFLOW__CORE__CHECK_SLAS</span>: <span class="pl-s"><span class="pl-pds">'</span>False<span class="pl-pds">'</span></span> <span class="pl-ent">AIRFLOW__CORE__STORE_SERIALIZED_DAGS</span>: <span class="pl-s"><span class="pl-pds">'</span>False<span class="pl-pds">'</span></span> <span class="pl-ent">AIRFLOW__CORE__PARALLELISM</span>: <span class="pl-c1">50</span> <span class="pl-ent">AIRFLOW__CORE__LOAD_EXAMPLES</span>: <span class="pl-s"><span class="pl-pds">'</span>False<span class="pl-pds">'</span></span> <span class="pl-ent">AIRFLOW__CORE__LOAD_DEFAULT_CONNECTIONS</span>: <span class="pl-s"><span class="pl-pds">'</span>False<span class="pl-pds">'</span></span> <span class="pl-ent">AIRFLOW__SCHEDULER__SCHEDULER_HEARTBEAT_SEC</span>: <span class="pl-c1">10</span> <span class="pl-ent">services</span>: <span class="pl-ent">postgres</span>: <span class="pl-ent">image</span>: <span class="pl-s">postgres:11.5</span> <span class="pl-ent">environment</span>: <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*database-env</span> <span class="pl-ent">PGDATA</span>: <span class="pl-s">/var/lib/postgresql/data/pgdata</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">5432:5432</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">/var/run/docker.sock:/var/run/docker.sock</span> - <span class="pl-s">./database/data:/var/lib/postgresql/data/pgdata</span> - <span class="pl-s">./database/logs:/var/lib/postgresql/data/log</span> <span class="pl-ent">command</span>: <span class="pl-s">&gt;</span> <span class="pl-s"> postgres</span> <span class="pl-s"> -c listen_addresses=*</span> <span class="pl-s"> -c logging_collector=on</span> <span class="pl-s"> -c log_destination=stderr</span> <span class="pl-s"> -c max_connections=200</span> <span class="pl-s"></span> <span class="pl-ent">networks</span>: - <span class="pl-s">airflow</span> <span class="pl-ent">redis</span>: <span class="pl-ent">image</span>: <span class="pl-s">redis:5.0.5</span> <span class="pl-ent">environment</span>: <span class="pl-ent">REDIS_HOST</span>: <span class="pl-s">redis</span> <span class="pl-ent">REDIS_PORT</span>: <span class="pl-c1">6379</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">6379:6379</span> <span class="pl-ent">networks</span>: - <span class="pl-s">airflow</span> <span class="pl-ent">webserver</span>: <span class="pl-ent">image</span>: <span class="pl-s">airflow:1.10.10</span> <span class="pl-ent">user</span>: <span class="pl-s">airflow</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">8090:8080</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./dags:/opt/airflow/dags</span> - <span class="pl-s">logs:/opt/airflow/logs</span> - <span class="pl-s">./files:/opt/airflow/files</span> - <span class="pl-s">/var/run/docker.sock:/var/run/docker.sock</span> <span class="pl-ent">environment</span>: <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*database-env</span> <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-env</span> <span class="pl-ent">ADMIN_PASSWORD</span>: <span class="pl-s">airflow</span> <span class="pl-ent">depends_on</span>: - <span class="pl-s">postgres</span> - <span class="pl-s">redis</span> <span class="pl-ent">command</span>: <span class="pl-s">webserver</span> <span class="pl-ent">healthcheck</span>: <span class="pl-ent">test</span>: <span class="pl-s">["CMD-SHELL", "[ -f /opt/airflow/airflow-webserver.pid ]"]</span> <span class="pl-ent">interval</span>: <span class="pl-c1">30s</span> <span class="pl-ent">timeout</span>: <span class="pl-c1">30s</span> <span class="pl-ent">retries</span>: <span class="pl-c1">3</span> <span class="pl-ent">networks</span>: - <span class="pl-s">airflow</span> <span class="pl-ent">flower</span>: <span class="pl-ent">image</span>: <span class="pl-s">airflow:1.10.10</span> <span class="pl-ent">user</span>: <span class="pl-s">airflow</span> <span class="pl-ent">ports</span>: - <span class="pl-c1">5555:5555</span> <span class="pl-ent">depends_on</span>: - <span class="pl-s">redis</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">logs:/opt/airflow/logs</span> <span class="pl-ent">command</span>: <span class="pl-s">flower</span> <span class="pl-ent">networks</span>: - <span class="pl-s">airflow</span> <span class="pl-ent">scheduler</span>: <span class="pl-ent">image</span>: <span class="pl-s">airflow:1.10.10</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./dags:/opt/airflow/dags</span> - <span class="pl-s">logs:/opt/airflow/logs</span> - <span class="pl-s">./files:/opt/airflow/files</span> - <span class="pl-s">/var/run/docker.sock:/var/run/docker.sock</span> <span class="pl-ent">environment</span>: <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*database-env</span> <span class="pl-ent">command</span>: <span class="pl-s">scheduler</span> <span class="pl-ent">networks</span>: - <span class="pl-s">airflow</span> <span class="pl-ent">worker</span>: <span class="pl-ent">image</span>: <span class="pl-s">airflow:1.10.10</span> <span class="pl-ent">user</span>: <span class="pl-s">airflow</span> <span class="pl-ent">volumes</span>: - <span class="pl-s">./dags:/opt/airflow/dags</span> - <span class="pl-s">logs:/opt/airflow/logs</span> - <span class="pl-s">./files:/opt/airflow/files</span> - <span class="pl-s">/var/run/docker.sock:/var/run/docker.sock</span> <span class="pl-ent">environment</span>: <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*database-env</span> <span class="pl-ent">command</span>: <span class="pl-s">worker</span> <span class="pl-ent">depends_on</span>: - <span class="pl-s">scheduler</span></pre></div> <p dir="auto"><em>Related issues</em><br> The initial user creation <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="608272731" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8606" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8606/hovercard" href="https://github.com/apache/airflow/issues/8606">#8606</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606509422" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8548" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8548/hovercard" href="https://github.com/apache/airflow/issues/8548">#8548</a><br> Quick start documentation planned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606440721" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8542" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/8542/hovercard" href="https://github.com/apache/airflow/issues/8542">#8542</a></p>
0
<p dir="auto">Hi guys. I'm getting really weird behavior in my latest project. I assume it's a bug in React.<br> I want to override default browser context menu. I subscribed for <code class="notranslate">contextmenu</code> and <code class="notranslate">click</code> events in <code class="notranslate">componentDidMount</code>. On right click (context menu) I want to show my custom div. On left click, this div should hide. In event listeners I do:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="onContextMenu = (e) =&gt; { if ((e.target as any).id === CONTEXT_MENU_ID) { const {offsetX, offsetY} = e const contextMenu = { isActive: true, position: { x: offsetX, y: offsetY, }, } this.setState({contextMenu}) e.preventDefault() } } onClick = (e) =&gt; { const contextMenu = { isActive: false, position: {x: 0, y: 0}, } this.setState({contextMenu}) }"><pre class="notranslate"><code class="notranslate">onContextMenu = (e) =&gt; { if ((e.target as any).id === CONTEXT_MENU_ID) { const {offsetX, offsetY} = e const contextMenu = { isActive: true, position: { x: offsetX, y: offsetY, }, } this.setState({contextMenu}) e.preventDefault() } } onClick = (e) =&gt; { const contextMenu = { isActive: false, position: {x: 0, y: 0}, } this.setState({contextMenu}) } </code></pre></div> <p dir="auto">and in <code class="notranslate">render</code> there's:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{(this.state.contextMenu.isActive) &amp;&amp; ( &lt;div className='menu-item noselect'&gt; &lt;i className='fa fa-plus'/&gt; &lt;span&gt; Add new note &lt;/span&gt; &lt;/div&gt; )}"><pre class="notranslate"><code class="notranslate">{(this.state.contextMenu.isActive) &amp;&amp; ( &lt;div className='menu-item noselect'&gt; &lt;i className='fa fa-plus'/&gt; &lt;span&gt; Add new note &lt;/span&gt; &lt;/div&gt; )} </code></pre></div> <p dir="auto">I assume everybody can imagine expected behavior. But real behavior is:<br> right click &gt; context menu shows up &gt; left click &gt; context menu is still there &gt; right click &gt; another context menu shows up... and so on... You can literally see DOM nodes being duplicated in Elements tab in DevTools</p> <p dir="auto">You can try it here: <a href="https://github.com/jake-daniels/zen-tab">https://github.com/jake-daniels/zen-tab</a><br> The code is in <code class="notranslate">src/app/controller/NotesBoard.tsx</code> file.<br> Try <code class="notranslate">npm install</code> <code class="notranslate">npm start</code>, then right/left click somewhere on blue area.</p> <p dir="auto">Environment:<br> MS Windows 8.1 x64<br> Chrome 63.0.3239.84<br> React 16.2.0</p>
<p dir="auto">I'd like to configure my testsuite to fail if there are any react warnings triggered.</p> <p dir="auto">I'm currently using a variant on this SO answer <a href="http://stackoverflow.com/questions/29651950/karma-and-react-have-warnings-to-cause-errors" rel="nofollow">http://stackoverflow.com/questions/29651950/karma-and-react-have-warnings-to-cause-errors</a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.warn = (function(warn) { return function(msg) { // Detect react warnings &amp; error if (/^Warning: /.test(msg)) { throw new Error(&quot;React &quot; + msg); } return warn.apply(this, arguments); }; })(console.warn);"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">warn</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">warn</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">function</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-c">// Detect react warnings &amp; error</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">^</span>Warning: <span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-en">test</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-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">"React "</span> <span class="pl-c1">+</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-k">return</span> <span class="pl-s1">warn</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-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-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">warn</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This basically works, but has a problem because there's some global-state memoisation in the code which triggers warning to try not to trigger too often:<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/facebook/react/blob/500d4c3f8779bce7c7dde129eb2fec9e901cf5ae/src/isomorphic/classic/element/ReactElementValidator.js#L46">react/src/isomorphic/classic/element/ReactElementValidator.js</a> </p> <p class="mb-0 color-fg-muted"> Line 46 in <a data-pjax="true" class="commit-tease-sha" href="/facebook/react/commit/500d4c3f8779bce7c7dde129eb2fec9e901cf5ae">500d4c3</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td> <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">var</span> <span class="pl-s1">ownerHasKeyUseWarning</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Could we provide a way to clear this state, or even better a supported API for opt-in erroring on warnings?</p>
0
<p dir="auto">Using --target feature in rust will hard-code the provided path in the library. Linking these libraries against applications will fail if they use same target.json but with a different (e.g., relative) path.</p> <p dir="auto">I tried this code:<br> lib.rs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![feature(no_std)] #![no_std]"><pre class="notranslate"><code class="notranslate">#![feature(no_std)] #![no_std] </code></pre></div> <p dir="auto">main.rs</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![feature(lang_items, start, no_std)] #![no_std] extern crate lib; #[lang=&quot;phantom_fn&quot;] trait PhantomFn&lt;A: ?Sized, R: ?Sized = ()&gt; {} #[lang=&quot;sized&quot;] trait Sized: PhantomFn&lt;Self&gt; {} #[lang=&quot;copy&quot;] trait Copy: PhantomFn&lt;Self&gt; {} #[lang=&quot;sync&quot;] trait Sync: PhantomFn&lt;Self&gt; {} #[start] fn start() { } #[lang = &quot;stack_exhausted&quot;] extern fn stack_exhausted() {} #[lang = &quot;eh_personality&quot;] extern fn eh_personality() {} #[lang = &quot;panic_fmt&quot;] fn panic_fmt() -&gt; ! { loop {} }"><pre class="notranslate"><code class="notranslate">#![feature(lang_items, start, no_std)] #![no_std] extern crate lib; #[lang="phantom_fn"] trait PhantomFn&lt;A: ?Sized, R: ?Sized = ()&gt; {} #[lang="sized"] trait Sized: PhantomFn&lt;Self&gt; {} #[lang="copy"] trait Copy: PhantomFn&lt;Self&gt; {} #[lang="sync"] trait Sync: PhantomFn&lt;Self&gt; {} #[start] fn start() { } #[lang = "stack_exhausted"] extern fn stack_exhausted() {} #[lang = "eh_personality"] extern fn eh_personality() {} #[lang = "panic_fmt"] fn panic_fmt() -&gt; ! { loop {} } </code></pre></div> <p dir="auto">Now, I compile the lib.rs as a library</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --crate-type=lib --emit=link -O --cfg arch__x86_64 --target=target.json --crate-name lib lib.rs"><pre class="notranslate"><code class="notranslate">rustc --crate-type=lib --emit=link -O --cfg arch__x86_64 --target=target.json --crate-name lib lib.rs </code></pre></div> <p dir="auto">...and main.rs as an application using liblib.rlib (I'm in folder play):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Works: rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=target.json --extern lib=./liblib.rlib -o main.o main.rs Does not work: rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=../play/target.json --extern lib=./liblib.rlib -o main.o main.rs"><pre class="notranslate"><code class="notranslate">Works: rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=target.json --extern lib=./liblib.rlib -o main.o main.rs Does not work: rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=../play/target.json --extern lib=./liblib.rlib -o main.o main.rs </code></pre></div> <p dir="auto">Instead, this happened:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=../play/target.json --extern lib=./liblib.rlib -o main.o main.rs main.rs:4:1: 4:18 error: couldn't find crate `lib` with expected target triple ../play/target.json main.rs:4 extern crate lib; ^~~~~~~~~~~~~~~~~ main.rs:4:18: 4:18 note: crate `lib`, path #1, triple target.json: /home/gz/workspace/play/liblib.rlib error: aborting due to previous error"><pre class="notranslate"><code class="notranslate">rustc --emit=obj -L dependency=./ -O --cfg arch__x86_64 --target=../play/target.json --extern lib=./liblib.rlib -o main.o main.rs main.rs:4:1: 4:18 error: couldn't find crate `lib` with expected target triple ../play/target.json main.rs:4 extern crate lib; ^~~~~~~~~~~~~~~~~ main.rs:4:18: 4:18 note: crate `lib`, path #1, triple target.json: /home/gz/workspace/play/liblib.rlib error: aborting due to previous error </code></pre></div> <h2 dir="auto">Meta</h2> <p dir="auto"><code class="notranslate">rustc --version --verbose</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (c89de2c56 2015-03-28) (built 2015-03-29) binary: rustc commit-hash: c89de2c56baeb61e7cc434924dcc8bedd32b26b8 commit-date: 2015-03-28 build-date: 2015-03-29 host: x86_64-unknown-linux-gnu release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (c89de2c56 2015-03-28) (built 2015-03-29) binary: rustc commit-hash: c89de2c56baeb61e7cc434924dcc8bedd32b26b8 commit-date: 2015-03-28 build-date: 2015-03-29 host: x86_64-unknown-linux-gnu release: 1.0.0-nightly </code></pre></div>
<p dir="auto">the ./configure output is :</p> <p dir="auto">configure: looking for configure programs<br> configure: found program cmp<br> configure: found program mkdir<br> configure: found program printf<br> configure: found program cut<br> configure: found program head<br> configure: found program grep<br> configure: found program xargs<br> configure: found program cp<br> configure: found program find<br> configure: found program uname<br> configure: found program date<br> configure: found program tr<br> configure: found program sed<br> configure: found program file<br> configure: found program make<br> configure: inspecting environment<br> configure: recreating config.tmp<br> configure:<br> configure: processing ./configure args<br> configure:<br> configure: CFG_LOCALSTATEDIR := /var/lib<br> configure: CFG_SYSCONFDIR := /etc<br> configure: CFG_DATADIR := /share<br> configure: CFG_INFODIR := /share/info<br> configure: CFG_LLVM_ROOT :=<br> configure: CFG_JEMALLOC_ROOT :=<br> configure: CFG_BUILD := x86_64-apple-darwin<br> configure: CFG_ANDROID_CROSS_PATH := /opt/ndk_standalone<br> configure: CFG_RELEASE_CHANNEL := dev<br> configure: CFG_MUSL_ROOT := /usr/local<br> configure: CFG_BUILD := x86_64-apple-darwin<br> configure: CFG_LIBDIR := /usr/local/lib<br> configure:<br> configure: validating ./configure args<br> configure:<br> configure: CFG_BOOTSTRAP_KEY := 21:11:31<br> configure:<br> configure: looking for build programs<br> configure:<br> configure: CFG_CURLORWGET := /usr/bin/curl (7.37.1)<br> configure: CFG_PYTHON := /usr/bin/python2.7<br> configure: CFG_GIT := /usr/bin/git (2.3.8)<br> configure: git: no git directory. disabling submodules<br> configure: CFG_MD5 := /sbin/md5<br> configure: CFG_MD5SUM :=<br> configure: CFG_HASH_COMMAND := /sbin/md5 -q | head -c 8<br> configure: CFG_CLANG := /usr/bin/clang++ (7.0.0)<br> configure: CFG_CCACHE :=<br> configure: CFG_GCC := /usr/bin/gcc (7.0.0)<br> configure: CFG_LD := /usr/bin/ld<br> configure: CFG_VALGRIND :=<br> configure: CFG_PERF :=<br> configure: CFG_ISCC :=<br> configure: CFG_ANTLR4 :=<br> configure: CFG_GRUN :=<br> configure: CFG_FLEX := /usr/bin/flex (2.5.35)<br> configure: CFG_BISON := /usr/bin/bison (2.3)<br> configure: CFG_PANDOC :=<br> configure: CFG_XELATEX :=<br> configure: CFG_GDB :=<br> configure: CFG_LLDB := /usr/bin/lldb (340.4.53.3)<br> configure: CFG_DISABLE_VALGRIND_RPASS := 1<br> configure: CFG_LLDB_VERSION := lldb-340.4.53.3<br> configure: CFG_LLDB_PYTHON_DIR := /Library/Developer/CommandLineTools ...<br> configure:<br> configure: looking for target specific programs<br> configure:<br> configure: CFG_ADB :=<br> configure:<br> configure: on OS X &gt;=10.9, forcing use of clang<br> configure:<br> configure: CFG_ENABLE_CLANG := 1<br> configure: CFG_USING_CLANG := 1<br> configure: error: bad CLANG version: 7.0.0, need &gt;=3.0svn</p>
0
<p dir="auto">One can't cast static data to a static pointer to a trait. This seems like a valid corner case that should be implemented.</p>
<p dir="auto">I had a brief chat on IRC today about adding support for deducing the function return type. I realize we decided against doing this a couple years ago, but I think it's worth revisiting in light of iterators. One of the challenges with our iterators is that the types of complex iterators are unwieldy. For example, here's the type of chaining two vecs together:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type T&lt;'self&gt; = std::iter::Chain&lt; std::vec::VecIterator&lt;'self, int&gt;, std::vec::VecIterator&lt;'self, int&gt; &gt;; fn main() { let x = [1,2,3]; let y = [4,5,6]; let iter: T = x.iter().chain(y.iter()); }"><pre class="notranslate"><code class="notranslate">type T&lt;'self&gt; = std::iter::Chain&lt; std::vec::VecIterator&lt;'self, int&gt;, std::vec::VecIterator&lt;'self, int&gt; &gt;; fn main() { let x = [1,2,3]; let y = [4,5,6]; let iter: T = x.iter().chain(y.iter()); } </code></pre></div> <p dir="auto">While we can generally rely on type inference inside a function, things get really messy once we try to return an iterator from a function. One way to avoid this complicated type is to box of the iterators inside a <code class="notranslate">~Iterator&lt;int&gt;</code>, but according to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thestinger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thestinger">@thestinger</a>, this is ~1000x slower than with a monomorphized iterator. Having return type deduction would make it much easier to pass around iterators.</p> <p dir="auto">This would also be really handy for macros and syntax extensions. For example, we could convert the serialize.rs over to iterators without needing generators (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19409280" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/9145" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/9145/hovercard" href="https://github.com/rust-lang/rust/issues/9145">#9145</a>).</p> <p dir="auto">This has been proposed for (C++14)[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html].</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cmr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cmr">@cmr</a> had an argument against this. He felt that adding return type deduction would make it that much easier to break ABIs.</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="weeks = pd.Series(pd.date_range('2018-01', '2018-02', freq='7D', tz='America/New_York')) week_ago = weeks.groupby([1, 1, 1, 1, 1]).shift() print(week_ago)"><pre class="notranslate"><span class="pl-s1">weeks</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2018-01'</span>, <span class="pl-s">'2018-02'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'7D'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'America/New_York'</span>)) <span class="pl-s1">week_ago</span> <span class="pl-c1">=</span> <span class="pl-s1">weeks</span>.<span class="pl-en">groupby</span>([<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>]).<span class="pl-en">shift</span>() <span class="pl-en">print</span>(<span class="pl-s1">week_ago</span>)</pre></div> <p dir="auto">Outputs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 NaT 1 2018-01-01 05:00:00 2 2018-01-08 05:00:00 3 2018-01-15 05:00:00 4 2018-01-22 05:00:00 dtype: datetime64[ns]"><pre class="notranslate"><code class="notranslate">0 NaT 1 2018-01-01 05:00:00 2 2018-01-08 05:00:00 3 2018-01-15 05:00:00 4 2018-01-22 05:00:00 dtype: datetime64[ns] </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">Shifting a groupby'd datetime column removes the timezone. It's not mentioned in the documentation so either the timezone should be preserved or the documentation should mention that timezone is removed (by converting to UTC it seems).</p> <p dir="auto">I had a quick look and couldn't find another issue for this. I glanced at the GroupBy shift implementation and my guess is that it's due to cython/numpy not supporting timezones.</p> <p dir="auto">I'm happy to work on a fix if someone says what the preferred solution is.</p> <h4 dir="auto">Expected Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 NaT 1 2018-01-01 00:00:00-05:00 2 2018-01-08 00:00:00-05:00 3 2018-01-15 00:00:00-05:00 4 2018-01-22 00:00:00-05:00 dtype: datetime64[ns, America/New_York]"><pre class="notranslate"><code class="notranslate">0 NaT 1 2018-01-01 00:00:00-05:00 2 2018-01-08 00:00:00-05:00 3 2018-01-15 00:00:00-05:00 4 2018-01-22 00:00:00-05:00 dtype: datetime64[ns, America/New_York] </code></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.3.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.10.0-693.el7.x86_64<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: en_US.UTF-8<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.21.0<br> pytest: 3.4.1<br> pip: 9.0.1<br> setuptools: 38.5.1<br> Cython: None<br> numpy: 1.13.3<br> scipy: 1.0.0<br> pyarrow: 0.8.0<br> xarray: None<br> IPython: 6.2.1<br> sphinx: None<br> patsy: 0.5.0<br> dateutil: 2.6.1<br> pytz: 2018.3<br> blosc: None<br> bottleneck: 1.2.1<br> tables: None<br> numexpr: 2.6.4<br> feather: 0.4.0<br> matplotlib: 2.1.2<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 0.9999999<br> sqlalchemy: 1.2.1<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.10<br> s3fs: None<br> fastparquet: 0.1.4<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto">need a systematic test of all groupby methods here.</p> <p dir="auto">This works as expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')], 'A': [3]}).groupby('A', as_index=False).head(1)"><pre class="notranslate"><code class="notranslate">pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')], 'A': [3]}).groupby('A', as_index=False).head(1) </code></pre></div> <p dir="auto">However, this loses the timezone:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')], 'A': [3]}).groupby('A', as_index=False).first()"><pre class="notranslate"><code class="notranslate">pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')], 'A': [3]}).groupby('A', as_index=False).first() </code></pre></div>
1
<p dir="auto">Versions:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --version rustc 0.11.0-pre (11aa731 2014-05-23 14:56:24 -0700) host: x86_64-unknown-linux-gnu $ uname -a Linux test 3.13-1-amd64 #1 SMP Debian 3.13.10-1 (2014-04-15) x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">$ rustc --version rustc 0.11.0-pre (11aa731 2014-05-23 14:56:24 -0700) host: x86_64-unknown-linux-gnu $ uname -a Linux test 3.13-1-amd64 #1 SMP Debian 3.13.10-1 (2014-04-15) x86_64 GNU/Linux </code></pre></div> <p dir="auto">Code to reproduce the ICE:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn test(a: &amp;Vec&lt;u8&gt;) { print!(&quot;{}&quot;, a.len()); } pub fn main() { let data = vec!(); test(&amp;data); }"><pre class="notranslate"><code class="notranslate">fn test(a: &amp;Vec&lt;u8&gt;) { print!("{}", a.len()); } pub fn main() { let data = vec!(); test(&amp;data); } </code></pre></div> <p dir="auto">Compilation output (assuming code is in test.rs):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc -g test.rs test.rs:1:1: 1:1 error: internal compiler error: debuginfo::set_members_of_composite_type() - Already completed forward declaration re-encountered. test.rs:1 fn test(a: &amp;Vec&lt;u8&gt;) { ^ note: the compiler hit an unexpected failure path. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' failed at 'Box&lt;Any&gt;', /tmp/rust/src/libsyntax/diagnostic.rs:106 stack backtrace: 1: 0x7f6088d547b0 - rt::backtrace::imp::write::h91511e92fbebf61dJSy::v0.11.0.pre 2: 0x7f6088cd4900 - rt::unwind::begin_unwind_inner::hc6a3eade6662bd0cRsy::v0.11.0.pre 3: 0x7f60876d4cb0 - rt::unwind::begin_unwind::h14424584252031250192::v0.11.0.pre 4: 0x7f60876d4be0 - diagnostic::SpanHandler::span_bug::hbb40ab336641d6bcoUb::v0.11.0.pre 5: 0x7f6089823d00 - driver::session::Session::span_bug::hbc579a9c1652b4dcWQk::v0.11.0.pre 6: 0x7f608992a540 - middle::trans::debuginfo::set_members_of_composite_type::ha39f45d6f9c0cb39stB::v0.11.0.pre 7: 0x7f6089928e50 - middle::trans::debuginfo::RecursiveTypeDescription::finalize::h0fe21aef99d3e1c0I8A::v0.11.0.pre 8: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 9: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 10: 0x7f6089932ee0 - middle::trans::debuginfo::vec_slice_metadata::h5b5525bc44b17f0dCKB::v0.11.0.pre 11: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 12: 0x7f6089921730 - middle::trans::debuginfo::declare_local::h3f3d7f3d971eec2bBLA::v0.11.0.pre 13: 0x7f6089920a10 - middle::trans::debuginfo::create_local_var_metadata::closure.63979 14: 0x7f6089d15cc0 - middle::pat_util::pat_bindings::closure.76254 15: 0x7f608771bcd0 - ast_util::walk_pat::h73d09c5bbd81fc4aBNv::v0.11.0.pre 16: 0x7f60897fbbd0 - middle::trans::controlflow::trans_stmt::hebe30cb187b2a930B2a::v0.11.0.pre 17: 0x7f60897fdcb0 - middle::trans::controlflow::trans_block::hc64c9e56aa358790I7a::v0.11.0.pre 18: 0x7f608983e730 - middle::trans::expr::trans_rvalue_dps_unadjusted::h9c3393158ea8f3e88hf::v0.11.0.pre 19: 0x7f60897fd5a0 - middle::trans::expr::trans_into::h6b67f346e56d2aaagse::v0.11.0.pre 20: 0x7f60898ee990 - middle::trans::_match::trans_match_inner::he680468c7e8edd8bk7s::v0.11.0.pre 21: 0x7f608983e730 - middle::trans::expr::trans_rvalue_dps_unadjusted::h9c3393158ea8f3e88hf::v0.11.0.pre 22: 0x7f60897fd5a0 - middle::trans::expr::trans_into::h6b67f346e56d2aaagse::v0.11.0.pre 23: 0x7f60897fc780 - middle::trans::controlflow::trans_stmt_semi::h95ab3162fcdb8669P6a::v0.11.0.pre 24: 0x7f60897fbbd0 - middle::trans::controlflow::trans_stmt::hebe30cb187b2a930B2a::v0.11.0.pre 25: 0x7f60897fdcb0 - middle::trans::controlflow::trans_block::hc64c9e56aa358790I7a::v0.11.0.pre 26: 0x7f60898bb6c0 - middle::trans::base::trans_closure::hd893efe09250c8a3Php::v0.11.0.pre 27: 0x7f60897c6df0 - middle::trans::base::trans_fn::h02396ab03da5196a5pp::v0.11.0.pre 28: 0x7f60897c1110 - middle::trans::base::trans_item::h4715e8b19ebc5b3eCBp::v0.11.0.pre 29: 0x7f60898ca380 - middle::trans::base::trans_crate::h97a887f98edb0d3dpoq::v0.11.0.pre 30: 0x7f608a0a1430 - driver::driver::phase_4_translate_to_llvm::h29f793bbb3691a0c01j::v0.11.0.pre 31: 0x7f608a096b40 - driver::driver::compile_input::hf7a007097756b7ceBJj::v0.11.0.pre 32: 0x7f608a160180 - driver::run_compiler::h6c18401fac048ee4umm::v0.11.0.pre 33: 0x7f608a1600a0 - driver::main_args::closure.93487 34: 0x7f608a174b50 - driver::monitor::closure.94559 35: 0x7f608a170070 - task::TaskBuilder::try::closure.94322 36: 0x7f608926c970 - task::spawn_opts::closure.7801 37: 0x7f6088d4e6e0 - rt::task::Task::run::closure.25256 38: 0x7f6088dadab0 - rust_try 39: 0x7f6088d4e630 - rt::task::Task::run::h9a36fd2f34280279uhw::v0.11.0.pre 40: 0x7f608926c720 - task::spawn_opts::closure.7774 41: 0x7f6088d52b60 - rt::thread::thread_start::h057270a612f2c73020w::v0.11.0.pre 42: 0x7f60867fdfa0 - start_thread 43: 0x7f608899cbe9 - __clone 44: 0x0 - &lt;unknown&gt; $ "><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc -g test.rs test.rs:1:1: 1:1 error: internal compiler error: debuginfo::set_members_of_composite_type() - Already completed forward declaration re-encountered. test.rs:1 fn test(a: &amp;Vec&lt;u8&gt;) { ^ note: the compiler hit an unexpected failure path. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace task 'rustc' failed at 'Box&lt;Any&gt;', /tmp/rust/src/libsyntax/diagnostic.rs:106 stack backtrace: 1: 0x7f6088d547b0 - rt::backtrace::imp::write::h91511e92fbebf61dJSy::v0.11.0.pre 2: 0x7f6088cd4900 - rt::unwind::begin_unwind_inner::hc6a3eade6662bd0cRsy::v0.11.0.pre 3: 0x7f60876d4cb0 - rt::unwind::begin_unwind::h14424584252031250192::v0.11.0.pre 4: 0x7f60876d4be0 - diagnostic::SpanHandler::span_bug::hbb40ab336641d6bcoUb::v0.11.0.pre 5: 0x7f6089823d00 - driver::session::Session::span_bug::hbc579a9c1652b4dcWQk::v0.11.0.pre 6: 0x7f608992a540 - middle::trans::debuginfo::set_members_of_composite_type::ha39f45d6f9c0cb39stB::v0.11.0.pre 7: 0x7f6089928e50 - middle::trans::debuginfo::RecursiveTypeDescription::finalize::h0fe21aef99d3e1c0I8A::v0.11.0.pre 8: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 9: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 10: 0x7f6089932ee0 - middle::trans::debuginfo::vec_slice_metadata::h5b5525bc44b17f0dCKB::v0.11.0.pre 11: 0x7f608991d440 - middle::trans::debuginfo::type_metadata::h98963d42bb116c2fCVB::v0.11.0.pre 12: 0x7f6089921730 - middle::trans::debuginfo::declare_local::h3f3d7f3d971eec2bBLA::v0.11.0.pre 13: 0x7f6089920a10 - middle::trans::debuginfo::create_local_var_metadata::closure.63979 14: 0x7f6089d15cc0 - middle::pat_util::pat_bindings::closure.76254 15: 0x7f608771bcd0 - ast_util::walk_pat::h73d09c5bbd81fc4aBNv::v0.11.0.pre 16: 0x7f60897fbbd0 - middle::trans::controlflow::trans_stmt::hebe30cb187b2a930B2a::v0.11.0.pre 17: 0x7f60897fdcb0 - middle::trans::controlflow::trans_block::hc64c9e56aa358790I7a::v0.11.0.pre 18: 0x7f608983e730 - middle::trans::expr::trans_rvalue_dps_unadjusted::h9c3393158ea8f3e88hf::v0.11.0.pre 19: 0x7f60897fd5a0 - middle::trans::expr::trans_into::h6b67f346e56d2aaagse::v0.11.0.pre 20: 0x7f60898ee990 - middle::trans::_match::trans_match_inner::he680468c7e8edd8bk7s::v0.11.0.pre 21: 0x7f608983e730 - middle::trans::expr::trans_rvalue_dps_unadjusted::h9c3393158ea8f3e88hf::v0.11.0.pre 22: 0x7f60897fd5a0 - middle::trans::expr::trans_into::h6b67f346e56d2aaagse::v0.11.0.pre 23: 0x7f60897fc780 - middle::trans::controlflow::trans_stmt_semi::h95ab3162fcdb8669P6a::v0.11.0.pre 24: 0x7f60897fbbd0 - middle::trans::controlflow::trans_stmt::hebe30cb187b2a930B2a::v0.11.0.pre 25: 0x7f60897fdcb0 - middle::trans::controlflow::trans_block::hc64c9e56aa358790I7a::v0.11.0.pre 26: 0x7f60898bb6c0 - middle::trans::base::trans_closure::hd893efe09250c8a3Php::v0.11.0.pre 27: 0x7f60897c6df0 - middle::trans::base::trans_fn::h02396ab03da5196a5pp::v0.11.0.pre 28: 0x7f60897c1110 - middle::trans::base::trans_item::h4715e8b19ebc5b3eCBp::v0.11.0.pre 29: 0x7f60898ca380 - middle::trans::base::trans_crate::h97a887f98edb0d3dpoq::v0.11.0.pre 30: 0x7f608a0a1430 - driver::driver::phase_4_translate_to_llvm::h29f793bbb3691a0c01j::v0.11.0.pre 31: 0x7f608a096b40 - driver::driver::compile_input::hf7a007097756b7ceBJj::v0.11.0.pre 32: 0x7f608a160180 - driver::run_compiler::h6c18401fac048ee4umm::v0.11.0.pre 33: 0x7f608a1600a0 - driver::main_args::closure.93487 34: 0x7f608a174b50 - driver::monitor::closure.94559 35: 0x7f608a170070 - task::TaskBuilder::try::closure.94322 36: 0x7f608926c970 - task::spawn_opts::closure.7801 37: 0x7f6088d4e6e0 - rt::task::Task::run::closure.25256 38: 0x7f6088dadab0 - rust_try 39: 0x7f6088d4e630 - rt::task::Task::run::h9a36fd2f34280279uhw::v0.11.0.pre 40: 0x7f608926c720 - task::spawn_opts::closure.7774 41: 0x7f6088d52b60 - rt::thread::thread_start::h057270a612f2c73020w::v0.11.0.pre 42: 0x7f60867fdfa0 - start_thread 43: 0x7f608899cbe9 - __clone 44: 0x0 - &lt;unknown&gt; $ </code></pre></div> <p dir="auto">This might be related to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34216777" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/14385" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/14385/hovercard" href="https://github.com/rust-lang/rust/issues/14385">#14385</a>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="servo/src/support/glfw/glfw-rs/src/lib/lib.rs:1:1: 1:1 error: internal compiler error: debuginfo::set_members_of_composite_type() - Already completed forward declaration re-encountered. ... task 'rustc' failed at 'Box&lt;Any&gt;', /home/travis/build/Manishearth/rust/src/libsyntax/diagnostic.rs:99 "><pre class="notranslate"><code class="notranslate">servo/src/support/glfw/glfw-rs/src/lib/lib.rs:1:1: 1:1 error: internal compiler error: debuginfo::set_members_of_composite_type() - Already completed forward declaration re-encountered. ... task 'rustc' failed at 'Box&lt;Any&gt;', /home/travis/build/Manishearth/rust/src/libsyntax/diagnostic.rs:99 </code></pre></div> <p dir="auto">This seems similar to the already-fixed issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="24602641" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/11083" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/11083/hovercard" href="https://github.com/rust-lang/rust/issues/11083">#11083</a></p> <p dir="auto">Note: I'm using a Rust snapshot that I generated on a different system (with the same DEFAULT_TARGET as mine)</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/michaelwoerister/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/michaelwoerister">@michaelwoerister</a></p>
1
<p dir="auto">Analogous to how you would swap workspaces with Win-Ctrl-Arrow keys, holding down shift also takes the currently focused window to the new workspace. (I remember this from my old Ubuntu system).</p> <p dir="auto">(I'm so stupid with the edits and such, I'm sorry)</p>
<p dir="auto">One of the thing I've found lacking ever since I started using the virtual desktops is the ability to move a window with you while moving to another virtual desktop.</p> <p dir="auto">Currently, we can move to another desktop using the shortcut <code class="notranslate">ctrl + win + left/right</code>, I feel like a shortcut along the lines of <code class="notranslate">ctrl + win + alt + left/right</code> could be used to make the current active window move with you to the next desktop</p> <p dir="auto">I have no idea if this fits as a powertoy, please tell me if it doesn't !</p>
1
<p dir="auto">Create two roles, for instance "nginx" and "tomcat"; define variable files in each role with a 'version' variable, set to match expected versions of nginx and tomcat; create a playbook which associates both 'nginx' and 'tomcat' roles to a set of hosts.</p> <p dir="auto">Depending on order of execution, it appears that ansible overwrites the tomcat:version property with the nginx:version property, and then attempts to install tomcat-{{nginx:version}} which fails.</p> <p dir="auto">Either documentation should be updated to reflect the idea that roles maintain variables in a global namespace, or roles should be updated to auto-namespace vars files inside them, such that similarly named vars can co-exist between roles.</p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">Playbooks/Roles</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto"><code class="notranslate">nowcows=1</code></p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">N/A (Ubuntu)</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When a role is invoked through a playbook and also referenced as a dependency it is executed twice.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="==&gt; playbook.yml &lt;== --- - hosts: localhost roles: - role: A - role: B - role: C ==&gt; roles/A/tasks/main.yml &lt;== --- - debug: msg=A ==&gt; roles/B/meta/main.yml &lt;== dependencies: - name: A ==&gt; roles/B/tasks/main.yml &lt;== --- - debug: msg=B ==&gt; roles/C/meta/main.yml &lt;== dependencies: - name: A ==&gt; roles/C/tasks/main.yml &lt;== --- - debug: msg=C"><pre class="notranslate"><span class="pl-s">==&gt; playbook.yml &lt;==</span> --- - <span class="pl-ent">hosts</span>: <span class="pl-s">localhost</span> <span class="pl-ent">roles</span>: - <span class="pl-ent">role</span>: <span class="pl-s">A</span> - <span class="pl-ent">role</span>: <span class="pl-s">B</span> - <span class="pl-ent">role</span>: <span class="pl-s">C</span> <span class="pl-s">==&gt; roles/A/tasks/main.yml &lt;==</span> --- - <span class="pl-ent">debug</span>: <span class="pl-s">msg=A</span> <span class="pl-s">==&gt; roles/B/meta/main.yml &lt;==</span> <span class="pl-ent">dependencies</span>: - <span class="pl-ent">name</span>: <span class="pl-s">A</span> <span class="pl-s">==&gt; roles/B/tasks/main.yml &lt;==</span> --- - <span class="pl-ent">debug</span>: <span class="pl-s">msg=B</span> <span class="pl-s">==&gt; roles/C/meta/main.yml &lt;==</span> <span class="pl-ent">dependencies</span>: - <span class="pl-ent">name</span>: <span class="pl-s">A</span> <span class="pl-s">==&gt; roles/C/tasks/main.yml &lt;==</span> --- - <span class="pl-ent">debug</span>: <span class="pl-s">msg=C</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Have roles A, B, C each execute once.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Role A runs twice, then role B and C run.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /etc/ansible/ansible.cfg as config file [WARNING]: provided hosts list is empty, only localhost is available Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc PLAYBOOK: playbook.yml ********************************************************* 1 plays in playbook.yml PLAY [localhost] *************************************************************** TASK [setup] ******************************************************************* Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: ubuntu &lt;127.0.0.1&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p &quot;` echo ~/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035 `&quot; &amp;&amp; echo ansible-tmp-1488405550.52-260200123218035=&quot;` echo ~/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035 `&quot; ) &amp;&amp; sleep 0' &lt;127.0.0.1&gt; PUT /tmp/tmpF6ZqnV TO /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py &lt;127.0.0.1&gt; EXEC /bin/sh -c 'chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/ /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py &amp;&amp; sleep 0' &lt;127.0.0.1&gt; EXEC /bin/sh -c '/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py; rm -rf &quot;/home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0' ok: [localhost] TASK [A : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/A/tasks/main.yml:2 ok: [localhost] =&gt; { &quot;msg&quot;: &quot;A&quot; } TASK [A : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/A/tasks/main.yml:2 ok: [localhost] =&gt; { &quot;msg&quot;: &quot;A&quot; } TASK [B : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/B/tasks/main.yml:2 ok: [localhost] =&gt; { &quot;msg&quot;: &quot;B&quot; } TASK [C : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/C/tasks/main.yml:2 ok: [localhost] =&gt; { &quot;msg&quot;: &quot;C&quot; } PLAY RECAP ********************************************************************* localhost : ok=5 changed=0 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">Using /etc/ansible/ansible.cfg as config file [WARNING]: provided hosts list is empty, only localhost is available Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc PLAYBOOK: playbook.yml ********************************************************* 1 plays in playbook.yml PLAY [localhost] *************************************************************** TASK [setup] ******************************************************************* Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: ubuntu &lt;127.0.0.1&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035 `" &amp;&amp; echo ansible-tmp-1488405550.52-260200123218035="` echo ~/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035 `" ) &amp;&amp; sleep 0' &lt;127.0.0.1&gt; PUT /tmp/tmpF6ZqnV TO /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py &lt;127.0.0.1&gt; EXEC /bin/sh -c 'chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/ /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py &amp;&amp; sleep 0' &lt;127.0.0.1&gt; EXEC /bin/sh -c '/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/setup.py; rm -rf "/home/ubuntu/.ansible/tmp/ansible-tmp-1488405550.52-260200123218035/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0' ok: [localhost] TASK [A : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/A/tasks/main.yml:2 ok: [localhost] =&gt; { "msg": "A" } TASK [A : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/A/tasks/main.yml:2 ok: [localhost] =&gt; { "msg": "A" } TASK [B : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/B/tasks/main.yml:2 ok: [localhost] =&gt; { "msg": "B" } TASK [C : debug] *************************************************************** task path: /home/ubuntu/demo-ansible-multiple_role-bug/roles/C/tasks/main.yml:2 ok: [localhost] =&gt; { "msg": "C" } PLAY RECAP ********************************************************************* localhost : ok=5 changed=0 unreachable=0 failed=0 </code></pre></div>
0
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/factorialize-a-number#?solution=var%20numberValue%20%3D%201%3B%0Afunction%20factorialize(num)%20%7B%0A%20%20for%20(i%3D1%3B%20i%3C%3D%20num%3B%20i%2B%2B)%20%7B%0A%20%20%20%20numberValue%20*%3D%20i%3B%0A%20%20%7D%0A%20%20return%20Number(numberValue)%3B%0A%7D%0Afactorialize(0)%3B%0A" rel="nofollow">Factorialize a Number</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.<br> After manually testing all the requirements, the tests do not tick.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var numberValue = 1; function factorialize(num) { for (i=1; i&lt;= num; i++) { numberValue *= i; } return Number(numberValue); } factorialize(0); "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">numberValue</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-s1">num</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-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">&lt;=</span> <span class="pl-s1">num</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">numberValue</span> <span class="pl-c1">*=</span> <span class="pl-s1">i</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-v">Number</span><span class="pl-kos">(</span><span class="pl-s1">numberValue</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/factorialize-a-number#?solution=var%20count%3D1%3B%0Afunction%20factorialize%28num%29%20%7B%0A%20%20for%28var%20i%3D1%3B%20i%3C%3Dnum%3Bi%2B%2B%29%7B%0A%20%20%20%20%0A%20%20%20%20count%3D%20count%20*%20i%3B%0A%20%20%20%20%0A%20%20%7D%0A%20%20return%20count%3B%0A%20%20%0A%7D%0A%0Afactorialize%280%29%3B%0A" rel="nofollow">Factorialize a Number</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 5.1; rv:47.0) Gecko/20100101 Firefox/47.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-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var count=1; function factorialize(num) { for(var i=1; i&lt;=num;i++){ count= count * i; } return count; } factorialize(0); "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">count</span><span class="pl-c1">=</span><span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-s1">num</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">&lt;=</span><span class="pl-s1">num</span><span class="pl-kos">;</span><span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">{</span> <span class="pl-s1">count</span><span class="pl-c1">=</span> <span class="pl-s1">count</span> <span class="pl-c1">*</span> <span class="pl-s1">i</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">count</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">factorialize</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
1
<p dir="auto">Summary/tldr:<br> It would be nice with more String support in the Java API and a tf.reduce_sum which supports string concatenation.</p> <p dir="auto">Body:<br> I have successfully hacked in the custom ops of syntaxnet into the Tensorflow master as I wish to run syntaxnet from my Java NLP pipeline.</p> <p dir="auto">I do this by saving a SavedModelBundle and load it again from Java.</p> <p dir="auto">My project is based on a saved model of parsey_mcparseface from this branch:<br> <a href="https://github.com/dmansfield/models/tree/documents-from-tensor">https://github.com/dmansfield/models/tree/documents-from-tensor</a><br> By user <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dmansfield/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dmansfield">@dmansfield</a>.</p> <p dir="auto">And a tensorflow build based on the custom ops from:<br> <a href="https://github.com/tensorflow/models/tree/master/syntaxnet">https://github.com/tensorflow/models/tree/master/syntaxnet</a><br> Hacked into master of tensorflow.</p> <p dir="auto">Hacking in the ops, as build in ops, was necessary as the Java api through the JNI does not support user loaded ops yet (AFAIK).</p> <p dir="auto">The code with the syntaxnet ops hacked in can be found here:<br> <a href="https://github.com/marhlder/syntaxnet-ops-hack">https://github.com/marhlder/syntaxnet-ops-hack</a></p> <p dir="auto">I have everything running except that the strings in the output tensor from my saved model includes junk (non-printable chars) which I think is due to the offset table described in tensor_jni.cc file.</p> <p dir="auto">I can run the same model from Python without any issues.</p> <p dir="auto">The Java API does currently not seem to support anything but scalar string tensors. It looks like using a scalar string tensor will solve my problem as that part of the codes seems to handle the offset table.</p> <p dir="auto">I would therefore like to reduce the string tensor produced by my parsey mcparseface model.<br> I then found that the tf.reduce_sum does not yet support string concatenation.</p> <p dir="auto">There should already be an op for it:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125057980" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/701" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/701/hovercard" href="https://github.com/tensorflow/tensorflow/issues/701">#701</a></p> <p dir="auto">User <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrry/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrry">@mrry</a> commented that he was looking for a use case for this here:<br> <a href="https://stackoverflow.com/questions/34247374/merge-string-tensors-in-tensorflow" rel="nofollow">https://stackoverflow.com/questions/34247374/merge-string-tensors-in-tensorflow</a></p>
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes</li> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux</li> <li>Tensorflow installed from (source or binary): pip</li> <li>Tensorflow version (use command below): tf-nightly-gpu-2.0-preview | 2.0.0.dev20190204 |</li> <li>Python version: 3.6.8</li> <li>CUDA/cuDNN version: 10.0, V10.0.130</li> <li>GPU model and memory: GeForce RTX 2018 Ti 11GB</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> During the training of a simple "toy-example" classificator using TensorFlow 2.0 and tfds, I'm trying to use the Keras callback in order to log the results and to be able to use TensorBoard. When the first epoch of training ends I get the following error: <code class="notranslate">tensorflow.python.framework.errors_impl.NotFoundError: Resource localhost/logdir:./log/N10tensorflow22SummaryWriterInterfaceE does not exist. [Op:WriteScalarSummary] name: epoch_loss/ </code></p> <p dir="auto"><strong>Describe the expected behavior</strong><br> I expect to be able to use the TensorBoard callback without issues.</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <p dir="auto"><strong>Classificator:</strong><br> This is a toy example based on the inception architecture and it is written inside a <em>model.py</em> file using Keras Functional API.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def inception(input_shape: Tuple[int, int, int]) -&gt; k.Model: # set the input input_img = k.layers.Input(shape=input_shape) tower_1 = k.layers.Conv2D(64, (1, 1), padding=&quot;same&quot;, activation=&quot;relu&quot;)(input_img) tower_1 = k.layers.Conv2D(64, (3, 3), padding=&quot;same&quot;, activation=&quot;relu&quot;)(tower_1) tower_2 = k.layers.Conv2D(64, (1, 1), padding=&quot;same&quot;, activation=&quot;relu&quot;)(input_img) tower_2 = k.layers.Conv2D(64, (5, 5), padding=&quot;same&quot;, activation=&quot;relu&quot;)(tower_2) tower_3 = k.layers.MaxPooling2D((3, 3), strides=(1, 1), padding=&quot;same&quot;)(input_img) tower_3 = k.layers.Conv2D(64, (1, 1), padding=&quot;same&quot;, activation=&quot;relu&quot;)(tower_3) output = k.layers.concatenate([tower_1, tower_2, tower_3], axis=3) output = k.layers.Flatten()(output) out = k.layers.Dense(10, activation=&quot;softmax&quot;)(output) model = k.models.Model(inputs=[input_img], outputs=[out]) print(model.summary()) return model"><pre class="notranslate"><code class="notranslate">def inception(input_shape: Tuple[int, int, int]) -&gt; k.Model: # set the input input_img = k.layers.Input(shape=input_shape) tower_1 = k.layers.Conv2D(64, (1, 1), padding="same", activation="relu")(input_img) tower_1 = k.layers.Conv2D(64, (3, 3), padding="same", activation="relu")(tower_1) tower_2 = k.layers.Conv2D(64, (1, 1), padding="same", activation="relu")(input_img) tower_2 = k.layers.Conv2D(64, (5, 5), padding="same", activation="relu")(tower_2) tower_3 = k.layers.MaxPooling2D((3, 3), strides=(1, 1), padding="same")(input_img) tower_3 = k.layers.Conv2D(64, (1, 1), padding="same", activation="relu")(tower_3) output = k.layers.concatenate([tower_1, tower_2, tower_3], axis=3) output = k.layers.Flatten()(output) out = k.layers.Dense(10, activation="softmax")(output) model = k.models.Model(inputs=[input_img], outputs=[out]) print(model.summary()) return model </code></pre></div> <p dir="auto"><strong>Training code:</strong><br> The training code it is inside a <em>test.py</em> file and use the <code class="notranslate">tfds</code> to import the datasets and the Keras <code class="notranslate">fit</code> function to train.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow_datasets as tfds import tensorflow as tf from tensorflow import keras as k import multiprocessing import model DATADIR = &quot;/run/media/federico/XData/tensorflow_datasets&quot; CLASSES = 10 EPOCHS = 25 BATCH = 128 LRATE = 0.01 DECAY = LRATE / EPOCHS # this is applied to every single data passed def process_features(feature): image, label = feature[&quot;image&quot;], feature[&quot;label&quot;] # image conversion into [0, 1] image = image / 255 image = tf.cast(image, tf.float32) feature[&quot;image&quot;] = image # label conversion into one-hot print(label) label = tf.one_hot(label, CLASSES) feature[&quot;label&quot;] = label return feature # print(tfds.list_builders()) dataset, dataset_info = tfds.load(name=&quot;cifar10&quot;, data_dir=DATADIR, with_info=True) train_dataset, test_dataset = dataset[&quot;train&quot;], dataset[&quot;test&quot;] # process features train_dataset = ( train_dataset.map(process_features, num_parallel_calls=multiprocessing.cpu_count()) .shuffle(1000) .batch(BATCH) .repeat(EPOCHS) # .prefetch(10) ) test_dataset = test_dataset.map( process_features, num_parallel_calls=multiprocessing.cpu_count() ).batch(dataset_info.splits[&quot;test&quot;].get_proto().statistics.num_examples) for f in test_dataset: images_t, labels_t = f[&quot;image&quot;], f[&quot;label&quot;] model = model.inception(dataset_info.features[&quot;image&quot;].shape) # compile the model model.compile( optimizer=k.optimizers.RMSprop(learning_rate=LRATE, decay=DECAY), loss=k.losses.categorical_crossentropy, metrics=[k.metrics.categorical_accuracy], ) tbCallback = [ k.callbacks.TensorBoard( log_dir=&quot;./log&quot;, histogram_freq=0, write_graph=False, write_images=False ) ] # tbCallback = [k.callbacks.TensorBoard(log_dir='./log')] step = 0 for f in train_dataset: images, labels = f[&quot;image&quot;], f[&quot;label&quot;] step += 1 model.fit( images, labels, validation_data=(images_t, labels_t), steps_per_epoch=100, epochs=1, batch_size=BATCH, callbacks=tbCallback, ) "><pre class="notranslate"><code class="notranslate">import tensorflow_datasets as tfds import tensorflow as tf from tensorflow import keras as k import multiprocessing import model DATADIR = "/run/media/federico/XData/tensorflow_datasets" CLASSES = 10 EPOCHS = 25 BATCH = 128 LRATE = 0.01 DECAY = LRATE / EPOCHS # this is applied to every single data passed def process_features(feature): image, label = feature["image"], feature["label"] # image conversion into [0, 1] image = image / 255 image = tf.cast(image, tf.float32) feature["image"] = image # label conversion into one-hot print(label) label = tf.one_hot(label, CLASSES) feature["label"] = label return feature # print(tfds.list_builders()) dataset, dataset_info = tfds.load(name="cifar10", data_dir=DATADIR, with_info=True) train_dataset, test_dataset = dataset["train"], dataset["test"] # process features train_dataset = ( train_dataset.map(process_features, num_parallel_calls=multiprocessing.cpu_count()) .shuffle(1000) .batch(BATCH) .repeat(EPOCHS) # .prefetch(10) ) test_dataset = test_dataset.map( process_features, num_parallel_calls=multiprocessing.cpu_count() ).batch(dataset_info.splits["test"].get_proto().statistics.num_examples) for f in test_dataset: images_t, labels_t = f["image"], f["label"] model = model.inception(dataset_info.features["image"].shape) # compile the model model.compile( optimizer=k.optimizers.RMSprop(learning_rate=LRATE, decay=DECAY), loss=k.losses.categorical_crossentropy, metrics=[k.metrics.categorical_accuracy], ) tbCallback = [ k.callbacks.TensorBoard( log_dir="./log", histogram_freq=0, write_graph=False, write_images=False ) ] # tbCallback = [k.callbacks.TensorBoard(log_dir='./log')] step = 0 for f in train_dataset: images, labels = f["image"], f["label"] step += 1 model.fit( images, labels, validation_data=(images_t, labels_t), steps_per_epoch=100, epochs=1, batch_size=BATCH, callbacks=tbCallback, ) </code></pre></div> <p dir="auto"><strong>Other info / logs</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/run/media/federico/XData/PycharmProjectsXData/classificator/test.py&quot;, line 105, in &lt;module&gt; callbacks=tbCallback, File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py&quot;, line 963, in fit steps_name='steps_per_epoch') File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_arrays.py&quot;, line 386, in model_iteration callbacks.on_epoch_end(epoch, epoch_logs) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py&quot;, line 261, in on_epoch_end callback.on_epoch_end(epoch, logs) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py&quot;, line 1389, in on_epoch_end self._write_custom_summaries(step, logs) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py&quot;, line 1335, in _write_custom_summaries summary_ops_v2.scalar(name, value, step=step) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py&quot;, line 564, in scalar return summary_writer_function(name, tensor, function, family=family) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py&quot;, line 508, in summary_writer_function should_record_summaries(), record, _nothing, name=&quot;&quot;) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/framework/smart_cond.py&quot;, line 54, in smart_cond return true_fn() File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py&quot;, line 501, in record with ops.control_dependencies([function(tag, scope)]): File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py&quot;, line 562, in function name=scope) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/gen_summary_ops.py&quot;, line 727, in write_scalar_summary writer, step, tag, value, name=name, ctx=_ctx) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/gen_summary_ops.py&quot;, line 763, in write_scalar_summary_eager_fallback attrs=_attrs, ctx=_ctx, name=name) File &quot;/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/eager/execute.py&quot;, line 66, in quick_execute six.raise_from(core._status_to_exception(e.code, message), None) File &quot;&lt;string&gt;&quot;, line 3, in raise_from tensorflow.python.framework.errors_impl.NotFoundError: Resource localhost/logdir:./log/N10tensorflow22SummaryWriterInterfaceE does not exist. [Op:WriteScalarSummary] name: epoch_loss/"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/run/media/federico/XData/PycharmProjectsXData/classificator/test.py", line 105, in &lt;module&gt; callbacks=tbCallback, File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 963, in fit steps_name='steps_per_epoch') File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_arrays.py", line 386, in model_iteration callbacks.on_epoch_end(epoch, epoch_logs) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py", line 261, in on_epoch_end callback.on_epoch_end(epoch, logs) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py", line 1389, in on_epoch_end self._write_custom_summaries(step, logs) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py", line 1335, in _write_custom_summaries summary_ops_v2.scalar(name, value, step=step) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py", line 564, in scalar return summary_writer_function(name, tensor, function, family=family) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py", line 508, in summary_writer_function should_record_summaries(), record, _nothing, name="") File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/framework/smart_cond.py", line 54, in smart_cond return true_fn() File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py", line 501, in record with ops.control_dependencies([function(tag, scope)]): File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/summary_ops_v2.py", line 562, in function name=scope) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/gen_summary_ops.py", line 727, in write_scalar_summary writer, step, tag, value, name=name, ctx=_ctx) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/ops/gen_summary_ops.py", line 763, in write_scalar_summary_eager_fallback attrs=_attrs, ctx=_ctx, name=name) File "/run/media/federico/XData/virtualenvs/python36_tf2preview/lib/python3.6/site-packages/tensorflow/python/eager/execute.py", line 66, in quick_execute six.raise_from(core._status_to_exception(e.code, message), None) File "&lt;string&gt;", line 3, in raise_from tensorflow.python.framework.errors_impl.NotFoundError: Resource localhost/logdir:./log/N10tensorflow22SummaryWriterInterfaceE does not exist. [Op:WriteScalarSummary] name: epoch_loss/ </code></pre></div>
0
<p dir="auto">Below is my code to reproduce problem:</p> <p dir="auto">function downloadFile(fileName, content){<br> var aLink = document.createElement('a');<br> var blob = new Blob([content]);<br> var evt = document.createEvent("HTMLEvents");<br> evt.initEvent("click", false, false);<br> aLink.download = fileName;<br> aLink.href = URL.createObjectURL(blob);<br> aLink.dispatchEvent(evt);<br> }</p> <p dir="auto">This function work well in chrome but atom/electron.</p> <p dir="auto">Then, I tried the other way like this:</p> <pre class="notranslate">&lt;a href="http://example.com/xxx.zip" download="xxx.zip"&gt;download&lt;/a&gt; </pre> <p dir="auto">it also doesn't work properly</p>
<p dir="auto">Thanks for the nice project, folks.</p> <p dir="auto">I'm using electron to wrap our web application in a webview and distribute this application this way.</p> <p dir="auto">Unfortunately we discovered that links with the <code class="notranslate">download</code> attribute don't work.</p> <p dir="auto">E.g. <a href="http://davidwalsh.name/demo/html5-download.php" rel="nofollow">http://davidwalsh.name/demo/html5-download.php</a></p> <p dir="auto">Works perfectly fine in Chrome but unfortunately does not inside of the webview in electron.</p> <p dir="auto">I digged the issues already and couldn't find any information on this specific case.</p> <p dir="auto">Any ideas on this are more than welcome. <img class="emoji" title=":bowtie:" alt=":bowtie:" src="https://github.githubassets.com/images/icons/emoji/bowtie.png" height="20" width="20" align="absmiddle"></p> <p dir="auto">Thanks. :)</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=krancour" rel="nofollow">Kent Rancourt</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8485?redirect=false" rel="nofollow">SPR-8485</a></strong> and commented</p> <p dir="auto">HTML5 supports a variety of new form field input types such as "email," "tel," and "date" (to name a few). e.g. &lt;input type="email".../&gt; In all known cases, browsers that don't understand these new field types gracefully degrade to type "text." Since these new field types permit modern browsers (especially mobile browsers) to handle certain fields in a special manner (e.g. bring up different variant of on-screen keyboard conducive to the type of field being edited) and because they degrade gracefully, they're quickly becoming popular to use, but unfortunately, Spring MVC's form-binding tags don't currently permit use of these new field types. i.e. there is no form:email or form:tel tag. It seems it would be rather simple to include these by extending org.springframework.web.servlet.tags.form.InputTag to change the field type, in much the same way that org.springframework.web.servlet.tags.form.PasswordInputTag already does.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1 M2</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="398114539" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13336" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13336/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13336">#13336</a> Duplicate "type" attribute rendered in JSP InputTag</li> </ul> <p dir="auto">8 votes, 14 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/[email protected]" rel="nofollow">Arthur</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3030?redirect=false" rel="nofollow">SPR-3030</a></strong> and commented</p> <p dir="auto">When creating beans such as a JNDITemplate it is often desireable to have a container supply the provider URL and other configuration options via Environment entries. I find it is generally not a great idea swap applicationContext files using a build script because it adds another layer of complexitity to the build process. Therefore I prefer having different deployment descriptors on different test/production servers with different Environment settings. The real benefit comes with the ability for certain containers to update these Environment entries during runtime such as if a provider URL becomes inaccessible. I propose a JNDI Property Placehold Configurer which will do java:comp/env/ lookups to fill in the appropriate property values.</p> <p dir="auto">Example usage would be as follows:</p> <p dir="auto">&lt;bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"&gt;<br> &lt;constructor-arg index="0"&gt;<br> &lt;props&gt;<br> &lt;prop key="java.naming.factory.initial"&gt;${java.naming.factory.initial}&lt;/prop&gt;<br> &lt;prop key="java.naming.provider.url"&gt;${java.naming.provider.url}&lt;/prop&gt;<br> &lt;prop key="java.naming.factory.url.pkgs"&gt;${java.naming.factory.url.pkgs}&lt;/prop&gt;<br> &lt;/props&gt;<br> &lt;/constructor-arg&gt;<br> &lt;/bean&gt;<br> I will attach a working version I have been using for several months now.</p> <hr> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/15611/JndiAwarePropertyPlaceholderConfigurer.zip" rel="nofollow">JndiAwarePropertyPlaceholderConfigurer.zip</a> (<em>2.82 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/12492/JndiPropertiesFactoryBean.java" rel="nofollow">JndiPropertiesFactoryBean.java</a> (<em>4.47 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/12333/JndiPropertyPlaceholderConfigurer.java" rel="nofollow">JndiPropertyPlaceholderConfigurer.java</a> (<em>7.98 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398057073" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5690" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5690/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5690">#5690</a> Configurer that resolves placeholders as environment entries (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398110685" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12693" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12693/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12693">#12693</a> Register JndiPropertySource by default in StandardPortletEnvironment</li> </ul> <p dir="auto">10 votes, 6 watchers</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/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.2</li> <li>域名解析示例:<br> 10.0.0.1 zk.foo.com<br> 10.0.0.2 zk.foo.com<br> 10.0.0.3 zk.foo.com<br> 10.0.0.4 zk.foo.com<br> 10.0.0.5 zk.foo.com</li> <li>注册中心:zookeeper</li> </ul> <p dir="auto">在生产环境中要求只能使用域名,注册中心的域名解析如示例中所示,Dubbo框架在创建注册中心时,会对域名进行解析,且只取其中一个IP,这会导致每次解析获得的IP有可能不一样,有可能出现如下问题:<br> 1、解析获取到不一样的IP的时候,会再次创建一个注册中心实例,导致和注册中心建立多个连接。<br> 2、如果始终解析到的是一个IP,如果该注册中心节点不可以,zookeeper客户端也没有可重试的IP,那么会导致应用与注册中心的会话失效,导致临时服务节点被删除。<br> 下面是获取注册中心Key的代码:<br> <a href="https://github.com/apache/incubator-dubbo/blob/e6b0bc8a856abd7f2d7a2e0f06ccc78dc90e2e0a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java#L88">https://github.com/apache/incubator-dubbo/blob/e6b0bc8a856abd7f2d7a2e0f06ccc78dc90e2e0a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java#L88</a><br> 就是在该方法中将域名解析成单一的IP,是否可以考虑将该实现换成不解析域名的方法:<br> <a href="https://github.com/apache/incubator-dubbo/blob/7a48fac84b14ac6a21c1bdfc5958705dd8dda84d/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java#L498-L500">https://github.com/apache/incubator-dubbo/blob/7a48fac84b14ac6a21c1bdfc5958705dd8dda84d/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java#L498-L500</a><br> 将域名解析的任务交给zookeeper客户端完成,zookeeper客户端默认会将域名解析成IP列表。</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/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>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
0
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">Feature Idea</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">core</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">2.1</p> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <h5 dir="auto">SUMMARY</h5> <p dir="auto">As ansible has some long keys without shortcuts (like <code class="notranslate">--vault-password-file</code> or <code class="notranslate">--force-handlers</code>) it really misses autocompletion. I've found a <a href="https://github.com/dysosmus/ansible-completion">script</a> that seem to work fine but had just a quick look on it. It would be really nice to ship one with ansible distribution.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <h5 dir="auto">EXPECTED RESULTS</h5> <h5 dir="auto">ACTUAL RESULTS</h5>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Feature idea</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto"><a href="https://github.com/scop/bash-completion">bash-completion script</a></p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">Not a feature in current devel branch.</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">I use Debian with a Bash shell and source the completion scripts in <code class="notranslate">/usr/share/bash-completion/completions</code>. I searched open issues and there were none that addressed exactly this. I could be mistaken but it seems overlooked.</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Ansible is all about automating right? Being able to do things faster. This will help SIGNIFICANTLY being to tab-autocomplete an option or command, since most people are executing them from a terminal.</p> <p dir="auto">Also, the other tools have some.</p> <ul dir="auto"> <li><a href="https://github.com/scop/bash-completion/blob/master/completions/puppet">Puppet's bash-completion</a> is in the official repo.</li> <li>Various <a href="https://github.com/wk8/knife-bash-autocomplete/blob/master/knife_autocomplete.sh">1</a> <a href="https://gist.github.com/avishai-ish-shalom/1050685">2</a> for Chef's knife command. '</li> <li>And shell completion scripts are also available for <a href="https://docs.saltstack.com/en/2015.5/ref/cli/index.html#cli-completion" rel="nofollow">Salt</a>.</li> <li>Not to mention <a href="https://docs.docker.com/compose/completion/" rel="nofollow">Docker</a> and <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion" rel="nofollow">Kubernetes</a> it's built-in!</li> </ul> <p dir="auto">I haven't written any of these completion scripts just yet, they look a little janky, so I don't know if I'm up for it, but I think it's a great idea for a priority issue.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
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/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> <h2 dir="auto">Current Behavior</h2> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li></li> <li></li> <li></li> <li></li> </ol> <h2 dir="auto">Context</h2> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td></td> </tr> <tr> <td>node</td> <td></td> </tr> <tr> <td>OS</td> <td></td> </tr> <tr> <td>browser</td> <td></td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
<h1 dir="auto">Feature request</h1> <p dir="auto">Example using Next JS with Google Ad Sense</p> <h2 dir="auto">Is your feature request related to a problem? Please describe.</h2> <p dir="auto">Yes, having an example would be good</p> <p dir="auto">A clear and concise description of what you want and what your use case is.<br> Running a next js app with Example using Next JS with Google Ad Sense</p> <h2 dir="auto">Describe the solution you'd like</h2> <p dir="auto">the example of Example using Next JS with Google Ad Sense</p> <p dir="auto">A clear and concise description of what you want to happen.</p>
0
<p dir="auto">Calculating a Jacobian returns substantially different answers on CPU vs. TPU.</p> <p dir="auto">In the example below, we calculate the Jacobian, sum its rows and compare it to the gradient of the sum (calculated using gradient). When running on CPU, the answers are indeed almost identical, however, when running on TPU we get a large discrepancy.</p> <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 rng = jax.random.PRNGKey(0) n = 1000 m = 10000 A = jax.random.normal(rng, (n, m)) def f(x): return jnp.dot(A, x) g = jax.jit(jax.jacrev(f)) g_sum = jax.jit(jax.grad(lambda x: jnp.sum((f(x))))) x0 = jax.random.normal(rng, (m,)) print(&quot;max numerical error = &quot;, jnp.max(jnp.abs(jnp.sum(g(x0), axis=0) - g_sum(x0))))"><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-s1">rng</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">0</span>) <span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-c1">1000</span> <span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-c1">10000</span> <span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">rng</span>, (<span class="pl-s1">n</span>, <span class="pl-s1">m</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">jnp</span>.<span class="pl-en">dot</span>(<span class="pl-v">A</span>, <span class="pl-s1">x</span>) <span class="pl-s1">g</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">jit</span>(<span class="pl-s1">jax</span>.<span class="pl-en">jacrev</span>(<span class="pl-s1">f</span>)) <span class="pl-s1">g_sum</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-en">jit</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">jnp</span>.<span class="pl-en">sum</span>((<span class="pl-en">f</span>(<span class="pl-s1">x</span>))))) <span class="pl-s1">x0</span> <span class="pl-c1">=</span> <span class="pl-s1">jax</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">rng</span>, (<span class="pl-s1">m</span>,)) <span class="pl-en">print</span>(<span class="pl-s">"max numerical error = "</span>, <span class="pl-s1">jnp</span>.<span class="pl-en">max</span>(<span class="pl-s1">jnp</span>.<span class="pl-en">abs</span>(<span class="pl-s1">jnp</span>.<span class="pl-en">sum</span>(<span class="pl-en">g</span>(<span class="pl-s1">x0</span>), <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">0</span>) <span class="pl-c1">-</span> <span class="pl-en">g_sum</span>(<span class="pl-s1">x0</span>))))</pre></div> <p dir="auto">When running g on TPU we get</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; max numerical error = 0.21506119"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; max numerical error = 0.21506119 </code></pre></div> <p dir="auto">and on CPU we get</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; max numerical error = 0.0001449585"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; max numerical error = 0.0001449585 </code></pre></div>
<p dir="auto">Follow-up from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="559452832" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/2161" data-hovercard-type="issue" data-hovercard-url="/google/jax/issues/2161/hovercard" href="https://github.com/google/jax/issues/2161">#2161</a>:</p> <p dir="auto">The default low precision is a bit of a footgun, at least when doing anything that isn't implementing a neural net layer. In my opinion, it would be much safer to use "highest" precision by default (which isn't that much slower) on float32 data. Neural net libraries, of course, can default to lower precision, so this really only effects users who directly use NumPy APIs or the @ infix operator.</p>
1
<p dir="auto">I've seen a multitude of warnings in the docs build that reflected incorrect formatting and/or broken docs in the docs build. We should enforce a "no-warnings-allowed" situation for the docs.</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a></p>
<p dir="auto">should be easy to implement with <code class="notranslate">diagonal</code>.</p>
0
<p dir="auto"><strong>I'm submitting a ...</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] feature request"><pre class="notranslate"><code class="notranslate">[X] feature request </code></pre></div> <h3 dir="auto">Problem statement:</h3> <p dir="auto">An app with NgModule structure <code class="notranslate">AppModule</code> -&gt; <code class="notranslate">LabsFormsModule</code> -&gt; <code class="notranslate">TemplateModule</code>, <code class="notranslate">ModelFormControlsModule</code>, <code class="notranslate">ModelFormBuilderModule</code> (3 children)</p> <p dir="auto">Each child module has defined routes <code class="notranslate">RouterModule.forChild(ROUTES)</code></p> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">Now if these modules are imported in <code class="notranslate">LabsFormsModule</code> then the routes are flattened and they are loaded in <code class="notranslate">router-outlet</code> of <code class="notranslate">AppModule</code>. Whereas the intented behavior is that they be loaded in <code class="notranslate">LabsFormsModule</code>.<br> Upon discussion on Gitter, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/brandonroberts/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/brandonroberts">@brandonroberts</a> pointed that this is by design because ParentModule and imported modules shares same context.<br> Also, Only one injector is created for the ParentModule and imports.</p> <p dir="auto">To achive composition, we need to lazy load each of the three modules, then the hierarchy will be maintained.<br> But these 3 modules are small and are not fit to be loaded lazily, but hierarchy of modules is needed.</p> <p dir="auto">Another alternative is, we define Routes on <code class="notranslate">LabsFormsModule</code> to load them in <code class="notranslate">router-outlet</code> of <code class="notranslate">LabsFormsModule</code> but then we need to import component from inside child modules in <code class="notranslate">forms.routes.ts</code> file and add them to the routes. This breaks the module concepts.<br> Components inside child modules are not public and should not be accessed outside of Module. also to be addressable outside of module, components needs to be added to <code class="notranslate">exports</code>, In short we are forcing internal implementations to be made public just to support Routing defined in Parent module<br> See: <a href="https://github.com/sirajc/angular2-labs/tree/master/src/app/forms">https://github.com/sirajc/angular2-labs/tree/master/src/app/forms</a></p> <p dir="auto"><strong>Expected/desired behavior</strong></p> <h3 dir="auto">Proposal: Support Hierarchy of modules</h3> <ol dir="auto"> <li>While defining child module routes</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="RouterModule.forChild(ROUTES, asChildren /*boolean*/)"><pre class="notranslate"><code class="notranslate">RouterModule.forChild(ROUTES, asChildren /*boolean*/) </code></pre></div> <p dir="auto">But this has conflicts with context and injector</p> <ol dir="auto"> <li>Enable NgModules as children</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ path: 'forms', component: 'FormsComponent', childModules: [ TemplateModule, ModelFormControlsModule, ModelFormBuilderModule ] }"><pre class="notranslate"><code class="notranslate">{ path: 'forms', component: 'FormsComponent', childModules: [ TemplateModule, ModelFormControlsModule, ModelFormBuilderModule ] } </code></pre></div> <ol dir="auto"> <li>Child imports in Parent Module</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@NgModule({ imports: [CommonModule], children: [TemplateModule, ModelFormControlsModule, ModelFormBuilderModule], declarations: [FormsComponent] })"><pre class="notranslate"><code class="notranslate">@NgModule({ imports: [CommonModule], children: [TemplateModule, ModelFormControlsModule, ModelFormBuilderModule], declarations: [FormsComponent] }) </code></pre></div> <p dir="auto">Any of the above 3 approach, which seems fit or any other way Angular can provide, that helps creating NgModule hierarchy and routes composition.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> By enabling NgModule as children, we can compose application with NgModule hierarchy without the need for lazy loading each and every module.</p> <ul dir="auto"> <li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</li> </ul>
<p dir="auto">Feature request to support selectors like</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="md-input-container &gt; input"><pre class="notranslate"><code class="notranslate">md-input-container &gt; input </code></pre></div> <p dir="auto">This would help reduce boilerplate for directives where some predetermined structure is required. Some scenarios where this could be useful:</p> <ul dir="auto"> <li>The Angular Material <code class="notranslate">md-input-container</code> (example used above)</li> <li>Any instance where native HTML elements dictate a specific structure, e.g., <code class="notranslate">&lt;table&gt;</code> containing <code class="notranslate">&lt;tr&gt;</code></li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="myCustomTable &gt; tr"><pre class="notranslate"><code class="notranslate">myCustomTable &gt; tr </code></pre></div> <p dir="auto">This should take into consideration the combination of multiple direct-child operators:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="myCustomTable &gt; tr &gt; td"><pre class="notranslate"><code class="notranslate">myCustomTable &gt; tr &gt; td </code></pre></div> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tbosch/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tbosch">@tbosch</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vicb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vicb">@vicb</a></p>
0
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.2 and Nigtly</p> <p dir="auto"><strong>Code</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="private _appendScript (): void { this._script = this._createScriptElement(); console.log(1, this); // pointed on class object let scripts = document.getElementsByTagName('script'); console.log(2, this); // pointed on class object for (let script in scripts) { console.log(3, this); // pointed on Window } // same with //for (let i = 0, len = scripts.length; i &lt; len; i++) { // console.log(4, this); // pointed on Window //} }"><pre class="notranslate"><code class="notranslate">private _appendScript (): void { this._script = this._createScriptElement(); console.log(1, this); // pointed on class object let scripts = document.getElementsByTagName('script'); console.log(2, this); // pointed on class object for (let script in scripts) { console.log(3, this); // pointed on Window } // same with //for (let i = 0, len = scripts.length; i &lt; len; i++) { // console.log(4, this); // pointed on Window //} } </code></pre></div> <p dir="auto">full class code<br> <a href="https://gist.github.com/sanex3339/3efa99e0817d30bb0803#file-wrong-this-capture-L73">https://gist.github.com/sanex3339/3efa99e0817d30bb0803#file-wrong-this-capture-L73</a></p> <p dir="auto">Important note - wrong <code class="notranslate">this</code> capture occurs only in this place, in other classes everythink ok.</p> <p dir="auto"><strong>Expected behavior:</strong></p> <p dir="auto"><code class="notranslate">this</code> inside for loops must pointed on class object</p> <p dir="auto"><strong>Actual behavior:</strong><br> <code class="notranslate">this</code> inside for loops is pointed on <code class="notranslate">Window</code></p>
<p dir="auto">There have been a few cases reported by customers that using <code class="notranslate">--watch</code> has been on the slow side. We should elicit feedback to understand what's going on.</p> <p dir="auto">Examples:</p> <ul dir="auto"> <li><a href="https://www.reddit.com/r/typescript/comments/48rzzq/protip_what_to_do_to_solve_the_current_slowness/" rel="nofollow">https://www.reddit.com/r/typescript/comments/48rzzq/protip_what_to_do_to_solve_the_current_slowness/</a></li> <li><a href="https://gitter.im/Microsoft/TypeScript?at=56d86d9906ba9a282a28ecf1" rel="nofollow">https://gitter.im/Microsoft/TypeScript?at=56d86d9906ba9a282a28ecf1</a></li> </ul>
0
<p dir="auto">Here's an example:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/791485/13717982/e8178412-e7e5-11e5-8b49-86b6774fb5c2.PNG"><img src="https://cloud.githubusercontent.com/assets/791485/13717982/e8178412-e7e5-11e5-8b49-86b6774fb5c2.PNG" alt="capture" style="max-width: 100%;"></a></p> <p dir="auto">Here's the code:<br> <a href="http://pastebin.com/gwSzquA0" rel="nofollow">http://pastebin.com/gwSzquA0</a></p> <p dir="auto">The cause lies in the for loop declaration. It happens for <code class="notranslate">i&lt;</code> , but not for <code class="notranslate">i &lt;</code>, so the parser does something wrong there. Note the extra space.</p>
<ul dir="auto"> <li>VSCode Version: 0.10.11</li> <li>OS Version: win10 10586.164</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>open folder containing clone of remote origin master</li> <li>click on git branch status area in bottom left corner, or enter ctrl+p or f1+&gt;Git: Checkout, and enter name of remote origin branch you want to local copy to reference. the git ouput window shows "git checkout -q -b someTopicBranch" and "git fetch" were executed.</li> <li>folder doesn't contain copy of remote origin topic branch so from command line enter "git.exe config -l --local" where you'll see that branch.someTopicBranch.remote/.merge entries are not present</li> <li>from command line enter "git branch -u origin/someTopicBranch" or "git branch --set-upstream-to=someTopicBranch" to update local config to contain branch.someTopicBranch.remote/.merge entries</li> <li>from vscode you can now use git | ... | pull == "git pull" to retrieve the contents of the remote origin someTopicBranch that already existed</li> </ol> <p dir="auto">My thinking is that steps 3 thru 5 should be automated for you in case where you are not looking to create new topic branch and optionally later push it into remote origin but rather create local repo topic branch into which you sync the details of remote origin copy of topic branch that already exists.</p>
0
<p dir="auto">The new JSX transform don't support preact from <code class="notranslate">deno.json</code>:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;compilerOptions&quot;: { &quot;jsx&quot;: &quot;react-jsx&quot;, &quot;jsxImportSource&quot;: &quot;https://esm.sh/preact&quot;, &quot;lib&quot;: [ &quot;dom&quot;, &quot;deno.ns&quot; ] } }"><pre class="notranslate">{ <span class="pl-ent">"compilerOptions"</span>: { <span class="pl-ent">"jsx"</span>: <span class="pl-s"><span class="pl-pds">"</span>react-jsx<span class="pl-pds">"</span></span>, <span class="pl-ent">"jsxImportSource"</span>: <span class="pl-s"><span class="pl-pds">"</span>https://esm.sh/preact<span class="pl-pds">"</span></span>, <span class="pl-ent">"lib"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>dom<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>deno.ns<span class="pl-pds">"</span></span> ] } }</pre></div> <p dir="auto">but with <code class="notranslate">@jsxImportSource</code> comment works:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @jsxImportSource https://esm.sh/preact */ export default () =&gt; &lt;h1&gt;Hi&lt;/h1&gt;"><pre class="notranslate"><span class="pl-c">/** <span class="pl-k">@jsxImportSource</span> https://esm.sh/preact */</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span>Hi<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h1</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">__</p> <p dir="auto">deno 1.17.1 (release, aarch64-apple-darwin)<br> v8 9.7.106.15<br> typescript 4.5.2</p>
<p dir="auto">I'm not sure if it's known but it seems remote dynamic import is quite slow. For example</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="async function main() { const t = performance.now(); await Promise.all([ import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), ]); console.log(performance.now() - t); } await main();"><pre class="notranslate"><span class="pl-k">async</span> <span class="pl-k">function</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">const</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">performance</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">performance</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">-</span> <span class="pl-s1">t</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">await</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Above took approx. 55 ms with <code class="notranslate">deno run -A --no-check ./test.ts</code>. It seems the number of remote imports in the target file affect the performance.</p> <p dir="auto">Additionally, it seems remote dynamic import does not use cache. For example</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// test.ts async function main() { const t = performance.now(); await Promise.all([ import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), import(&quot;https://deno.land/x/[email protected]/mod.ts&quot;), ]); console.log(performance.now() - t); } await main();"><pre class="notranslate"><span class="pl-c">// test.ts</span> <span class="pl-k">async</span> <span class="pl-k">function</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">const</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">performance</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"https://deno.land/x/[email protected]/mod.ts"</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">performance</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">-</span> <span class="pl-s1">t</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">await</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Above took approx. 500 ms with <code class="notranslate">deno run -A --no-check ./test.ts</code> even the URL is just repeated.</p>
0
<p dir="auto">With the latest 2.5 dev branch (but also with v2.5.0-BETA1), it's no longer possible to serialize a FormView instance. When trying, <code class="notranslate">Exception: Serialization of 'Closure' is not allowed</code> is thrown, see <a href="https://travis-ci.org/craue/TwigExtensionsBundle/builds/24253905" rel="nofollow">https://travis-ci.org/craue/TwigExtensionsBundle/builds/24253905</a>.</p> <p dir="auto">This would be needed for <a href="https://github.com/craue/TwigExtensionsBundle/blob/dc4ffd5e5239c50c5d7b0fa7fe10fae40ebe653b/Twig/Extension/FormExtension.php#L73">https://github.com/craue/TwigExtensionsBundle/blob/dc4ffd5e5239c50c5d7b0fa7fe10fae40ebe653b/Twig/Extension/FormExtension.php#L73</a> to work.</p>
<p dir="auto">Hi all,</p> <p dir="auto">I have a weird issue that I can't figure out why.</p> <p dir="auto">I have an entity <code class="notranslate">User</code>, which has a boolean field <code class="notranslate">enabled</code>. When I try to update the entity with a form, all other non-boolean fields are updated, only the booleans are always set to true. I dumped <code class="notranslate">$request-&gt;request-&gt;get('form_name')</code>, the result looks like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="UserController.php on line 108: array:1 [▼ &quot;form_name&quot; =&gt; array:12 [▼ ... &quot;enabled&quot; =&gt; &quot;0&quot; ... ] ]"><pre class="notranslate"><code class="notranslate">UserController.php on line 108: array:1 [▼ "form_name" =&gt; array:12 [▼ ... "enabled" =&gt; "0" ... ] ] </code></pre></div> <p dir="auto">And I call <code class="notranslate">$form-&gt;handleRequest($request)</code>, then I dumped the entity, expecting it to be updated.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="UserController.php on line 109: User {#3066 ▼ ... #enabled: true ..."><pre class="notranslate"><code class="notranslate">UserController.php on line 109: User {#3066 ▼ ... #enabled: true ... </code></pre></div> <p dir="auto">I don't really understand now, it happens to this particular form, I haven't had such a problem before, and I run out of ideas as to why it happens.</p> <p dir="auto">As an interim solution, I set the boolean values directly on the entity after the <code class="notranslate">handleRequest()</code> call. Something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$form-&gt;handleRequest($request); // set the boolean fields on the entity because handleRequest can't update these fields for some reason $user-&gt;setEnabled(!!$data['form_name']['enabled']);"><pre class="notranslate"><code class="notranslate">$form-&gt;handleRequest($request); // set the boolean fields on the entity because handleRequest can't update these fields for some reason $user-&gt;setEnabled(!!$data['form_name']['enabled']); </code></pre></div>
0
<h5 dir="auto">Issue Type:</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">Ansible Version:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~ # ansible-playbook --version ansible-playbook 2.0.0.2 config file = configured module search path = Default w/o overrides ~ # ansible --version ansible 2.0.0.2 config file = configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">~ # ansible-playbook --version ansible-playbook 2.0.0.2 config file = configured module search path = Default w/o overrides ~ # ansible --version ansible 2.0.0.2 config file = configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">Ansible Configuration:</h5> <p dir="auto">ansible.cfg</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults] hostfile = ./hosts nocows = 1 ansible_managed = Ansible managed, do not edit directly: {file} by {uid} on {host} [ssh_connection] ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ForwardAgent=yes pipelining=True "><pre class="notranslate"><code class="notranslate">[defaults] hostfile = ./hosts nocows = 1 ansible_managed = Ansible managed, do not edit directly: {file} by {uid} on {host} [ssh_connection] ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ForwardAgent=yes pipelining=True </code></pre></div> <h5 dir="auto">Environment:</h5> <p dir="auto">Ubuntu 12.04.5 LTS<br> Ubuntu 12.04.5 LTS</p> <h5 dir="auto">Summary:</h5> <p dir="auto">Database copy script that has been running pre ansible 2.0 has started failing.</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">Upgrade to ansible 2.0. Difference is that ansible 2.0 isn't picking up the ansible.cfg file that's in the same directory as the playbook and so uses default options for ssh. Don't know why the defaults for ssh fail but the fix is the cd into the directory first. Pre ansible 2.0 looked for config in the current play directory.</p> <h5 dir="auto">Expected Results:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# su copy_database -c '/usr/local/bin/ansible-playbook -f 1 /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml -i / mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/inventory/dev -vvvv' Using /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/ansible.cfg as config file [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Loaded callback default of type stdout, v2.0 1 plays in /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml PLAY [copy database] *********************************************************** TASK [setup] ******************************************************************* &lt;devpitchup.pitchup.com&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;devpitchup.pitchup.com&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=30m -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentica tions=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-% p-%r devpitchup.pitchup.com '/bin/sh -c '&quot;'&quot;'sudo -H -S -n -u root /bin/sh -c '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'echo BECOME-SUCCESS-fgoaqjgnoouwszjfrcebkeazxrevfxfg; LANG=en_GB.UTF-8 LC _ALL=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 /usr/bin/python'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;''&quot;'&quot;'' ok: [devpitchup.pitchup.com] ..."><pre class="notranslate"><code class="notranslate"># su copy_database -c '/usr/local/bin/ansible-playbook -f 1 /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml -i / mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/inventory/dev -vvvv' Using /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/ansible.cfg as config file [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Loaded callback default of type stdout, v2.0 1 plays in /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml PLAY [copy database] *********************************************************** TASK [setup] ******************************************************************* &lt;devpitchup.pitchup.com&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;devpitchup.pitchup.com&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=30m -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentica tions=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-% p-%r devpitchup.pitchup.com '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-fgoaqjgnoouwszjfrcebkeazxrevfxfg; LANG=en_GB.UTF-8 LC _ALL=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 /usr/bin/python'"'"'"'"'"'"'"'"''"'"'' ok: [devpitchup.pitchup.com] ... </code></pre></div> <h5 dir="auto">Actual Results:</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~ # su copy_database -c '/usr/local/bin/ansible-playbook -f 1 /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml -i /mnt/ssd/django/pitchup_prod/ ansible/playbooks/pitchup/inventory/dev -vvvv' No config file found; using defaults [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Loaded callback default of type stdout, v2.0 1 plays in /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml PLAY [copy database] *********************************************************** TASK [setup] ******************************************************************* &lt;devpitchup.pitchup.com&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;devpitchup.pitchup.com&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mi c,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-%p-%r -tt devpitchup. pitchup.com '( umask 22 &amp;&amp; mkdir -p &quot;$( echo $HOME/.ansible/tmp/ansible-tmp-1453287563.5-209169123401042 )&quot; &amp;&amp; echo &quot;$( echo $HOME/.ansible/tmp/ansible-tmp-1453287563.5 -209169123401042 )&quot; )' &lt;devpitchup.pitchup.com&gt; PUT /tmp/tmprYQf0w TO ^/setup &lt;devpitchup.pitchup.com&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-w ith-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-%p-%r '[devpitc hup.pitchup.com]' fatal: [devpitchup.pitchup.com]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;ERROR! failed to transfer file to ^/setup:\nsftp&gt; put /tmp/tmprYQf0w ' ^/setup'\nUploadi ng /tmp/tmprYQf0w to /home/copy_database/ ^/setup\n\nOpenSSH_5.9p1 Debian-5ubuntu1.7, OpenSSL 1.0.1 14 Mar 2012\ndebug1: Reading configuration data /etc/ssh/ssh_co nfig\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client _hello_exchange: master version 4\r\ndebug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\nd ebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25855\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: m ux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension \&quot;[email protected]\&quot; revision 1\r\ndebug2: Ser ver supports extension \&quot;[email protected]\&quot; revision 2\r\ndebug2: Server supports extension \&quot;[email protected]\&quot; revision 2\r\ndebug2: Server supports extension \&quot;[email protected]\&quot; revision 1\r\ndebug3: Sent message fd 3 T:16 I:32698\r\ndebug3: SSH_FXP_REALPATH . -&gt; /home/copy_database\r\ndebug3: Looking up /tmp/tmprYQf0w\ r\ndebug3: Sent message fd 3 T:17 I:32699\r\ndebug3: Received stat reply T:101 I:32699\r\ndebug1: Couldn't stat remote file: No such file or directory\r\ndebug3: Sent m essage SSH2_FXP_OPEN I:32700 P:/home/copy_database/ ^/setup\r\nremote open(\&quot;/home/copy_database/ ^/setup\&quot;): No such file or directory\r\ndebug3: mux_client_ read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n&quot;} NO MORE HOSTS LEFT ************************************************************* PLAY RECAP ********************************************************************* devpitchup.pitchup.com : ok=0 changed=0 unreachable=0 failed=1"><pre class="notranslate"><code class="notranslate">~ # su copy_database -c '/usr/local/bin/ansible-playbook -f 1 /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml -i /mnt/ssd/django/pitchup_prod/ ansible/playbooks/pitchup/inventory/dev -vvvv' No config file found; using defaults [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. Loaded callback default of type stdout, v2.0 1 plays in /mnt/ssd/django/pitchup_prod/ansible/playbooks/pitchup/copy_database.yaml PLAY [copy database] *********************************************************** TASK [setup] ******************************************************************* &lt;devpitchup.pitchup.com&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;devpitchup.pitchup.com&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mi c,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-%p-%r -tt devpitchup. pitchup.com '( umask 22 &amp;&amp; mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1453287563.5-209169123401042 )" &amp;&amp; echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1453287563.5 -209169123401042 )" )' &lt;devpitchup.pitchup.com&gt; PUT /tmp/tmprYQf0w TO ^/setup &lt;devpitchup.pitchup.com&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-w ith-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/copy_database/.ansible/cp/ansible-ssh-%h-%p-%r '[devpitc hup.pitchup.com]' fatal: [devpitchup.pitchup.com]: FAILED! =&gt; {"failed": true, "msg": "ERROR! failed to transfer file to ^/setup:\nsftp&gt; put /tmp/tmprYQf0w ' ^/setup'\nUploadi ng /tmp/tmprYQf0w to /home/copy_database/ ^/setup\n\nOpenSSH_5.9p1 Debian-5ubuntu1.7, OpenSSL 1.0.1 14 Mar 2012\ndebug1: Reading configuration data /etc/ssh/ssh_co nfig\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client _hello_exchange: master version 4\r\ndebug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\nd ebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 25855\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: m ux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension \"[email protected]\" revision 1\r\ndebug2: Ser ver supports extension \"[email protected]\" revision 2\r\ndebug2: Server supports extension \"[email protected]\" revision 2\r\ndebug2: Server supports extension \"[email protected]\" revision 1\r\ndebug3: Sent message fd 3 T:16 I:32698\r\ndebug3: SSH_FXP_REALPATH . -&gt; /home/copy_database\r\ndebug3: Looking up /tmp/tmprYQf0w\ r\ndebug3: Sent message fd 3 T:17 I:32699\r\ndebug3: Received stat reply T:101 I:32699\r\ndebug1: Couldn't stat remote file: No such file or directory\r\ndebug3: Sent m essage SSH2_FXP_OPEN I:32700 P:/home/copy_database/ ^/setup\r\nremote open(\"/home/copy_database/ ^/setup\"): No such file or directory\r\ndebug3: mux_client_ read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n"} NO MORE HOSTS LEFT ************************************************************* PLAY RECAP ********************************************************************* devpitchup.pitchup.com : ok=0 changed=0 unreachable=0 failed=1 </code></pre></div>
<p dir="auto">There's a bug with the apt-python module on older versions of debian when you try to update the cache.</p> <p dir="auto">I've got what I think is a good patch to fix it.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=grzes" rel="nofollow">Grzegorz Grzybek</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6714?redirect=false" rel="nofollow">SPR-6714</a></strong> and commented</p> <p dir="auto">There is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="EvaluationContext context = new StandardEvaluationContext(); context.setRootObject(tesla);"><pre class="notranslate"><code class="notranslate">EvaluationContext context = new StandardEvaluationContext(); context.setRootObject(tesla); </code></pre></div> <p dir="auto">but <code class="notranslate">setRootObject</code> method is undefined for interface <code class="notranslate">EvaluationContext</code>. It probably should be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="StandardEvaluationContext context = new StandardEvaluationContext(); context.setRootObject(tesla);"><pre class="notranslate"><code class="notranslate">StandardEvaluationContext context = new StandardEvaluationContext(); context.setRootObject(tesla); </code></pre></div> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 GA</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="398101606" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11318" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11318/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11318">#11318</a> Bug in SpEL documentation (<em><strong>"duplicates"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=aclement" rel="nofollow">Andy Clement</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6831?redirect=false" rel="nofollow">SPR-6831</a></strong> and commented</p> <p dir="auto">Spin off from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102268" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11411" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11411/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11411">#11411</a>. As described there:</p> <p dir="auto">Although Keiths test now passes, more work is needed in ReflectivePropertyAccessor for a few reasons, but I wouldn't do that so close to a release:</p> <ul dir="auto"> <li>too much duplication in there and its messy</li> <li>the typeDescriptorCache looks unnecessary</li> <li>BeanTypeDescriptors are built separately for property reads and property writes. I did not want to switch to letting the PropertyDescriptor discover setters/getters (with limited time until release) and I didn't want to introduce the new cost of reflectively hunting for the opposing accessor when it may not be used (so hunting for the setter when a field is being read, just so the BeanTypeDescriptor would be fully populated). This means that metadata attached to the 'other accessor' may not make it through to the conversion. So if you annotate the setter, it wont (I dont think) affect the conversion service call for a property read. And if you annotate the getter, it wont affect the conversion service call for a property write. More thought and testing required here. Keith can probably knock up a test that shows this limitation - I'll need to discuss it with him how much of a likely real world issue it is.</li> </ul> <p dir="auto">This Jira is to cover the work to address that.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 GA</p>
0
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report =&gt; search github for a similar issue or PR before submitting [x] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report =&gt; search github for a similar issue or PR before submitting [x] feature request [ ] support request =&gt; 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> When creating a new Observable inside a <code class="notranslate">@Component</code> it won't be automatically disposed once the component is being destroyed (unless it is hooked to an <code class="notranslate">async</code> pipe).</p> <p dir="auto"><strong>Expected behavior</strong><br> I would expect the Observable to be automatically destroyed unless specified not to.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br> Here's a brief implementation of a lazy load mechanism in a chat application:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" lazyLoadMessages() { this.autoScroller = this.autoScroll(); this.subscribeMessages(); // Get total messages count in database so we can have an indication of when to // stop the auto-subscriber this.countMessages().then((messagesCount) =&gt; { Observable // Chain every scroll event .fromEvent(this.scroller, 'scroll') // Remove the scroll listener once all messages have been fetched .takeUntil(this.autoRemoveScrollListener(messagesCount)) // Filter event handling unless we're at the top of the page .filter(() =&gt; !this.scroller.scrollTop) // Prohibit parallel subscriptions .filter(() =&gt; !this.loadingMessages) // Invoke the messages subscription once all the requirements have been met .forEach(() =&gt; this.subscribeMessages()); }); }"><pre class="notranslate"> <span class="pl-en">lazyLoadMessages</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">autoScroller</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">autoScroll</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">subscribeMessages</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Get total messages count in database so we can have an indication of when to</span> <span class="pl-c">// stop the auto-subscriber</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">countMessages</span><span class="pl-kos">(</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">messagesCount</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">Observable</span> <span class="pl-c">// Chain every scroll event</span> <span class="pl-kos">.</span><span class="pl-en">fromEvent</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">scroller</span><span class="pl-kos">,</span> <span class="pl-s">'scroll'</span><span class="pl-kos">)</span> <span class="pl-c">// Remove the scroll listener once all messages have been fetched</span> <span class="pl-kos">.</span><span class="pl-en">takeUntil</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">autoRemoveScrollListener</span><span class="pl-kos">(</span><span class="pl-s1">messagesCount</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c">// Filter event handling unless we're at the top of the page</span> <span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">scroller</span><span class="pl-kos">.</span><span class="pl-c1">scrollTop</span><span class="pl-kos">)</span> <span class="pl-c">// Prohibit parallel subscriptions</span> <span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">loadingMessages</span><span class="pl-kos">)</span> <span class="pl-c">// Invoke the messages subscription once all the requirements have been met</span> <span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">subscribeMessages</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">The code snippet above loads more messages whenever scrolling to the top of the page in the <code class="notranslate">messages</code> page. If I don't stop this Observable manually in the <code class="notranslate">onDestroy</code> callback, there might be a potential memory leak and unnecessary requests made in the background. The full component can be found <a href="https://github.com/Urigo/Ionic2CLI-Meteor-WhatsApp/blob/master/src/pages/messages/messages.ts">here</a>.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> Lots of developers might forget to handle their observations which may lead to a total disaster with unnecessary requests and processes running in the background. Observables should be disposed by default unless specified else wise. It's hard for me to think of a scenario where the developer wants the Observable to keep running in the background despite the fact that the component has been already disposed long ago, it will only cause slow downs and issues.</p> <p dir="auto">It would be a good idea to create a dedicated service called <code class="notranslate">NgObservable</code> where it can be injected to the component and be used to create new Observable instances which are bound to the component. After a brief thinking of how the service should look like led me to the following result, which might inspire you and give you an idea what I'm actually talking about:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { Observable } from &quot;rxjs&quot;; /* Declarations */ // Save duplicate importations export interface NgObservable&lt;T&gt; extends Observable&lt;T&gt; { _keep: boolean; }; // Will define a dynamic interface based on the current version of &quot;rxjs&quot; installed export interface NgObservableService extends Rx.ObservableStatic { readonly keep: NgObservableService; }; /* Implementations */ // Creates new Observable instances through its prototypical methods. // The constructor only holds options which should be applied to these instances export class NgObservableService { private _keep: boolean; constructor({ keep }: { keep?: boolean } = {}) { this._keep = !!keep; } } // Solves &quot;Index signature is missing in type&quot; error: // https://github.com/Microsoft/TypeScript/issues/1887 const IterableObserver = Observable as { [key: string]: any }; // Delegating all kind of Observable factory functions like 'of', 'from' etc. // The advantages of automatically generated prototype are that we're always gonna // be correlated with the currently installed Observable API Object.keys(Observable).forEach((key) =&gt; { const value = IterableObserver[key]; // Delegate function if (typeof value == &quot;function&quot;) { const methodHandler = function () { const observable = value.apply(Observable, arguments); if (observable instanceof Observable) { const ngObservable = observable as NgObservable&lt;any&gt;; ngObservable._keep = this._keep; } return observable; }; Object.defineProperty(NgObservableService.prototype, key, { configurable: true, enumerable: true, writable: true, value: methodHandler }); } // Delegate value else { Object.defineProperty(NgObservableService.prototype, key, { configurable: true, enumerable: true, get() { return IterableObserver[key]; }, set(value) { return IterableObserver[key] = value; } }); } }); // The &quot;keep&quot; getter will make sure that created observables won't be disposed // automatically once their belonging components are being destroyed, // e.g. this.observable.keep.of([1, 2, 3]); Object.defineProperty(NgObservableService.prototype, &quot;keep&quot;, { configurable: true, enumerable: true, get() { return new NgObservableService({ keep: true }); } });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Observable</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"rxjs"</span><span class="pl-kos">;</span> <span class="pl-c">/* Declarations */</span> <span class="pl-c">// Save duplicate importations</span> <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">NgObservable</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-k">extends</span> <span class="pl-smi">Observable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">_keep</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// Will define a dynamic interface based on the current version of "rxjs" installed</span> <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">NgObservableService</span> <span class="pl-k">extends</span> <span class="pl-smi">Rx</span><span class="pl-kos">.</span><span class="pl-smi">ObservableStatic</span> <span class="pl-kos">{</span> <span class="pl-k">readonly</span> <span class="pl-c1">keep</span>: <span class="pl-smi">NgObservableService</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">/* Implementations */</span> <span class="pl-c">// Creates new Observable instances through its prototypical methods.</span> <span class="pl-c">// The constructor only holds options which should be applied to these instances</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">NgObservableService</span> <span class="pl-kos">{</span> <span class="pl-k">private</span> <span class="pl-c1">_keep</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">{</span> keep <span class="pl-kos">}</span>: <span class="pl-kos">{</span> <span class="pl-c1">keep</span>?: <span class="pl-smi">boolean</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_keep</span> <span class="pl-c1">=</span> <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">keep</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c">// Solves "Index signature is missing in type" error:</span> <span class="pl-c">// https://github.com/Microsoft/TypeScript/issues/1887</span> <span class="pl-k">const</span> <span class="pl-smi">IterableObserver</span> <span class="pl-c1">=</span> <span class="pl-smi">Observable</span> <span class="pl-k">as</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">key</span>: <span class="pl-smi">string</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-c">// Delegating all kind of Observable factory functions like 'of', 'from' etc.</span> <span class="pl-c">// The advantages of automatically generated prototype are that we're always gonna</span> <span class="pl-c">// be correlated with the currently installed Observable API</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-smi">Observable</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">forEach</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-smi">IterableObserver</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-c">// Delegate function</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">value</span> <span class="pl-c1">==</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-en">methodHandler</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">observable</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">Observable</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">observable</span> <span class="pl-k">instanceof</span> <span class="pl-smi">Observable</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">ngObservable</span> <span class="pl-c1">=</span> <span class="pl-s1">observable</span> <span class="pl-k">as</span> <span class="pl-smi">NgObservable</span><span class="pl-kos">&lt;</span><span class="pl-smi">any</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-s1">ngObservable</span><span class="pl-kos">.</span><span class="pl-c1">_keep</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">_keep</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">observable</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-smi">NgObservableService</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">configurable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">writable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">value</span>: <span class="pl-s1">methodHandler</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">// Delegate value</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-smi">NgObservableService</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">configurable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">IterableObserver</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-en">set</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">IterableObserver</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">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// The "keep" getter will make sure that created observables won't be disposed</span> <span class="pl-c">// automatically once their belonging components are being destroyed,</span> <span class="pl-c">// e.g. this.observable.keep.of([1, 2, 3]);</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-smi">NgObservableService</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-s">"keep"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">configurable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-en">get</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-k">new</span> <span class="pl-smi">NgObservableService</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">keep</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">The biggest advantage of the code snippet above is that it's generic and it will work with whatever <code class="notranslate">rxjs</code> version currently installed in your project, you don't even need to be worried about maintaining this module. Unfortunately this is not something that can be provided as a third-party service since the auto-disposal mechanism should be hard-coded in the <code class="notranslate">angular</code> library, since a service has not direct effect on a component. The implementation above is only a partial implementation of a bigger picture. I believe there should also be few additions made in the <a href="https://github.com/angular/angular/blob/master/modules/@angular/core/src/application_ref.ts">application_ref.ts</a> file where <code class="notranslate">onDestroy</code> callbacks are being registered.</p> <p dir="auto">Moreover I would like to know why my feature request is not a good idea and what reason do you have to decline it, if at all. Let's discuss about it first and I would like to know your thoughts of such a feature.</p>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report [ ] feature request [ ] support request =&gt; 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 =&gt; 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> I created a new Component and set style using <code class="notranslate">styleUrl</code> property. This works with no problems, but i can't debug it in my browser.</p> <p dir="auto"><strong>Expected/desired behavior</strong><br> Since Angular2 injects the code within <code class="notranslate">&lt;style&gt;</code> tag it prevents styles code to be paired with CSS source files. I would like to get sourcemaps for CSS files.</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> Here is an example of Component:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {Component} from '@angular/core'; @Component({ moduleId: module.id, selector: 'home', templateUrl: 'home.component.html', styleUrls: ['home.component.css'] }) export class HomeComponent { }"><pre class="notranslate"><code class="notranslate">import {Component} from '@angular/core'; @Component({ moduleId: module.id, selector: 'home', templateUrl: 'home.component.html', styleUrls: ['home.component.css'] }) export class HomeComponent { } </code></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong><br> I expect to see sourcemaps for style files in Chrome inspector, but this doesn't happen.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> I would see CSS files mapped in sourcemaps to easily debug style in my projects.</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.4</li> <li><strong>Browser:</strong> Chromium 50.0.2661.102 Built on Ubuntu 14.04, running on LinuxMint 17.2 (64-bit)</li> <li><strong>Language:</strong> TypeScript 1.8.10</li> </ul>
0
<p dir="auto">Hi all,</p> <p dir="auto">I've got some problems with the intl component.</p> <p dir="auto">I have a form where the user can pick a date and a time, but when the time is "cast" in the controller, the hours is two hours back. For example if i pick 10:10 in the form i will have 08:10 in my controller.</p> <p dir="auto">Please take a look at my post (it's french but the important think are the code and the profiler view)<br> <a href="https://openclassrooms.com/forum/sujet/probleme-date-timezone?page=1#message-91356928" rel="nofollow">https://openclassrooms.com/forum/sujet/probleme-date-timezone?page=1#message-91356928</a></p> <p dir="auto">Setting Europe/Zurich in the php.ini doesn't resolve the bug (and the default timezone is set to Europe/Zurich as we can see).</p> <p dir="auto">Removing the intl component fix the bug, so i think i'm missing some configuration at one moment</p> <p dir="auto">Thanks in advance for your help :)</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169390852" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/19531" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/19531/hovercard" href="https://github.com/symfony/symfony/issues/19531">#19531</a></p> <p dir="auto">After merge issue above, there is bug on the DateTimeType::class form type - DateTimeToLocalizedStringTransformer class on branch master.</p> <p dir="auto">My timezone is Europe/Warsaw, +2h from UTC timezone.</p> <p dir="auto">Part of form:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder-&gt;add( 'publishDateEnd', DateTimeType::class, [ 'required' =&gt; false, 'widget' =&gt; 'single_text', 'format' =&gt; 'dd.MM.yyyy HH:mm', 'attr' =&gt; [ 'placeholder' =&gt; 'dd.mm.yyyy HH:mm', ], ]"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span>-&gt;add( <span class="pl-s">'publishDateEnd'</span>, <span class="pl-v">DateTimeType</span>::class, [ <span class="pl-s">'required'</span> =&gt; <span class="pl-c1">false</span>, <span class="pl-s">'widget'</span> =&gt; <span class="pl-s">'single_text'</span>, <span class="pl-s">'format'</span> =&gt; <span class="pl-s">'dd.MM.yyyy HH:mm'</span>, <span class="pl-s">'attr'</span> =&gt; [ <span class="pl-s">'placeholder'</span> =&gt; <span class="pl-s">'dd.mm.yyyy HH:mm'</span>, ], ]</pre></div> <p dir="auto">When for example publishDateEnd is set as 2016-08-01 10:00:00 and I set in the web form date as 2016-08-01 12:00:00, after save form date back to 2016-08-01 10:00:00. Should be saved as 2016-08-01 12:00:00.</p> <p dir="auto">When I add 'view_timezone' =&gt; 'UTC' into widget option, date is display as correct date, but is invalid in database</p> <p dir="auto">My php.ini timezone is set as Europe/Warsaw</p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let f = &amp;[99]; println!(&quot;{:?}&quot;, match [1,2,3,4] { [x, ..xs] =&gt; (x, xs), [] =&gt; (9, f) });"><pre class="notranslate"><code class="notranslate">let f = &amp;[99]; println!("{:?}", match [1,2,3,4] { [x, ..xs] =&gt; (x, xs), [] =&gt; (9, f) }); </code></pre></div> <p dir="auto">Says</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vectors of length 4 not covered"><pre class="notranslate"><code class="notranslate">vectors of length 4 not covered </code></pre></div> <p dir="auto">Should say</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pattern [] is unreachable"><pre class="notranslate"><code class="notranslate">pattern [] is unreachable </code></pre></div>
<p dir="auto">Compiling the following code (with current master) results in "error: non-exhaustive patterns: vectors of length 2 not covered". I don't know if this ought to be valid, but at least the error-message is wrong, because obviously there is a match-branch for vectors of length 2.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() { let x = [1,2]; let y = match x { [] =&gt; None, [a,_] =&gt; Some(a) }; println!(&quot;{}&quot;, y); }"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> x = <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">let</span> y = <span class="pl-k">match</span> x <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-kos">]</span> =&gt; <span class="pl-v">None</span><span class="pl-kos">,</span> <span class="pl-kos">[</span>a<span class="pl-kos">,</span>_<span class="pl-kos">]</span> =&gt; <span class="pl-v">Some</span><span class="pl-kos">(</span>a<span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, y<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
1
<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1> <p dir="auto">Output the token probabilities along with the tokens when generating sequence.</p> <h2 dir="auto">Motivation</h2> <p dir="auto">For understanding model confidence, this is quite useful.<br> Also, for abstractive QA with long contexts, one needs to use doc-strides to take into account the contexts &amp; then choose the best answer according to the probability of the generated text.</p> <h2 dir="auto">Your contribution</h2> <p dir="auto">I can try submitting a PR for non-beam decoding, but guidance would be appreciated.<br> Also, are there any existing solutions to this issue? If so, what &amp; where?</p>
<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1> <p dir="auto">output probabilities of generated sequences in generate function (generation utils)</p> <p dir="auto">thank you so much! :)</p>
1
<h3 dir="auto">It is a...</h3> <p dir="auto"><g-emoji class="g-emoji" alias="lady_beetle" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41e.png">🐞</g-emoji> BUG</p> <h3 dir="auto">What is the current behavior?</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5378891/59242037-a410c680-8c3c-11e9-8b59-1faf8079fb00.png"><img width="953" alt="屏幕快照 2019-06-11 上午11 32 42" src="https://user-images.githubusercontent.com/5378891/59242037-a410c680-8c3c-11e9-8b59-1faf8079fb00.png" style="max-width: 100%;"></a></p> <h3 dir="auto">Reproduce</h3> <p dir="auto"><a href="https://codesandbox.io/s/antd-reproduction-template-7jmkr" rel="nofollow">https://codesandbox.io/s/antd-reproduction-template-7jmkr</a></p> <ol dir="auto"> <li>Quick click <code class="notranslate">Page 1</code> button.</li> <li>Then, quick click <code class="notranslate">Page 2</code> button.</li> </ol> <h3 dir="auto">What is the expected behavior?</h3> <p dir="auto"><code class="notranslate">findDOMNode</code> should work in Suspense</p> <h3 dir="auto">Others</h3> <p dir="auto">related issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="379487104" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/14188" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/14188/hovercard" href="https://github.com/facebook/react/issues/14188">#14188</a></p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">Bug</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">I have a component which listens for resize events (via a BlueprintJS ResizeSensor). When loading a component dynamically with <code class="notranslate">lazy</code> / <code class="notranslate">Suspense</code>, an exception occurs as the resize sensor appears to be unmounted:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught Error: Unable to find node on an unmounted component. at invariant (29.chunk.js:86295) at findCurrentFiberUsingSlowPath (29.chunk.js:90628) at findCurrentHostFiber (29.chunk.js:90640) at findHostInstanceWithWarning (29.chunk.js:106349) at findDOMNode (29.chunk.js:106869) at ResizeSensor.componentDidUpdate (29.chunk.js:10535)"><pre class="notranslate"><code class="notranslate">Uncaught Error: Unable to find node on an unmounted component. at invariant (29.chunk.js:86295) at findCurrentFiberUsingSlowPath (29.chunk.js:90628) at findCurrentHostFiber (29.chunk.js:90640) at findHostInstanceWithWarning (29.chunk.js:106349) at findDOMNode (29.chunk.js:106869) at ResizeSensor.componentDidUpdate (29.chunk.js:10535) </code></pre></div> <p dir="auto">The resize sensor <a href="https://github.com/palantir/blueprint/blob/develop/packages/core/src/components/resize-sensor/resizeSensor.tsx#L73">should be removing listeners on unmount</a>.</p> <p dir="auto">Demo: <a href="https://codesandbox.io/s/n4241q075l" rel="nofollow">https://codesandbox.io/s/n4241q075l</a><br> Related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="379428100" data-permission-text="Title is private" data-url="https://github.com/palantir/blueprint/issues/3141" data-hovercard-type="issue" data-hovercard-url="/palantir/blueprint/issues/3141/hovercard" href="https://github.com/palantir/blueprint/issues/3141">palantir/blueprint#3141</a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">No exception is thrown.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <p dir="auto">Tested with:</p> <ul dir="auto"> <li>React 16.6.1, fails</li> <li>React 16.6.0, works</li> </ul>
1
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>For English only</strong>, other languages will not accept.</p> <p dir="auto">Before report a bug, make sure you have:</p> <ul dir="auto"> <li>Searched open and closed <a href="https://github.com/apache/incubator-shardingsphere/issues">GitHub issues</a>.</li> <li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li> </ul> <p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br> If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p> <p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <blockquote> <p dir="auto">5.6.4-Sharding-Proxy 4.0.0<br> Download From <code class="notranslate">https://www.apache.org/dyn/closer.cgi?path=incubator/shardingsphere/4.0.0/apache-shardingsphere-incubating-4.0.0-sharding-jdbc-bin.tar.gz</code></p> </blockquote> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <blockquote> <p dir="auto">Sharding-Proxy</p> </blockquote> <h3 dir="auto">Expected behavior</h3> <p dir="auto">I use SQLAlchemy to do a <code class="notranslate">SELECT</code> action like <code class="notranslate">Model.query.limit(10).all()</code></p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">Here is the <code class="notranslate">stdout.log</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO ] 16:12:02.712 [nioEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2df725aa, L:/0.0.0.0:3307] READ: [id: 0xd7c30a2a, L:/127.0.0.1:3307 - R:/127.0.0.1:50186] [INFO ] 16:12:02.724 [nioEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2df725aa, L:/0.0.0.0:3307] READ COMPLETE [WARN ] 16:12:02.937 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[1]. [WARN ] 16:12:03.141 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[2]. [WARN ] 16:12:03.346 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[3]. [WARN ] 16:12:03.550 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[4]. [WARN ] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[5]. [ERROR] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Cannot do switch, exceed maximum retry count:[5]. [ERROR] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.f.c.CommandExecutorTask - Exception occur: org.apache.shardingsphere.core.exception.ShardingException: Failed to switch schema, please terminate current transaction. at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.connection.BackendConnection.setCurrentSchema(BackendConnection.java:116) at org.apache.shardingsphere.shardingproxy.backend.text.admin.BroadcastBackendHandler.execute(BroadcastBackendHandler.java:53) at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:73) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">[INFO ] 16:12:02.712 [nioEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2df725aa, L:/0.0.0.0:3307] READ: [id: 0xd7c30a2a, L:/127.0.0.1:3307 - R:/127.0.0.1:50186] [INFO ] 16:12:02.724 [nioEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2df725aa, L:/0.0.0.0:3307] READ COMPLETE [WARN ] 16:12:02.937 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[1]. [WARN ] 16:12:03.141 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[2]. [WARN ] 16:12:03.346 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[3]. [WARN ] 16:12:03.550 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[4]. [WARN ] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Current transaction have not terminated, retry count:[5]. [ERROR] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.b.c.j.c.BackendConnection - Cannot do switch, exceed maximum retry count:[5]. [ERROR] 16:12:03.751 [ShardingSphere-Command-0] o.a.s.s.f.c.CommandExecutorTask - Exception occur: org.apache.shardingsphere.core.exception.ShardingException: Failed to switch schema, please terminate current transaction. at org.apache.shardingsphere.shardingproxy.backend.communication.jdbc.connection.BackendConnection.setCurrentSchema(BackendConnection.java:116) at org.apache.shardingsphere.shardingproxy.backend.text.admin.BroadcastBackendHandler.execute(BroadcastBackendHandler.java:53) at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:73) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92) at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) </code></pre></div> <h3 dir="auto">Reason analyze (If you can)</h3> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">I didn't see any SQL print. The logic SQL <code class="notranslate"> select * from t_order</code> execute successfully in Proxy shell.</p> <p dir="auto">The <code class="notranslate">config-sharding.yaml</code></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="schemaName: sharding_db dataSources: ds_0: url: jdbc:mysql://127.0.0.1:33065/test_db_0 username: root password: **** connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 30 ds_1: url: jdbc:mysql://127.0.0.1:33065/test_db_1 username: root password: **** connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 30 ds_2: url: jdbc:mysql://127.0.0.1:33065/test_db_2 username: root password: **** connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 30 shardingRule: tables: t_order: actualDataNodes: ds_${0..2}.t_order_${0..2} tableStrategy: inline: shardingColumn: order_id algorithmExpression: t_order_${order_id % 3}"><pre class="notranslate"><span class="pl-ent">schemaName</span>: <span class="pl-s">sharding_db</span> <span class="pl-ent">dataSources</span>: <span class="pl-ent">ds_0</span>: <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://127.0.0.1:33065/test_db_0</span> <span class="pl-ent">username</span>: <span class="pl-s">root</span> <span class="pl-ent">password</span>: <span class="pl-s">****</span> <span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span> <span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span> <span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span> <span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">30</span> <span class="pl-ent">ds_1</span>: <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://127.0.0.1:33065/test_db_1</span> <span class="pl-ent">username</span>: <span class="pl-s">root</span> <span class="pl-ent">password</span>: <span class="pl-s">****</span> <span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span> <span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span> <span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span> <span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">30</span> <span class="pl-ent">ds_2</span>: <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://127.0.0.1:33065/test_db_2</span> <span class="pl-ent">username</span>: <span class="pl-s">root</span> <span class="pl-ent">password</span>: <span class="pl-s">****</span> <span class="pl-ent">connectionTimeoutMilliseconds</span>: <span class="pl-c1">30000</span> <span class="pl-ent">idleTimeoutMilliseconds</span>: <span class="pl-c1">60000</span> <span class="pl-ent">maxLifetimeMilliseconds</span>: <span class="pl-c1">1800000</span> <span class="pl-ent">maxPoolSize</span>: <span class="pl-c1">30</span> <span class="pl-ent">shardingRule</span>: <span class="pl-ent">tables</span>: <span class="pl-ent">t_order</span>: <span class="pl-ent">actualDataNodes</span>: <span class="pl-s">ds_${0..2}.t_order_${0..2}</span> <span class="pl-ent">tableStrategy</span>: <span class="pl-ent">inline</span>: <span class="pl-ent">shardingColumn</span>: <span class="pl-s">order_id</span> <span class="pl-ent">algorithmExpression</span>: <span class="pl-s">t_order_${order_id % 3}</span></pre></div> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3> <p dir="auto">The table:</p> <div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CREATE TABLE `t_order` ( `order_id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `status` varchar(50) COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`order_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;"><pre class="notranslate"><span class="pl-k">CREATE</span> <span class="pl-k">TABLE</span> `<span class="pl-en">t_order</span>` ( <span class="pl-s"><span class="pl-pds">`</span>order_id<span class="pl-pds">`</span></span> <span class="pl-k">bigint</span>(<span class="pl-c1">20</span>) <span class="pl-k">NOT NULL</span> AUTO_INCREMENT, <span class="pl-s"><span class="pl-pds">`</span>user_id<span class="pl-pds">`</span></span> <span class="pl-k">int</span>(<span class="pl-c1">11</span>) <span class="pl-k">NOT NULL</span>, <span class="pl-s"><span class="pl-pds">`</span>status<span class="pl-pds">`</span></span> <span class="pl-k">varchar</span>(<span class="pl-c1">50</span>) COLLATE utf8_bin DEFAULT <span class="pl-k">NULL</span>, <span class="pl-k">PRIMARY KEY</span> (<span class="pl-s"><span class="pl-pds">`</span>order_id<span class="pl-pds">`</span></span>) ) ENGINE<span class="pl-k">=</span>InnoDB DEFAULT CHARSET<span class="pl-k">=</span>utf8 COLLATE<span class="pl-k">=</span>utf8_bin;</pre></div> <p dir="auto">The SQLAlchemy Model:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Order(db.Model): __tablename__ = 't_order' order_id = db.Column(db.BigInteger, primary_key=True) user_id = db.Column(db.Integer) status = db.Column(db.VARCHAR(50), server_default=&quot;&quot;) def __repr__(self): return '&lt;Order {id} {status}&gt;'.format(id=self.user_id, status=self.status)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Order</span>(<span class="pl-s1">db</span>.<span class="pl-v">Model</span>): <span class="pl-s1">__tablename__</span> <span class="pl-c1">=</span> <span class="pl-s">'t_order'</span> <span class="pl-s1">order_id</span> <span class="pl-c1">=</span> <span class="pl-s1">db</span>.<span class="pl-v">Column</span>(<span class="pl-s1">db</span>.<span class="pl-v">BigInteger</span>, <span class="pl-s1">primary_key</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-s1">db</span>.<span class="pl-v">Column</span>(<span class="pl-s1">db</span>.<span class="pl-v">Integer</span>) <span class="pl-s1">status</span> <span class="pl-c1">=</span> <span class="pl-s1">db</span>.<span class="pl-v">Column</span>(<span class="pl-s1">db</span>.<span class="pl-v">VARCHAR</span>(<span class="pl-c1">50</span>), <span class="pl-s1">server_default</span><span class="pl-c1">=</span><span class="pl-s">""</span>) <span class="pl-k">def</span> <span class="pl-en">__repr__</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> <span class="pl-s">'&lt;Order {id} {status}&gt;'</span>.<span class="pl-en">format</span>(<span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">user_id</span>, <span class="pl-s1">status</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">status</span>)</pre></div> <p dir="auto">The URI:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SQLALCHEMY_DATABASE_URI = 'mysql://root:[email protected]:3307/sharding_db'"><pre class="notranslate"><code class="notranslate">SQLALCHEMY_DATABASE_URI = 'mysql://root:[email protected]:3307/sharding_db' </code></pre></div> <p dir="auto">The Python package:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SQLAlchemy==1.3.12 mysqlclient==1.4.6 Flask_SQLAlchemy==2.4.0 Flask==1.1.1"><pre class="notranslate"><code class="notranslate">SQLAlchemy==1.3.12 mysqlclient==1.4.6 Flask_SQLAlchemy==2.4.0 Flask==1.1.1 </code></pre></div>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">master batch</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">ShardingSphere-Proxy</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">/metadata/schemaName/tables broadcast table metadata exist</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">/metadata/schemaName/tables broadcast table metadata lost</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">It may be because Debug finds<br> TableMetadataLoadRengine's LOAD method leads to the loss of the broadcast</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">1、start ShardingSphere-proxy<br> 2、perform distsql<br> 3、Data loss found in ZK</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">"Optional" label in StepLabel should be localizable.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">It's hardcoded with text constant "Optional" and cannot be replaced.</p> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.22</td> </tr> <tr> <td>React</td> <td>16.1.1</td> </tr> <tr> <td>browser</td> <td>any</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Scrolling the GridList component on desktop should result in a momemtum.<br> Scrolling the GridList component on mobile should result in a momemtum.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Scrolling the GridList component on desktop result in a momemtum.<br> Scrolling the GridList component on mobile doesn't result in a momemtum.</p> <h2 dir="auto">Context</h2> <p dir="auto">when scrolling the screen on mobile the user gets a momemtum.<br> however when scrolling the GridList component there are no momemtum, and it results in a bad user experience.</p> <h2 dir="auto">Your Environment</h2> <p dir="auto">I have tested it on chrome mobile, latest version, on an iPhone 7.</p> <p dir="auto">I could solve the issue by adding <code class="notranslate">WebkitOverflowScrolling: 'touch'</code> in <code class="notranslate">GridList.js</code></p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong><br> In OSX using a Jupyter notebook with Matplotlib 2.0.2 and inline display, subplots apparently render after all the code in a cell has executed. The result is that if an object changes between one subplot plot call and the next, only the newest object is shown in both subplots.</p> <p dir="auto"><strong>This is fixed in 2.0.2, but I'm posting this issue for folks that might run into this.</strong></p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt %matplotlib inline A = np.array([[1,2,3],[4,5,6],[7,8,9]]) B = A.copy() fig, axes = plt.subplots(1,3) ax0, ax1, ax2 = axes ax0.matshow(A) A[0,0] = 9 ax1.matshow(B) ax2.matshow(A) # Expected behavior - first and second subplots are the same. # Observed behavior - first and third subplots are the same. "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span> <span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>],[<span class="pl-c1">4</span>,<span class="pl-c1">5</span>,<span class="pl-c1">6</span>],[<span class="pl-c1">7</span>,<span class="pl-c1">8</span>,<span class="pl-c1">9</span>]]) <span class="pl-v">B</span> <span class="pl-c1">=</span> <span class="pl-v">A</span>.<span class="pl-en">copy</span>() <span class="pl-s1">fig</span>, <span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-c1">1</span>,<span class="pl-c1">3</span>) <span class="pl-s1">ax0</span>, <span class="pl-s1">ax1</span>, <span class="pl-s1">ax2</span> <span class="pl-c1">=</span> <span class="pl-s1">axes</span> <span class="pl-s1">ax0</span>.<span class="pl-en">matshow</span>(<span class="pl-v">A</span>) <span class="pl-v">A</span>[<span class="pl-c1">0</span>,<span class="pl-c1">0</span>] <span class="pl-c1">=</span> <span class="pl-c1">9</span> <span class="pl-s1">ax1</span>.<span class="pl-en">matshow</span>(<span class="pl-v">B</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">matshow</span>(<span class="pl-v">A</span>) <span class="pl-c"># Expected behavior - first and second subplots are the same.</span> <span class="pl-c"># Observed behavior - first and third subplots are the same.</span></pre></div> <p dir="auto"><strong>Actual outcome</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1432092/29904415-5a4dbcb0-8dce-11e7-8668-88f73a586fe0.png"><img src="https://user-images.githubusercontent.com/1432092/29904415-5a4dbcb0-8dce-11e7-8668-88f73a586fe0.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong><br> I would expect the first and second subplots to be the same.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating System: OSX 10.10.5</li> <li>Matplotlib Version: 1.5.1</li> <li>Python Version: 3.5.2</li> <li>Jupyter Version (if applicable): 5.0.0</li> <li>Other Libraries:</li> </ul> <p dir="auto">Installed from Anaconda 4.3.</p>
<p dir="auto">The following code produces a horizontal gradient plot instead of a horizontal line:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt import matplotlib.cm Z=np.zeros((100,100)) Z[50]=100 fig=plt.figure() ax=fig.add_subplot(1,1,1) ax.imshow(Z,cmap=matplotlib.cm.Greys) Z[...]= np.arange(100.)[np.newaxis,:] plt.show() "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">cm</span> <span class="pl-v">Z</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">100</span>,<span class="pl-c1">100</span>)) <span class="pl-v">Z</span>[<span class="pl-c1">50</span>]<span class="pl-c1">=</span><span class="pl-c1">100</span> <span class="pl-s1">fig</span><span class="pl-c1">=</span><span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">ax</span><span class="pl-c1">=</span><span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">1</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>) <span class="pl-s1">ax</span>.<span class="pl-en">imshow</span>(<span class="pl-v">Z</span>,<span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s1">matplotlib</span>.<span class="pl-s1">cm</span>.<span class="pl-v">Greys</span>) <span class="pl-v">Z</span>[...]<span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">100.</span>)[<span class="pl-s1">np</span>.<span class="pl-s1">newaxis</span>,:] <span class="pl-s1">plt</span>.<span class="pl-en">show</span>() </pre></div> <p dir="auto">Please note that if we comment <code class="notranslate">Z[50]=100</code> the issue is not apparent as an all white figure is created as expected, but e.g. in Qt4Agg backend, mouseover values shows the altered Z values.</p> <p dir="auto">This means that imshow does not copy the data array but sets the color scale at the <code class="notranslate">ax.imshow()</code> call.</p> <p dir="auto">If data is intentionally not copied, I'd suggest adding a big warning about this behavior in the documentation and then the colorscale determination should be deferred until the figure is actually drawn. Otherwise the data should be copied.</p> <ul dir="auto"> <li>pip installed Matplotlib: 1.5.0, numpy: 1.10.1</li> <li>Ubuntu 14.04 python: 3.4.3</li> </ul>
1
<p dir="auto">Challenge <a href="http://beta.freecodecamp.com/en/challenges/html5-and-css/headline-with-the-h2-element" rel="nofollow">headline-with-the-h2-element</a> has an issue.</p> <p dir="auto">If i click run test i can't see the text of the test cases and i can ALWAYS pass the challenge even if the code is not correct!</p>
<p dir="auto">For the <code class="notranslate">feature/curriculum-expansion</code> branch only. When this branch is running locally, the challenge tests are all passing, even when no answer / incorrect code is typed into the editor. The assert messages aren't showing on screen anymore either - it's just the green check mark. This started happening sometime after the Monday, Sept 26th merges for the branch.</p> <p dir="auto">Update: confirmed issue on both <code class="notranslate">feature/curriculum-expansion</code> and <code class="notranslate">staging</code> branches.</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Both Chrome (53.0.2785.116 (64-bit)) and Firefox (49.0.1) are showing the same behavior.</li> <li>Operating System: Mac OS X 10.11.3</li> <li>Mobile, Desktop, or Tablet: Desktop</li> </ul>
1
<p dir="auto"><em>homeview_appbar_background.xml</em> (my drawable alias)</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;bitmap xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:src=&quot;@drawable/homeview_appbar_background_port&quot; /&gt;"><pre class="notranslate">&lt;?<span class="pl-ent">xml</span><span class="pl-e"> version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span><span class="pl-e"> encoding</span>=<span class="pl-s"><span class="pl-pds">"</span>utf-8<span class="pl-pds">"</span></span>?&gt; &lt;<span class="pl-ent">bitmap</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">src</span>=<span class="pl-s"><span class="pl-pds">"</span>@drawable/homeview_appbar_background_port<span class="pl-pds">"</span></span> /&gt;</pre></div> <p dir="auto">Using this code to load does not work, because a drawable.xml alias file is used and not the original file itself.</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(this) .load(R.drawable.homeview_appbar_background) .into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>) .<span class="pl-en">load</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">homeview_appbar_background</span>) .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">However, this works, because glide directly references the .png drawable.</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(this) .load(R.drawable.homeview_appbar_background) .into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>) .<span class="pl-en">load</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">homeview_appbar_background</span>) .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">Note: "does not work" means that nothing happens when the glide loading is called.</p>
<p dir="auto">We have a placeholder shape drawable (or sometimes shown directly as <code class="notranslate">.load(R.drawable.abc)</code>) which fails to display. The onException listener is called, but e is null.</p> <p dir="auto">The logs contain only:</p> <pre class="notranslate">com.example.app D/skia﹕ --- SkImageDecoder::Factory returned null</pre> <p dir="auto">Glide: 3.5.2<br> Tested on Genymotion v4.4.2</p> <p dir="auto">The drawable:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;shape xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:shape=&quot;rectangle&quot;&gt; &lt;solid android:color=&quot;#ffabcdef&quot;/&gt; &lt;/shape&gt;"><pre class="notranslate">&lt;<span class="pl-ent">shape</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>http://schemas.android.com/apk/res/android<span class="pl-pds">"</span></span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">shape</span>=<span class="pl-s"><span class="pl-pds">"</span>rectangle<span class="pl-pds">"</span></span>&gt; &lt;<span class="pl-ent">solid</span> <span class="pl-e">android</span><span class="pl-e">:</span><span class="pl-e">color</span>=<span class="pl-s"><span class="pl-pds">"</span>#ffabcdef<span class="pl-pds">"</span></span>/&gt; &lt;/<span class="pl-ent">shape</span>&gt;</pre></div>
1
<h1 dir="auto">Environment</h1> <p dir="auto">Terminal Version: 0.2.1831.0<br> Windows 10 Enterprise V1903, OS build 18362.30,<br> FarManager 3.0 build 5354 x64</p> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Open FarManager in Windows Terminal.</li> <li>Press 'Ctrl+o' to switch to panel view.</li> <li>Try to click with mouse on files or folders elements.</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">FarManager should get onClick event end perform some action (open clicked folder/file)</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Caret is placing in a clicked place but FarManager doesn't take any action.</p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.175] Windows Terminal version (if applicable): 0.2.1715.0 Screen 1920x1200 default settings for windows terminal"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.175] Windows Terminal version (if applicable): 0.2.1715.0 Screen 1920x1200 default settings for windows terminal </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol start="0" dir="auto"> <li> <p dir="auto">open Windows Terminal</p> </li> <li> <p dir="auto">ssh in any shell session (tested pwsh, cmd, bash) to linux server</p> </li> <li> <p dir="auto">start mc (midnight commander)</p> </li> <li> <p dir="auto">scroll through folder list with arrow down/up</p> </li> <li> <p dir="auto">do the same as above in pwsh or bash or cmd but started directly (without Windows Terminal)</p> </li> <li> <p dir="auto">Compare performance and screen quality</p> </li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Performance and stability should be at least the same in both cases</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Windows Terminal scenario is noticeably slower.<br> Windows terminal blinks with artifacts (mostly <code class="notranslate">|</code>) on each scroll step when you press and hold up/down key.</p> <p dir="auto">Tested the same with mc in local bash session. Less artifacts and a bit improved speed but still noticable slowdown.</p> <p dir="auto">Seems related but not duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="297948472" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/117" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/117/hovercard" href="https://github.com/microsoft/terminal/issues/117">#117</a></p>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> bug</p> <p dir="auto"><strong>What is the current behavior?</strong><br> Webpack is generating the following error when running our build:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: Error: ENAMETOOLONG: name too long, open '/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/public/static/AsyncTwoFactorModal~LuxuryCreateInspection_async~LuxuryListingStatusDashboard_async~SaveToListModal~UserChallengesInline~UserChallengesModalWrapper~business_profile_modal_content~causesAdminCampaignModal~causesAdminCauseModal~mt-guest-services-RestaurantBookContainer~mt-guest-services-confirmAndPayContainer~reauthModal_async-async-33b40edd34cd932e7a21.js' at multiCompiler.run (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/webpack/compile.js:16:11) at runWithDependencies (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:223:20) at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:1074:9 at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:421:16 at iteratorCallback (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:996:13) at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:906:16 at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:1071:13 at fn (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:166:21) at compiler.run (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:218:21) at emitAssets.err (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/Compiler.js:179:20)"><pre class="notranslate"><code class="notranslate">Error: Error: ENAMETOOLONG: name too long, open '/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/public/static/AsyncTwoFactorModal~LuxuryCreateInspection_async~LuxuryListingStatusDashboard_async~SaveToListModal~UserChallengesInline~UserChallengesModalWrapper~business_profile_modal_content~causesAdminCampaignModal~causesAdminCauseModal~mt-guest-services-RestaurantBookContainer~mt-guest-services-confirmAndPayContainer~reauthModal_async-async-33b40edd34cd932e7a21.js' at multiCompiler.run (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/webpack/compile.js:16:11) at runWithDependencies (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:223:20) at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:1074:9 at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:421:16 at iteratorCallback (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:996:13) at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:906:16 at /mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/async/dist/async.js:1071:13 at fn (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:166:21) at compiler.run (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/MultiCompiler.js:218:21) at emitAssets.err (/mnt/tmp/d20180130-23474-fmx2zd/monorail-solano-ghe/node_modules/webpack/lib/Compiler.js:179:20) </code></pre></div> <p dir="auto">It looks like webpack is combining several of our async imported file names into one.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br> I don't know how to recreate outside of running our build.</p> <p dir="auto"><strong>What is the expected behavior?</strong><br> The above error shouldn't be generated.</p> <p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p> <p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong><br> node 8.9.1, npm 5.6.0, webpack 4 beta, mac osx</p>
<p dir="auto">dist/dev:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1177434/93346354-2e7aa980-f834-11ea-8b93-093b17f25191.png"><img width="533" alt="Screenshot 2020-09-16 at 15 28 37" src="https://user-images.githubusercontent.com/1177434/93346354-2e7aa980-f834-11ea-8b93-093b17f25191.png" style="max-width: 100%;"></a></p> <p dir="auto">dist/prod:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1177434/93346402-39353e80-f834-11ea-89b0-9ce9bc2dcadf.png"><img width="379" alt="Screenshot 2020-09-16 at 15 24 37" src="https://user-images.githubusercontent.com/1177434/93346402-39353e80-f834-11ea-89b0-9ce9bc2dcadf.png" style="max-width: 100%;"></a></p> <p dir="auto">i searched quite a bit for tickets and inside the docs for a config, but did not find it.</p> <p dir="auto">is there one already in place? if not, this would be a feature request.</p> <p dir="auto">for the <a href="https://github.com/neomjs/neo">https://github.com/neomjs/neo</a> context, i just added cross apps &amp; examples split chunks. Meaning: there can be 50+ entry points and the duplicate mappings really do add up on the output file size.</p> <p dir="auto">i just need the version containing the file name extensions. since the real dev mode runs inside the browser directly, it is impossible to use imports without the file name extensions anyway.</p> <p dir="auto">thanks for your input!</p> <p dir="auto">best regards, tobias</p>
0
<p dir="auto">My apologies for the off topic issue, but since I can't post to golang-nuts I was not sure where else to raise this.</p> <p dir="auto">I appear to have been banned from the golang-nuts group, but am not sure why. Is it possible to clarify why, or possibly reinstate my membership? It would have been through my google account <code class="notranslate">[email protected]</code>, with an additional email address <code class="notranslate">[email protected]</code></p> <p dir="auto">Thanks.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/51256/12102637/f63417c4-b2f0-11e5-95c8-82cae2b3b7e6.png"><img width="512" alt="screenshot" src="https://cloud.githubusercontent.com/assets/51256/12102637/f63417c4-b2f0-11e5-95c8-82cae2b3b7e6.png" style="max-width: 100%;"></a></p>
<pre class="notranslate"><a href="http://play.golang.org/p/cNlOycuLzl" rel="nofollow">http://play.golang.org/p/cNlOycuLzl</a> is this: package main import ( "bytes" "encoding/gob" "time" ) type Update struct { Time time.Time // *** Note1 : Works if change from time.Time -&gt; int ***// } type Time struct { T *time.Time } type PC struct { Id int64 Update []Update // *** Note2 : Works if comment out one of Update or LastUpdate ***// LastUpdate Time } func main() { buf := new(bytes.Buffer) enc := gob.NewEncoder(buf) var err error if err = enc.Encode(PC{}); err != nil { println("A", err.Error()) return } dec := gob.NewDecoder(bytes.NewBuffer(buf.Bytes())) if err = dec.Decode(new(PC)); err != nil { println("B", err.Error()) return } } It prints "B extra data in buffer. Removing either of the time.Time values from the struct or replacing them with ints clears up the error. Something is awry with gots and time.</pre>
0
<p dir="auto">as discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="148549379" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5297" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5297/hovercard" href="https://github.com/microsoft/vscode/issues/5297">#5297</a></p>
<p dir="auto">Some extension relay on hard coded paths that are not exposed by vscode. See for example <a href="https://github.com/shanalikhan/code-settings-sync">code-sittings-sync</a>. Those extension are broken in the insiders version. I see t two possible ways:</p> <ol dir="auto"> <li>Just expose all paths used by vscode to extensions. Otherwise they will hard code them. No more security, just more messy code.</li> <li>Expose if the extension is used by the insider version. There might be a way, but I have not found it yet. I thought about getting the version and check if it ends with <code class="notranslate">-insiders</code>, but I have not found a way to get this information either.</li> </ol>
1
<p dir="auto">Please:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate requests.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Describe your goal, and if possible provide a code snippet with a motivating example.</li> </ul> <p dir="auto">I've found that there is some direction that hiding the communication time while computing einsum ops.<br> Link: <a href="https://dl.acm.org/doi/pdf/10.1145/3567955.3567959" rel="nofollow">https://dl.acm.org/doi/pdf/10.1145/3567955.3567959</a><br> I think it would be implemented somewhere since the affiliation of the paper is Google and used in TPU chips.<br> Is there any reference implementation that I could follow?</p> <p dir="auto">Also, I found this information while reading the following paper.<br> Link: <a href="https://arxiv.org/abs/2211.05102" rel="nofollow">https://arxiv.org/abs/2211.05102</a><br> If anyone who knows some reference implementations or materials that help to implement it, please let me know.</p> <p dir="auto">Thank you for your support.</p>
<p dir="auto">Please:<br> Revert <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="740316314" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/4867" data-hovercard-type="pull_request" data-hovercard-url="/google/jax/pull/4867/hovercard" href="https://github.com/google/jax/pull/4867">#4867</a> because it messes up TensorFlow, for example (ignore the fact the code is useless):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from jax.numpy import array &gt;&gt;&gt; from tensorflow.keras import Sequential &gt;&gt;&gt; Sequential().predict(array([0])) [...] TypeError: Using a non-tuple sequence for multidimensional indexing is not allowed; use `arr[array(seq)]` instead of `arr[seq]`. See https://github.com/google/jax/issues/4564 for more information. [...]"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">import</span> <span class="pl-s1">array</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">keras</span> <span class="pl-k">import</span> <span class="pl-v">Sequential</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">Sequential</span>().<span class="pl-en">predict</span>(<span class="pl-en">array</span>([<span class="pl-c1">0</span>])) [...] <span class="pl-v">TypeError</span>: <span class="pl-v">Using</span> <span class="pl-s1">a</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">tuple</span> <span class="pl-s1">sequence</span> <span class="pl-k">for</span> <span class="pl-s1">multidimensional</span> <span class="pl-s1">indexing</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">allowed</span>; <span class="pl-s1">use</span> <span class="pl-s">`arr[array(seq)]`</span> <span class="pl-s1">instead</span> <span class="pl-s1">of</span> <span class="pl-s">`arr[seq]`</span>. <span class="pl-v">See</span> <span class="pl-s1">https</span>:<span class="pl-c1">//</span><span class="pl-s1">github</span>.<span class="pl-s1">com</span><span class="pl-c1">/</span><span class="pl-s1">google</span><span class="pl-c1">/</span><span class="pl-s1">jax</span><span class="pl-c1">/</span><span class="pl-s1">issues</span><span class="pl-c1">/</span><span class="pl-c1">4564</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>. [...]</pre></div> <p dir="auto">But if you run it with NumPy:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from numpy import array &gt;&gt;&gt; from tensorflow.keras import Sequential &gt;&gt;&gt; Sequential().predict(array([0])) array([0])"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">numpy</span> <span class="pl-k">import</span> <span class="pl-s1">array</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">keras</span> <span class="pl-k">import</span> <span class="pl-v">Sequential</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">Sequential</span>().<span class="pl-en">predict</span>(<span class="pl-en">array</span>([<span class="pl-c1">0</span>])) <span class="pl-en">array</span>([<span class="pl-c1">0</span>])</pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check for duplicate requests.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Describe your goal, and if possible provide a code snippet with a motivating example.</li> </ul>
0
<p dir="auto">Hi,</p> <p dir="auto">When indexing a numpy array with a jax.numpy array, and the jax array has a singleton dimension, the dimension is lost. This behaviour is different if both are numpy arrays, or both are jax arrays.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array_jnp = jnp.zeros((50, 5)) array_np = np.zeros((50, 5)) idx_jnp = jnp.array([2]) idx_np = np.array([2]) print(array_jnp[idx_jnp]) # prints [[0. 0. 0. 0. 0.]] print(array_np[idx_jnp]) # prints [0. 0. 0. 0. 0.] &lt;--------- this is different! print(array_jnp[idx_np]) # prints [[0. 0. 0. 0. 0.]] print(array_np[idx_np]) # prints [[0. 0. 0. 0. 0.]]"><pre class="notranslate"><code class="notranslate">array_jnp = jnp.zeros((50, 5)) array_np = np.zeros((50, 5)) idx_jnp = jnp.array([2]) idx_np = np.array([2]) print(array_jnp[idx_jnp]) # prints [[0. 0. 0. 0. 0.]] print(array_np[idx_jnp]) # prints [0. 0. 0. 0. 0.] &lt;--------- this is different! print(array_jnp[idx_np]) # prints [[0. 0. 0. 0. 0.]] print(array_np[idx_np]) # prints [[0. 0. 0. 0. 0.]] </code></pre></div>
<p dir="auto">When you try to index a numpy ndarray with a DeviceArray, the numpy array tries to interpret the jax array as a tuple.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as onp import jax.numpy as np x = onp.zeros((5,7)) np_idx = onp.array([1,2,3]) jax_idx = np.array([1,2,3]) x[np_idx] x[jax_idx] # &lt;- raises IndexError"><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">onp</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">np</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">onp</span>.<span class="pl-en">zeros</span>((<span class="pl-c1">5</span>,<span class="pl-c1">7</span>)) <span class="pl-s1">np_idx</span> <span class="pl-c1">=</span> <span class="pl-s1">onp</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]) <span class="pl-s1">jax_idx</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>]) <span class="pl-s1">x</span>[<span class="pl-s1">np_idx</span>] <span class="pl-s1">x</span>[<span class="pl-s1">jax_idx</span>] <span class="pl-c"># &lt;- raises IndexError</span></pre></div> <p dir="auto">Workaround: put <code class="notranslate">jax_idx</code> in a singleton tuple <code class="notranslate">x[(jax_idx,)]</code></p> <p dir="auto">This bug resulted in a confusing situation where my function worked when decorated by jax.jit but had a shape mismatch when called on a numpy array.</p>
1
<h4 dir="auto">Code Sample</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import datetime # 4 examples: df = pd.DataFrame({0: [1, None]}) # Works df = pd.DataFrame({0: [None, 1]}) # Works df = pd.DataFrame({0: [None, datetime.datetime.now()]}) # Exception # Problem demonstration: df != df.iloc[0] # Works with numeric column, fails with NaT"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-c"># 4 examples:</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-c1">0</span>: [<span class="pl-c1">1</span>, <span class="pl-c1">None</span>]}) <span class="pl-c"># Works</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-c1">0</span>: [<span class="pl-c1">None</span>, <span class="pl-c1">1</span>]}) <span class="pl-c"># Works</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-c1">0</span>: [<span class="pl-c1">None</span>, <span class="pl-s1">datetime</span>.<span class="pl-s1">datetime</span>.<span class="pl-en">now</span>()]}) <span class="pl-c"># Exception</span> <span class="pl-c"># Problem demonstration:</span> <span class="pl-s1">df</span> <span class="pl-c1">!=</span> <span class="pl-s1">df</span>.<span class="pl-s1">iloc</span>[<span class="pl-c1">0</span>] <span class="pl-c"># Works with numeric column, fails with NaT</span></pre></div> <h4 dir="auto">Problem description &amp; expected output.</h4> <p dir="auto">In the above code, <strong>the final test <em>raises an exception</em></strong> with the <strong>datetime</strong> example, but <strong>works</strong> with the two <strong>numeric</strong> examples.</p> <p dir="auto">I would expect the NaT case to behave like the numeric example.</p> <p dir="auto">Note: a column with datetimes but <strong>no <code class="notranslate">NaT</code></strong> makes <code class="notranslate">df != df.iloc[0]</code> <strong>work as expected</strong>.</p> <h4 dir="auto">Expected Output</h4> <p dir="auto">I expect the result to be, like for numeric values, a dataframe that answers the question "is the value identical to that in the first row?" (as a dataframe with the same shape).</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;details&gt; INSTALLED VERSIONS ------------------ commit: None python: 3.6.2.final.0 python-bits: 64 OS: Darwin OS-release: 16.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.20.3 pytest: 3.2.2 pip: 9.0.1 setuptools: 36.3.0 Cython: 0.26.1 numpy: 1.13.1 scipy: 0.19.1 xarray: None IPython: 6.1.0 sphinx: 1.6.3 patsy: 0.4.1 dateutil: 2.6.1 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: 3.4.2 numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: 2.5.0a3 xlrd: 1.1.0 xlwt: 1.2.0 xlsxwriter: 0.9.8 lxml: 3.8.0 bs4: 4.6.0 html5lib: 0.9999999 sqlalchemy: 1.1.13 pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None &lt;/details&gt;"><pre class="notranslate"><code class="notranslate">&lt;details&gt; INSTALLED VERSIONS ------------------ commit: None python: 3.6.2.final.0 python-bits: 64 OS: Darwin OS-release: 16.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 pandas: 0.20.3 pytest: 3.2.2 pip: 9.0.1 setuptools: 36.3.0 Cython: 0.26.1 numpy: 1.13.1 scipy: 0.19.1 xarray: None IPython: 6.1.0 sphinx: 1.6.3 patsy: 0.4.1 dateutil: 2.6.1 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: 3.4.2 numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: 2.5.0a3 xlrd: 1.1.0 xlwt: 1.2.0 xlsxwriter: 0.9.8 lxml: 3.8.0 bs4: 4.6.0 html5lib: 0.9999999 sqlalchemy: 1.1.13 pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None &lt;/details&gt; </code></pre></div>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd &gt;&gt;&gt; nat = pd.NaT &gt;&gt;&gt; x = pd.Series([nat]) &gt;&gt;&gt; x.eq(nat) 0 False dtype: bool &gt;&gt;&gt; x == nat 0 False dtype: bool &gt;&gt;&gt; y = pd.DataFrame(dict(x=x)) &gt;&gt;&gt; y.eq(nat) x 0 NaT &gt;&gt;&gt; y == nat x 0 True"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nat</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">NaT</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-s1">nat</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span>.<span class="pl-en">eq</span>(<span class="pl-s1">nat</span>) <span class="pl-c1">0</span> <span class="pl-c1">False</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">x</span> <span class="pl-c1">==</span> <span class="pl-s1">nat</span> <span class="pl-c1">0</span> <span class="pl-c1">False</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-en">dict</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s1">x</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">y</span>.<span class="pl-en">eq</span>(<span class="pl-s1">nat</span>) <span class="pl-s1">x</span> <span class="pl-c1">0</span> <span class="pl-v">NaT</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">y</span> <span class="pl-c1">==</span> <span class="pl-s1">nat</span> <span class="pl-s1">x</span> <span class="pl-c1">0</span> <span class="pl-c1">True</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">Comparisons in a dataframe containing a single nat give incorrect answers. Note this occurs with both datetime and timedelta nats.</p> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="0 False dtype: bool 0 False dtype: bool x 0 False x 0 False"><pre class="notranslate"><span class="pl-c1">0</span> <span class="pl-c1">False</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span> <span class="pl-c1">0</span> <span class="pl-c1">False</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">bool</span> <span class="pl-s1">x</span> <span class="pl-c1">0</span> <span class="pl-c1">False</span> <span class="pl-s1">x</span> <span class="pl-c1">0</span> <span class="pl-c1">False</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.5.2.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.9.8-100.fc24.x86_64<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: C<br> LANG: C<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.19.0+579.g4ce9c0c<br> pytest: 3.0.5<br> pip: 9.0.1<br> setuptools: 27.2.0<br> Cython: 0.25.2<br> numpy: 1.11.3<br> scipy: 0.18.1<br> xarray: 0.9.1<br> IPython: 4.2.0<br> sphinx: 1.5.1<br> patsy: 0.4.1<br> dateutil: 2.6.0<br> pytz: 2016.10<br> blosc: None<br> bottleneck: 1.2.0<br> tables: 3.3.0<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.0.0<br> openpyxl: 2.4.1<br> xlrd: 1.0.0<br> xlwt: 1.2.0<br> xlsxwriter: 0.9.6<br> lxml: 3.7.2<br> bs4: 4.5.3<br> html5lib: 0.999<br> sqlalchemy: 1.1.5<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.4<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
1
<p dir="auto"><code class="notranslate">index.js</code> file in all of <code class="notranslate">bower-angular-*</code> repositories has a syntax error:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('./angular-sanitize'); module.exports = angular-sanitize;"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./angular-sanitize'</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-s1">angular</span><span class="pl-c1">-</span><span class="pl-s1">sanitize</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><a href="https://github.com/angular/bower-angular-sanitize/blob/master/index.js">(link)</a></p> <p dir="auto">Which makes it a bit more complicated to use them with browserify. I couldn't find the script that's used to generate those repos, but the fix would be as simple as rewriting the file to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = require('./angular-sanitize');"><pre class="notranslate"><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-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./angular-sanitize'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Another option would be to add <code class="notranslate">"main":"angular-sanitize.js"</code> to <code class="notranslate">package.json</code> <a href="https://docs.npmjs.com/files/package.json#main" rel="nofollow">(spec)</a> and not have an <code class="notranslate">index.js</code> file at all (as it's already done in <code class="notranslate">bower.json</code>).</p>
<p dir="auto">I've got a webpack-based angular project that uses the angular-mocks package for our test suite. Did a fresh install today and got the 1.3.9 package of angular-mocks and started getting the error on launch:</p> <p dir="auto"><code class="notranslate">ReferenceError: mocks is not defined</code></p> <p dir="auto">Looking at angular-mocks/index.js, it's entire content is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="require('./angular-mocks'); module.exports = angular-mocks;"><pre class="notranslate"><code class="notranslate">require('./angular-mocks'); module.exports = angular-mocks; </code></pre></div>
1
<p dir="auto">The following shows only 1 failed test:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @testset &quot;foo $i&quot; for i=1:3 @test 2==3+i end foo 1: Test Failed Expression: 2 == 3 + i Evaluated: 2 == 4 Stacktrace: [1] macro expansion at .\REPL[44]:2 [inlined] [2] macro expansion at .\test.jl:921 [inlined] [3] anonymous at .\&lt;missing&gt;:? Test Summary: | Fail Total foo 1 | 1 1 Test Summary: | Fail Total foo 1 | 1 1 ERROR: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken."><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>foo <span class="pl-v">$i</span><span class="pl-pds">"</span></span> <span class="pl-k">for</span> i<span class="pl-k">=</span><span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">3</span> <span class="pl-c1">@test</span> <span class="pl-c1">2</span><span class="pl-k">==</span><span class="pl-c1">3</span><span class="pl-k">+</span>i <span class="pl-k">end</span> foo <span class="pl-c1">1</span><span class="pl-k">:</span> Test Failed Expression<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">3</span> <span class="pl-k">+</span> i Evaluated<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">4</span> Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>REPL[<span class="pl-c1">44</span>]<span class="pl-k">:</span><span class="pl-c1">2</span> [inlined] [<span class="pl-c1">2</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">921</span> [inlined] [<span class="pl-c1">3</span>] anonymous at <span class="pl-k">.\</span><span class="pl-k">&lt;</span><span class="pl-c1">missing</span><span class="pl-k">&gt;:</span>? Test Summary<span class="pl-k">:</span> <span class="pl-k">|</span> Fail Total foo <span class="pl-c1">1</span> <span class="pl-k">|</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> Test Summary<span class="pl-k">:</span> <span class="pl-k">|</span> Fail Total foo <span class="pl-c1">1</span> <span class="pl-k">|</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> ERROR<span class="pl-k">:</span> Some tests did not pass<span class="pl-k">:</span> <span class="pl-c1">0</span> passed, <span class="pl-c1">1</span> failed, <span class="pl-c1">0</span> errored, <span class="pl-c1">0</span> broken.</pre></div> <p dir="auto">However, if you manually write out the loop, all three tests are run:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @testset &quot;foo&quot; begin @test 2==3+1 @test 2==3+2 @test 2==3+3 end foo: Test Failed Expression: 2 == 3 + 1 Evaluated: 2 == 4 Stacktrace: [1] macro expansion at .\REPL[46]:2 [inlined] [2] macro expansion at .\test.jl:860 [inlined] [3] anonymous at .\&lt;missing&gt;:? foo: Test Failed Expression: 2 == 3 + 2 Evaluated: 2 == 5 Stacktrace: [1] macro expansion at .\REPL[46]:3 [inlined] [2] macro expansion at .\test.jl:860 [inlined] [3] anonymous at .\&lt;missing&gt;:? foo: Test Failed Expression: 2 == 3 + 3 Evaluated: 2 == 6 Stacktrace: [1] macro expansion at .\REPL[46]:4 [inlined] [2] macro expansion at .\test.jl:860 [inlined] [3] anonymous at .\&lt;missing&gt;:? Test Summary: | Fail Total foo | 3 3 ERROR: Some tests did not pass: 0 passed, 3 failed, 0 errored, 0 broken."><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>foo<span class="pl-pds">"</span></span> <span class="pl-k">begin</span> <span class="pl-c1">@test</span> <span class="pl-c1">2</span><span class="pl-k">==</span><span class="pl-c1">3</span><span class="pl-k">+</span><span class="pl-c1">1</span> <span class="pl-c1">@test</span> <span class="pl-c1">2</span><span class="pl-k">==</span><span class="pl-c1">3</span><span class="pl-k">+</span><span class="pl-c1">2</span> <span class="pl-c1">@test</span> <span class="pl-c1">2</span><span class="pl-k">==</span><span class="pl-c1">3</span><span class="pl-k">+</span><span class="pl-c1">3</span> <span class="pl-k">end</span> foo<span class="pl-k">:</span> Test Failed Expression<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">3</span> <span class="pl-k">+</span> <span class="pl-c1">1</span> Evaluated<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">4</span> Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>REPL[<span class="pl-c1">46</span>]<span class="pl-k">:</span><span class="pl-c1">2</span> [inlined] [<span class="pl-c1">2</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">860</span> [inlined] [<span class="pl-c1">3</span>] anonymous at <span class="pl-k">.\</span><span class="pl-k">&lt;</span><span class="pl-c1">missing</span><span class="pl-k">&gt;:</span>? foo<span class="pl-k">:</span> Test Failed Expression<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">3</span> <span class="pl-k">+</span> <span class="pl-c1">2</span> Evaluated<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">5</span> Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>REPL[<span class="pl-c1">46</span>]<span class="pl-k">:</span><span class="pl-c1">3</span> [inlined] [<span class="pl-c1">2</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">860</span> [inlined] [<span class="pl-c1">3</span>] anonymous at <span class="pl-k">.\</span><span class="pl-k">&lt;</span><span class="pl-c1">missing</span><span class="pl-k">&gt;:</span>? foo<span class="pl-k">:</span> Test Failed Expression<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">3</span> <span class="pl-k">+</span> <span class="pl-c1">3</span> Evaluated<span class="pl-k">:</span> <span class="pl-c1">2</span> <span class="pl-k">==</span> <span class="pl-c1">6</span> Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>REPL[<span class="pl-c1">46</span>]<span class="pl-k">:</span><span class="pl-c1">4</span> [inlined] [<span class="pl-c1">2</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">.\</span>test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">860</span> [inlined] [<span class="pl-c1">3</span>] anonymous at <span class="pl-k">.\</span><span class="pl-k">&lt;</span><span class="pl-c1">missing</span><span class="pl-k">&gt;:</span>? Test Summary<span class="pl-k">:</span> <span class="pl-k">|</span> Fail Total foo <span class="pl-k">|</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> ERROR<span class="pl-k">:</span> Some tests did not pass<span class="pl-k">:</span> <span class="pl-c1">0</span> passed, <span class="pl-c1">3</span> failed, <span class="pl-c1">0</span> errored, <span class="pl-c1">0</span> broken.</pre></div> <p dir="auto">I don't think this is intended (see the discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="224877995" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/21594" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/21594/hovercard" href="https://github.com/JuliaLang/julia/issues/21594">#21594</a>). If this is intended behavior, it should probably be better documented.</p>
<p dir="auto"><code class="notranslate">@testset</code> should constitute rollback points for exceptions (execution should continue on the next testset), and indeed it's the case, but only for nested testsets:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using Base.Test @testset &quot;outer&quot; begin @testset &quot;inner&quot; begin @test true @assert false end @testset &quot;inner2&quot; begin @test true end end @testset &quot;next&quot; begin @test true end"><pre class="notranslate"><span class="pl-k">using</span> Base<span class="pl-k">.</span>Test <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>outer<span class="pl-pds">"</span></span> <span class="pl-k">begin</span> <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>inner<span class="pl-pds">"</span></span> <span class="pl-k">begin</span> <span class="pl-c1">@test</span> <span class="pl-c1">true</span> <span class="pl-c1">@assert</span> <span class="pl-c1">false</span> <span class="pl-k">end</span> <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>inner2<span class="pl-pds">"</span></span> <span class="pl-k">begin</span> <span class="pl-c1">@test</span> <span class="pl-c1">true</span> <span class="pl-k">end</span> <span class="pl-k">end</span> <span class="pl-c1">@testset</span> <span class="pl-s"><span class="pl-pds">"</span>next<span class="pl-pds">"</span></span> <span class="pl-k">begin</span> <span class="pl-c1">@test</span> <span class="pl-c1">true</span> <span class="pl-k">end</span></pre></div> <p dir="auto">Summary shows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Test Summary: | Pass Error Total outer | 2 1 3 inner | 1 1 2 inner2 | 1 1"><pre class="notranslate"><code class="notranslate">Test Summary: | Pass Error Total outer | 2 1 3 inner | 1 1 2 inner2 | 1 1 </code></pre></div> <p dir="auto">inner2 is run, but "next" is not. It seems this is triggered by finalize(), which stops on error at the top level. Is this intended, and if so, why?</p>
1
<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 want to talk about <code class="notranslate">jquery/jquery.d.ts</code>.</p> <ul dir="auto"> <li>The authors of that type definition are cc/ <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/borisyankov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/borisyankov">@borisyankov</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/choffmeister/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/choffmeister">@choffmeister</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Steve-Fenton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Steve-Fenton">@Steve-Fenton</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Diullei/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Diullei">@Diullei</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tasoili/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tasoili">@tasoili</a> @jasons-novaleaf <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/seanski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/seanski">@seanski</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Guuz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Guuz">@Guuz</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ksummerlin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ksummerlin">@ksummerlin</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/basarat/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/basarat">@basarat</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nwolverson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nwolverson">@nwolverson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/derekcicerone/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/derekcicerone">@derekcicerone</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AndrewGaspar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AndrewGaspar">@AndrewGaspar</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jameshfisher/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jameshfisher">@jameshfisher</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/seikichi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/seikichi">@seikichi</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/benjaminjackman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/benjaminjackman">@benjaminjackman</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JoshStrobl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JoshStrobl">@JoshStrobl</a> <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/DickvdBrink/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DickvdBrink">@DickvdBrink</a></li> </ul> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I want to talk about <code class="notranslate">jquery.dataTables/jquery.dataTables.d.ts</code>.</p> <ul dir="auto"> <li>The authors of that type definition are cc/ <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/Silver-Connection/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Silver-Connection">@Silver-Connection</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/omidkrad/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/omidkrad">@omidkrad</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pragmatrix/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pragmatrix">@pragmatrix</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/CNBoland/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/CNBoland">@CNBoland</a></li> </ul> </li> </ul> <hr> <p dir="auto">The static property<code class="notranslate">JQueryStatic.fn</code> (AKA <code class="notranslate">jQuery.fn</code> or <code class="notranslate">$.fn</code>) is declared as <code class="notranslate">any</code> which makes it impossible for plugin authors to write proper type declarations.</p> <p dir="auto">An example of such a plugin is the DataTables plugin, which has a handful of static functions that you can access via <code class="notranslate">$.fn.dataTables</code>.</p> <p dir="auto">In jquery/jquery.d.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn: any; //TODO: Decide how we want to type this"><pre class="notranslate">fn: <span class="pl-s1">any</span><span class="pl-kos">;</span> <span class="pl-c">//TODO: Decide how we want to type this</span></pre></div> <p dir="auto">In jquery.dataTables/jquery.dataTables.d.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//TODO: Wrong, as jquery.d.ts has no interface for fn //interface JQueryStatic { // dataTable: DataTables.StaticFunctions; //}"><pre class="notranslate"><span class="pl-c">//TODO: Wrong, as jquery.d.ts has no interface for fn</span> <span class="pl-c">//interface JQueryStatic {</span> <span class="pl-c">// dataTable: DataTables.StaticFunctions;</span> <span class="pl-c">//}</span></pre></div> <p dir="auto"><a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery/jquery.d.ts#L966">https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery/jquery.d.ts#L966</a><br> <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery.dataTables/jquery.dataTables.d.ts#L17-L20">https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery.dataTables/jquery.dataTables.d.ts#L17-L20</a></p> <p dir="auto">Example: <a href="https://datatables.net/reference/api/$.fn.dataTable.tables()" rel="nofollow">https://datatables.net/reference/api/$.fn.dataTable.tables()</a></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// get all DataTables on the page. let tables: DataTables.DataTable[] = $.fn.dataTables.tables() as DataTables.DataTable[];"><pre class="notranslate"><span class="pl-c">// get all DataTables on the page.</span> <span class="pl-k">let</span> <span class="pl-s1">tables</span>: <span class="pl-smi">DataTables</span><span class="pl-kos">.</span><span class="pl-smi">DataTable</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">$</span><span class="pl-kos">.</span><span class="pl-c1">fn</span><span class="pl-kos">.</span><span class="pl-c1">dataTables</span><span class="pl-kos">.</span><span class="pl-en">tables</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-k">as</span> <span class="pl-smi">DataTables</span><span class="pl-kos">.</span><span class="pl-smi">DataTable</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Here, the inferred return type of <code class="notranslate">tables()</code> is <code class="notranslate">any</code> because the type of <code class="notranslate">fn</code> is <code class="notranslate">any</code>, but the actual return type is an array of <code class="notranslate">DataTable</code>.</p>
<p dir="auto">I have an issue during writing a piece of declaration for existing node.js module - bluebird.js. The module has a method named <code class="notranslate">props</code> which gets an object has promises in it then return an object have same property names. It seems like object-version <code class="notranslate">map</code>. I wanted to add types for that.</p> <p dir="auto">For <code class="notranslate">all</code> I can easily get the types like</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" static all&lt;T1, T2&gt;(values: [Promise.Thenable&lt;T1&gt;, Promise.Thenable&lt;T2&gt;]): Promise&lt;[T1, T2]&gt;; static all&lt;T1, T2, T3&gt;(values: [Promise.Thenable&lt;T1&gt;, Promise.Thenable&lt;T2&gt;, Promise.Thenable&lt;T3&gt;]): Promise&lt;[T1, T2, T3]&gt;; // ..."><pre class="notranslate"> <span class="pl-s1">static</span> <span class="pl-s1">all</span><span class="pl-c1">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">values</span>: <span class="pl-kos">[</span><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T2</span><span class="pl-kos">&gt;</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">[</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">static</span> <span class="pl-smi">all</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">,</span> <span class="pl-smi">T3</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">values</span>: <span class="pl-kos">[</span><span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T2</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T3</span><span class="pl-kos">&gt;</span><span class="pl-kos">]</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">[</span><span class="pl-smi">T1</span><span class="pl-kos">,</span> <span class="pl-smi">T2</span><span class="pl-kos">,</span> <span class="pl-smi">T3</span><span class="pl-kos">]</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">// ...</span></pre></div> <p dir="auto">But for <code class="notranslate">props</code> the other hand,</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" static props&lt;T1&gt;(object: {[k:string]: Promise.Thenable&lt;T1&gt;}): Promise&lt;{[k:string]: T1}&gt;;"><pre class="notranslate"> <span class="pl-s1">static</span> <span class="pl-s1">props</span><span class="pl-c1">&lt;</span><span class="pl-smi">T1</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">object</span>: <span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">k</span>:<span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">Promise</span><span class="pl-kos">.</span><span class="pl-smi">Thenable</span><span class="pl-kos">&lt;</span><span class="pl-smi">T1</span><span class="pl-kos">&gt;</span><span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">k</span>:<span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">T1</span><span class="pl-kos">}</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I'm getting this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bluebird/bluebird-tests.ts(530,10): error TS2339: Property 'foo' does not exist on type '{ [k: string]: Foo; }'. bluebird/bluebird-tests.ts(534,10): error TS2339: Property 'bar' does not exist on type '{ [k: string]: Bar; }'."><pre class="notranslate"><code class="notranslate">bluebird/bluebird-tests.ts(530,10): error TS2339: Property 'foo' does not exist on type '{ [k: string]: Foo; }'. bluebird/bluebird-tests.ts(534,10): error TS2339: Property 'bar' does not exist on type '{ [k: string]: Bar; }'. </code></pre></div> <p dir="auto">Is there any tip for issue like this?</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Your code here "><pre class="notranslate"><span class="pl-c"># Your code here</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">[this should explain <strong>why</strong> the current behaviour is a problem and why the expected output is a better solution.]</p> <p dir="auto"><strong>Note</strong>: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!</p> <p dir="auto"><strong>Note</strong>: Many problems can be resolved by simply upgrading <code class="notranslate">pandas</code> to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if <code class="notranslate">master</code> addresses this issue, but that is not necessary.</p> <p dir="auto">For documentation-related issues, you can check the latest versions of the docs on <code class="notranslate">master</code> here:</p> <p dir="auto"><a href="https://pandas-docs.github.io/pandas-docs-travis/" rel="nofollow">https://pandas-docs.github.io/pandas-docs-travis/</a></p> <p dir="auto">If the issue has not been resolved there, go ahead and file it in the issue tracker.</p> <h4 dir="auto">Expected Output</h4> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p> </details>
<h4 dir="auto">Here's my code</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import pandas as pd from numpy.random import randn az = pd.DataFrame({ 'A' : ['a1', 'a1', 'a2', 'a3'] , 'B' : ['b1', 'b2', 'b3', 'b4'] , 'Vals' : randn(4) }).groupby(['A', 'B']).sum() def add_zero(row) : name = row.name row.loc[name,'b0'] = 0 return row az['Vals'].groupby(level='A').apply(lambda s : add_zero(s)) &gt;&gt;&gt; A A B &gt;&gt;&gt; a1 a1 b1 1.238985 &gt;&gt;&gt; b2 0.686438 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; a2 a2 b3 -0.503039 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; a3 a3 b4 -0.083150 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; Name: Vals, dtype: float64"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">from</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">random</span> <span class="pl-k">import</span> <span class="pl-s1">randn</span> <span class="pl-s1">az</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({ <span class="pl-s">'A'</span> : [<span class="pl-s">'a1'</span>, <span class="pl-s">'a1'</span>, <span class="pl-s">'a2'</span>, <span class="pl-s">'a3'</span>] , <span class="pl-s">'B'</span> : [<span class="pl-s">'b1'</span>, <span class="pl-s">'b2'</span>, <span class="pl-s">'b3'</span>, <span class="pl-s">'b4'</span>] , <span class="pl-s">'Vals'</span> : <span class="pl-en">randn</span>(<span class="pl-c1">4</span>) }).<span class="pl-en">groupby</span>([<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>]).<span class="pl-en">sum</span>() <span class="pl-k">def</span> <span class="pl-en">add_zero</span>(<span class="pl-s1">row</span>) : <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">row</span>.<span class="pl-s1">name</span> <span class="pl-s1">row</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">name</span>,<span class="pl-s">'b0'</span>] <span class="pl-c1">=</span> <span class="pl-c1">0</span> <span class="pl-k">return</span> <span class="pl-s1">row</span> <span class="pl-s1">az</span>[<span class="pl-s">'Vals'</span>].<span class="pl-en">groupby</span>(<span class="pl-s1">level</span><span class="pl-c1">=</span><span class="pl-s">'A'</span>).<span class="pl-en">apply</span>(<span class="pl-k">lambda</span> <span class="pl-s1">s</span> : <span class="pl-en">add_zero</span>(<span class="pl-s1">s</span>)) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">A</span> <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a1</span> <span class="pl-s1">a1</span> <span class="pl-s1">b1</span> <span class="pl-c1">1.238985</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b2</span> <span class="pl-c1">0.686438</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a2</span> <span class="pl-s1">a2</span> <span class="pl-s1">b3</span> <span class="pl-c1">-</span><span class="pl-c1">0.503039</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a3</span> <span class="pl-s1">a3</span> <span class="pl-s1">b4</span> <span class="pl-c1">-</span><span class="pl-c1">0.083150</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">Name</span>: <span class="pl-v">Vals</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <h4 dir="auto">Expected Output</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; A B &gt;&gt;&gt; a1 b1 1.238985 &gt;&gt;&gt; b2 0.686438 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; a2 b3 -0.503039 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; a3 b4 -0.083150 &gt;&gt;&gt; b0 0.000000 &gt;&gt;&gt; Name: Vals, dtype: float64"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a1</span> <span class="pl-s1">b1</span> <span class="pl-c1">1.238985</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b2</span> <span class="pl-c1">0.686438</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a2</span> <span class="pl-s1">b3</span> <span class="pl-c1">-</span><span class="pl-c1">0.503039</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">a3</span> <span class="pl-s1">b4</span> <span class="pl-c1">-</span><span class="pl-c1">0.083150</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">b0</span> <span class="pl-c1">0.000000</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">Name</span>: <span class="pl-v">Vals</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">I would like to add rows with new index in a grouped by Dataframe, it seems to work, yet it duplicates an index/level column, and I can't figure why it does.<br> Is there any way around ?</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> INSTALLED VERSIONS ------------------ commit: None python: 2.7.13.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None <p dir="auto">pandas: 0.19.2<br> nose: 1.3.7<br> pip: 9.0.1<br> setuptools: 27.2.0<br> Cython: 0.25.2<br> numpy: 1.11.3<br> scipy: 0.18.1<br> statsmodels: 0.6.1<br> xarray: None<br> IPython: 5.1.0<br> sphinx: 1.5.1<br> patsy: 0.4.1<br> dateutil: 2.6.0<br> pytz: 2016.10<br> blosc: None<br> bottleneck: 1.2.0<br> tables: 3.2.2<br> numexpr: 2.6.1<br> matplotlib: 2.0.0<br> openpyxl: 2.4.1<br> xlrd: 1.0.0<br> xlwt: 1.2.0<br> xlsxwriter: 0.9.6<br> lxml: 3.7.2<br> bs4: 4.5.3<br> html5lib: None<br> httplib2: 0.10.3<br> apiclient: 1.6.2<br> sqlalchemy: 1.1.5<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.4<br> boto: 2.45.0<br> pandas_datareader: None</p> </details>
0
<h3 dir="auto">Vue.js version</h3> <p dir="auto">2.0.3</p> <h3 dir="auto">Reproduction Link</h3> <p dir="auto"><a href="https://jsfiddle.net/xereda/zbt6sn1h/42/" rel="nofollow">https://jsfiddle.net/xereda/zbt6sn1h/42/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Change the values for latitude and longitude. No reactivity.</p> <h3 dir="auto">What is Expected?</h3> <p dir="auto">The Geolocation fields update the data object.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">The array that deals with geolocation information (MongoDB GeoJSON Object) are not reactive.</p> <p dir="auto">Note the following example:</p> <p dir="auto"><code class="notranslate"> local: { name: 'Empresa XYZ', address: 'Rua Fulano da Veiga, 888', number: 9888, geoLocation: { coordinates: [ 65.234902, 75.349902 ], type: 'Pointer' } }</code></p> <p dir="auto">The only fields that are not reactives are based on the internal array of the Geolocation object. Note this:</p> Nome: <br> Endereço: <br> Número: <br> Geolocalização (long): <br> Geolocalização (lat): <br> Geolocalização (type): <br>
<p dir="auto">I'm in process migrating an application from Vue 1.x to 2.0.3. In this application I'm having several selects where each v-model binds to an individual index of an array . This is without problems in Vue 1.x but in version 2 it does not update. I believe this is a potential bug.</p> <p dir="auto">I have reproduced the problem here:<br> <a href="https://jsfiddle.net/peterkorgaard/a7vvz753/18/" rel="nofollow">https://jsfiddle.net/peterkorgaard/a7vvz753/18/</a></p> <h3 dir="auto">Vue.js version</h3> <p dir="auto">2.0.3</p> <h3 dir="auto">Reproduction Link</h3> <p dir="auto"><a href="https://jsfiddle.net/peterkorgaard/a7vvz753/18/" rel="nofollow">https://jsfiddle.net/peterkorgaard/a7vvz753/18/</a></p> <h3 dir="auto">Steps to reproduce</h3> <h3 dir="auto">What is Expected?</h3> <h3 dir="auto">What is actually happening?</h3>
1
<h2 dir="auto">Bug Report</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I would like to work on a fix!</li> </ul> <p dir="auto"><strong>Current Behavior</strong><br> <code class="notranslate">scope.crawl()</code> does not add references to bindings correctly in some cases. In particular I get the bug when referencing a class inside a class method.</p> <p dir="auto"><strong>Input Code</strong><br> <a class="commit-link" href="https://github.com/regiontog/babel/compare/master...bug/missing-references-after-crawl">regiontog/babel@<tt>master...bug/missing-references-after-crawl</tt></a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const path = getPath(&quot;class a { build() { return new a(); } }&quot;); path.scope.crawl(); const referencePaths = path.scope.bindings.a.referencePaths; expect(referencePaths).toHaveLength(1);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">getPath</span><span class="pl-kos">(</span><span class="pl-s">"class a { build() { return new a(); } }"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-c1">scope</span><span class="pl-kos">.</span><span class="pl-en">crawl</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">referencePaths</span> <span class="pl-c1">=</span> <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-c1">scope</span><span class="pl-kos">.</span><span class="pl-c1">bindings</span><span class="pl-kos">.</span><span class="pl-c1">a</span><span class="pl-kos">.</span><span class="pl-c1">referencePaths</span><span class="pl-kos">;</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">referencePaths</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveLength</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected behavior/code</strong><br> I expect the binding <code class="notranslate">a</code> to have 1 reference inside the scope of the <code class="notranslate">build</code> class method after a <code class="notranslate">crawl</code>. The binding has 1 reference before the <code class="notranslate">crawl</code> call is made.</p> <p dir="auto"><strong>Environment</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System: OS: Linux 5.4 Arch Linux Binaries: Node: 13.3.0 - /usr/bin/node Yarn: 1.21.0 - /usr/bin/yarn npm: 6.12.1 - /usr/bin/npm Monorepos: Lerna: 3.19.0 npmPackages: @babel/cli: ^7.7.0 =&gt; 7.7.5 @babel/core: ^7.7.2 =&gt; 7.7.5 @babel/eslint-plugin-development: ^1.0.1 =&gt; 1.0.1 @babel/plugin-proposal-class-properties: ^7.7.0 =&gt; 7.7.4 @babel/plugin-proposal-export-namespace-from: ^7.5.2 =&gt; 7.7.4 @babel/plugin-proposal-nullish-coalescing-operator: ^7.4.4 =&gt; 7.7.4 @babel/plugin-proposal-numeric-separator: ^7.2.0 =&gt; 7.7.4 @babel/plugin-proposal-object-rest-spread: ^7.7.4 =&gt; 7.7.4 @babel/plugin-proposal-optional-chaining: ^7.6.0 =&gt; 7.7.5 @babel/plugin-transform-flow-strip-types: ^7.7.4 =&gt; 7.7.4 @babel/plugin-transform-for-of: ^7.7.4 =&gt; 7.7.4 @babel/plugin-transform-modules-commonjs: ^7.7.0 =&gt; 7.7.5 @babel/plugin-transform-runtime: ^7.6.2 =&gt; 7.7.6 @babel/preset-env: ^7.7.1 =&gt; 7.7.6 @babel/preset-flow: ^7.0.0 =&gt; 7.7.4 @babel/register: ^7.7.0 =&gt; 7.7.4 @babel/runtime: ^7.7.2 =&gt; 7.7.6 babel-eslint: ^11.0.0-beta.2 =&gt; 11.0.0-beta.2 babel-jest: ^24.9.0 =&gt; 24.9.0 babel-plugin-transform-charcodes: ^0.2.0 =&gt; 0.2.0 eslint: ^6.0.1 =&gt; 6.7.2 eslint-config-babel: ^9.0.0 =&gt; 9.0.0 gulp-babel: ^8.0.0 =&gt; 8.0.0 jest: ^24.9.0 =&gt; 24.9.0 lerna: ^3.19.0 =&gt; 3.19.0 rollup-plugin-babel: ^4.0.0 =&gt; 4.3.3"><pre class="notranslate"><code class="notranslate">System: OS: Linux 5.4 Arch Linux Binaries: Node: 13.3.0 - /usr/bin/node Yarn: 1.21.0 - /usr/bin/yarn npm: 6.12.1 - /usr/bin/npm Monorepos: Lerna: 3.19.0 npmPackages: @babel/cli: ^7.7.0 =&gt; 7.7.5 @babel/core: ^7.7.2 =&gt; 7.7.5 @babel/eslint-plugin-development: ^1.0.1 =&gt; 1.0.1 @babel/plugin-proposal-class-properties: ^7.7.0 =&gt; 7.7.4 @babel/plugin-proposal-export-namespace-from: ^7.5.2 =&gt; 7.7.4 @babel/plugin-proposal-nullish-coalescing-operator: ^7.4.4 =&gt; 7.7.4 @babel/plugin-proposal-numeric-separator: ^7.2.0 =&gt; 7.7.4 @babel/plugin-proposal-object-rest-spread: ^7.7.4 =&gt; 7.7.4 @babel/plugin-proposal-optional-chaining: ^7.6.0 =&gt; 7.7.5 @babel/plugin-transform-flow-strip-types: ^7.7.4 =&gt; 7.7.4 @babel/plugin-transform-for-of: ^7.7.4 =&gt; 7.7.4 @babel/plugin-transform-modules-commonjs: ^7.7.0 =&gt; 7.7.5 @babel/plugin-transform-runtime: ^7.6.2 =&gt; 7.7.6 @babel/preset-env: ^7.7.1 =&gt; 7.7.6 @babel/preset-flow: ^7.0.0 =&gt; 7.7.4 @babel/register: ^7.7.0 =&gt; 7.7.4 @babel/runtime: ^7.7.2 =&gt; 7.7.6 babel-eslint: ^11.0.0-beta.2 =&gt; 11.0.0-beta.2 babel-jest: ^24.9.0 =&gt; 24.9.0 babel-plugin-transform-charcodes: ^0.2.0 =&gt; 0.2.0 eslint: ^6.0.1 =&gt; 6.7.2 eslint-config-babel: ^9.0.0 =&gt; 9.0.0 gulp-babel: ^8.0.0 =&gt; 8.0.0 jest: ^24.9.0 =&gt; 24.9.0 lerna: ^3.19.0 =&gt; 3.19.0 rollup-plugin-babel: ^4.0.0 =&gt; 4.3.3 </code></pre></div> <ul dir="auto"> <li>How you are using Babel: API</li> </ul> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">It seems suspect to me to add the reference to a binding in the references own scope <a href="https://github.com/babel/babel/blob/d389b702e65bfb0a3cc8258907db76560491547a/packages/babel-traverse/src/scope/index.js#L756">here</a></p> <p dir="auto"><strong>Additional context/Screenshots</strong><br> Output of test linked above:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scope › binding paths › reference paths after crawl expect(received).toHaveLength(expected) Expected length: 1 Received length: 0 Received array: [] 276 | path.scope.crawl(); 277 | const referencePaths = path.scope.bindings.a.referencePaths; &gt; 278 | expect(referencePaths).toHaveLength(1); | ^ 279 | }); 280 | }); 281 | at Object.&lt;anonymous&gt; (packages/babel-traverse/test/scope.js:278:30)"><pre class="notranslate"><code class="notranslate">scope › binding paths › reference paths after crawl expect(received).toHaveLength(expected) Expected length: 1 Received length: 0 Received array: [] 276 | path.scope.crawl(); 277 | const referencePaths = path.scope.bindings.a.referencePaths; &gt; 278 | expect(referencePaths).toHaveLength(1); | ^ 279 | }); 280 | }); 281 | at Object.&lt;anonymous&gt; (packages/babel-traverse/test/scope.js:278:30) </code></pre></div>
<blockquote> <p dir="auto">Copying from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="220430459" data-permission-text="Title is private" data-url="https://github.com/babel/notes/issues/19" data-hovercard-type="pull_request" data-hovercard-url="/babel/notes/pull/19/hovercard" href="https://github.com/babel/notes/pull/19">babel/notes#19</a>, many other issues linked there</p> </blockquote> <h3 dir="auto">Issue</h3> <p dir="auto">The order that you specify plugins/presets in a config matters in Babel. User's shouldn't have to change their config to make it compile correctly (or get a weird error message about how a plugin isn't enabled when it's just in the "wrong" order).</p> <blockquote> <p dir="auto">From the <a href="https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy">https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy</a> repo</p> </blockquote> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/588473/24915926/95fcc932-1ea6-11e7-9a0a-002f2950517e.png"><img src="https://cloud.githubusercontent.com/assets/588473/24915926/95fcc932-1ea6-11e7-9a0a-002f2950517e.png" alt="screen shot 2017-04-11 at 11 04 05 am" style="max-width: 100%;"></a></p> <p dir="auto">Simpler example: if you specify a plugin only modifies ES2015 classes and you make that run after the plugin that transforms classes, then it won't run at all because at that point the classes will have been transformed into a function already.</p> <p dir="auto"><code class="notranslate">{ plugins: ["modify-es2015-classes", "transform-es2015-classes"] }</code> // works<br> <code class="notranslate">{ plugins: ["transform-es2015-classes", "modify-es2015-classes"] }</code> // fails</p> <p dir="auto">How can we make Babel automatically know how to order the plugins for the user, or at least give a clearer error message? Or how can we let the user opt-in to a specific ordering?</p> <h4 dir="auto">Duplicate plugins in a config</h4> <p dir="auto">What if a user includes "es2015", "env", "latest", and "transform-arrow-functions"? That includes the arrow function transform 4 times! It would be nice to have a nice error message to explain that there's duplicate functionality or that you have a plugin that isn't already on.</p> <h3 dir="auto">Possible Solution: Capabilities Discovery</h3> <ul dir="auto"> <li>Plugins provide a function to state the capabilities it provides and which it needs.</li> <li>This includes both syntax and built-ins</li> <li>This is important to fix plugin ordering automatically in Babel itself. If the classes plugin transpiles classes and decorators run over classes, then with this information Babel will know to make decorators run first.</li> </ul> <p dir="auto">This could mean exposing a method in plugins called <code class="notranslate">hasCapability('capability-here')</code></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// minify-plugin.js // return true or false based on if the target environment natively supports arrows // or if the plugin that compiles arrow functions is enabled if (hasCapability('es2015-arrow-function') { // output an arrow function } else { // output a function expression }"><pre class="notranslate"><span class="pl-c">// minify-plugin.js</span> <span class="pl-c">// return true or false based on if the target environment natively supports arrows</span> <span class="pl-c">// or if the plugin that compiles arrow functions is enabled</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-en">hasCapability</span><span class="pl-kos">(</span><span class="pl-s">'es2015-arrow-function'</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-c">// output an arrow function</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-c">// output a function expression</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Other ideas</h3> <ul dir="auto"> <li>Allow plugins to have multiple priorities (and a lower priority can error out to signal that a plugin should move before or after)</li> <li>Explicit ordering of before/after by users (sounds like passPerPreset) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="175597273" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/3793" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/3793/hovercard" href="https://github.com/babel/babel/issues/3793">#3793</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="127366420" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/3281" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/3281/hovercard" href="https://github.com/babel/babel/pull/3281">#3281</a>).</li> </ul> <h3 dir="auto">Testing</h3> <p dir="auto">A test can be to randomly sort the plugins in preset-env/es2015/presets and check if the output is the same. Also tests for specific issues we know about (decorators and class properties)</p> <h3 dir="auto">Other Benefits</h3> <ul dir="auto"> <li>Users shouldn't need to care about what order plugins are specified</li> <li>This would also provide better error messages: "your native environment doesn't support this syntax and you haven't added the correct plugin to transform it: here are some options and how to install"</li> <li>Minify can also take advantage of this by having multiple outputs based on the target environment (output arrow functions (ES6) if available)</li> </ul>
0
<p dir="auto">Requiring the user to ensure that only one instance of celerybeat exists across their cluster creates a substantial implementation burden (either creating a single point-of-failure or encouraging users to roll their own distributed mutex).</p> <p dir="auto">celerybeat should either provide a mechanism to prevent inadvertent concurrency, or the documentation should suggest a best-practice approach.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br> (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Description</h1> <p dir="auto">the part of the documentation describing <code class="notranslate">celery_app</code> and <code class="notranslate">celery_worker</code> fixtures has a test example that doesn't pass:</p> <p dir="auto"><a href="https://github.com/celery/celery/blame/master/docs/userguide/testing.rst#L152">https://github.com/celery/celery/blame/master/docs/userguide/testing.rst#L152</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/21345604/189285498-fe7efa52-3a6e-45ae-bddf-a4610bc8ddff.png"><img src="https://user-images.githubusercontent.com/21345604/189285498-fe7efa52-3a6e-45ae-bddf-a4610bc8ddff.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">if we use this test as it is, it will fail because the task does not get registered in the worker:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/21345604/189286212-410e8958-f55c-4d59-b830-755f94f7a2c2.png"><img src="https://user-images.githubusercontent.com/21345604/189286212-410e8958-f55c-4d59-b830-755f94f7a2c2.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto"><code class="notranslate">celery.exceptions.NotRegistered: 'test_create_task.mul'</code></p> <h1 dir="auto">Suggestions</h1> <p dir="auto">the problem is that executed this way, the tasks are not registered in the worker. The way I found working is to override the <code class="notranslate">celery_app</code> fixture:</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.contrib.testing.worker import TestWorkController from celery.result import AsyncResult import pytest @pytest.fixture def celery_app(celery_app: Celery): @celery_app.task(name='xyz') def mul(x, y): &quot;&quot;&quot;register a task named 'test_create_task.mul'&quot;&quot;&quot; return x * y return celery_app def test_create_task(celery_app: Celery, celery_worker: TestWorkController): result: AsyncResult = celery_app.send_task('xyz', kwargs = {&quot;x&quot;: 2, &quot;y&quot;: 2}) result.wait() assert result.get() == 4"><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">contrib</span>.<span class="pl-s1">testing</span>.<span class="pl-s1">worker</span> <span class="pl-k">import</span> <span class="pl-v">TestWorkController</span> <span class="pl-k">from</span> <span class="pl-s1">celery</span>.<span class="pl-s1">result</span> <span class="pl-k">import</span> <span class="pl-v">AsyncResult</span> <span class="pl-k">import</span> <span class="pl-s1">pytest</span> <span class="pl-en">@<span class="pl-s1">pytest</span>.<span class="pl-s1">fixture</span></span> <span class="pl-k">def</span> <span class="pl-en">celery_app</span>(<span class="pl-s1">celery_app</span>: <span class="pl-v">Celery</span>): <span class="pl-en">@<span class="pl-s1">celery_app</span>.<span class="pl-en">task</span>(<span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'xyz'</span>)</span> <span class="pl-k">def</span> <span class="pl-en">mul</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>): <span class="pl-s">"""register a task named 'test_create_task.mul'"""</span> <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">y</span> <span class="pl-k">return</span> <span class="pl-s1">celery_app</span> <span class="pl-k">def</span> <span class="pl-en">test_create_task</span>(<span class="pl-s1">celery_app</span>: <span class="pl-v">Celery</span>, <span class="pl-s1">celery_worker</span>: <span class="pl-v">TestWorkController</span>): <span class="pl-s1">result</span>: <span class="pl-v">AsyncResult</span> <span class="pl-c1">=</span> <span class="pl-s1">celery_app</span>.<span class="pl-en">send_task</span>(<span class="pl-s">'xyz'</span>, <span class="pl-s1">kwargs</span> <span class="pl-c1">=</span> {<span class="pl-s">"x"</span>: <span class="pl-c1">2</span>, <span class="pl-s">"y"</span>: <span class="pl-c1">2</span>}) <span class="pl-s1">result</span>.<span class="pl-en">wait</span>() <span class="pl-k">assert</span> <span class="pl-s1">result</span>.<span class="pl-en">get</span>() <span class="pl-c1">==</span> <span class="pl-c1">4</span></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/21345604/189286546-3977cede-1719-4cc7-b8af-42e52fc536d6.png"><img src="https://user-images.githubusercontent.com/21345604/189286546-3977cede-1719-4cc7-b8af-42e52fc536d6.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">Compiling dprint-plugin-typescript v0.29.1<br> error[E0308]: mismatched types<br> --&gt; /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/main.rs:554:7<br> |<br> 554 | syntax,<br> | ^^^^^^ expected enum <code class="notranslate">swc_ecma_parser::Syntax</code>, found a different enum <code class="notranslate">swc_ecma_parser::Syntax</code><br> |<br> = note: perhaps two different versions of crate <code class="notranslate">swc_ecma_parser</code> are being used?</p> <p dir="auto">error[E0308]: mismatched types<br> --&gt; /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/main.rs:561:60<br> |<br> 561 | .parse_with_reexports(&amp;module_specifier.to_string(), syntax)<br> | ^^^^^^ expected enum <code class="notranslate">swc_ecma_parser::Syntax</code>, found a different enum <code class="notranslate">swc_ecma_parser::Syntax</code><br> |<br> = note: perhaps two different versions of crate <code class="notranslate">swc_ecma_parser</code> are being used?</p> <p dir="auto">error[E0308]: mismatched types<br> --&gt; /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:173:13<br> |<br> 173 | .syntax(syntax)<br> | ^^^^^^ expected enum <code class="notranslate">swc_ecma_parser::Syntax</code>, found a different enum <code class="notranslate">swc_ecma_parser::Syntax</code><br> |<br> = note: perhaps two different versions of crate <code class="notranslate">swc_ecma_parser</code> are being used?</p> <p dir="auto">error[E0609]: no field <code class="notranslate">filename</code> on type <code class="notranslate">deno_lint::diagnostic::Location</code><br> --&gt; /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:228:21<br> |<br> 228 | &amp;d.location.filename,<br> | ^^^^^^^^ unknown field<br> |<br> = note: available fields are: <code class="notranslate">line</code>, <code class="notranslate">col</code></p> <p dir="auto">error[E0609]: no field <code class="notranslate">filename</code> on type <code class="notranslate">&amp;deno_lint::diagnostic::Location</code><br> --&gt; /home/l/.cargo/registry/src/github.com-1ecc6299db9ec823/deno-1.3.1/lint.rs:291:39<br> |<br> 291 | return format!("{}:{}:{}", location.filename, location.line, location.col);<br> | ^^^^^^^^ unknown field<br> |<br> = note: available fields are: <code class="notranslate">line</code>, <code class="notranslate">col</code></p> <p dir="auto">error: aborting due to 5 previous errors</p> <p dir="auto">Some errors have detailed explanations: E0308, E0609.<br> For more information about an error, try <code class="notranslate">rustc --explain E0308</code>.<br> error: failed to compile <code class="notranslate">deno v1.3.1</code>, intermediate artifacts can be found at <code class="notranslate">/tmp/cargo-installzzCTFN</code></p> <p dir="auto">Caused by:<br> could not compile <code class="notranslate">deno</code>.</p>
<p dir="auto">I'm getting a compilation error when importing fromFileUrl from "<a href="https://deno.land/[email protected]/path/posix.ts" rel="nofollow">https://deno.land/[email protected]/path/posix.ts</a>"</p> <p dir="auto">My trivial test case is:</p> <p dir="auto">import { fromFileUrl } from "<a href="https://deno.land/[email protected]/path/posix.ts" rel="nofollow">https://deno.land/[email protected]/path/posix.ts</a>";<br> import { CHAR_FORM_FEED } from "./deno_cache/deps/https/deno.land/deca9362afe2080ad38d09cee2792ec9c8b8acc7ed9b0ceeee1049a441ad0dd4"</p> <p dir="auto">let u: URL = new URL("");</p> <p dir="auto">console.log(fromFileUrl(u));</p> <p dir="auto">posix.ts does not build and gets error</p> <p dir="auto">TS2345 [ERROR]: Argument of type 'string | URL' is not assignable to parameter of type 'string'.<br> Type 'URL' is not assignable to type 'string'.<br> return new URL(url).pathname;<br> ~~~<br> at <a href="https://deno.land/[email protected]/path/posix.ts:433:18" rel="nofollow">https://deno.land/[email protected]/path/posix.ts:433:18</a></p> <p dir="auto">what am I doing wrong. Is there a Deno discussion group I could use to discuss such problems before filing an issue like this?</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I would like to be able to customize the icon in the stepper, instead of only being able to use the index of the step.<br> I've tried using the StepIcon but it doesn't work, here my attempt.<br> <a href="https://codesandbox.io/embed/n0zy0m04zm" rel="nofollow">https://codesandbox.io/embed/n0zy0m04zm</a></p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>"material-ui": "^1.0.0-beta.33",</td> <td></td> </tr> <tr> <td>"preact": "^8.2.7"</td> <td></td> </tr> </tbody> </table>
<p dir="auto">I let a fullscreen dialog appear in my web application and have a TextField being automatically focused. The field is kind of focused, but the blinking | is not displayed.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8998518/32510535-3b190b7a-c3f1-11e7-84f3-4f9d3821f721.jpg"><img src="https://user-images.githubusercontent.com/8998518/32510535-3b190b7a-c3f1-11e7-84f3-4f9d3821f721.jpg" alt="img_1229" style="max-width: 100%;"></a></p> <p dir="auto">If you tab on the <strong>same</strong> TextField again, it'll blink one line under the text field.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8998518/32510556-4f07944e-c3f1-11e7-8943-662426d4f2a8.jpg"><img src="https://user-images.githubusercontent.com/8998518/32510556-4f07944e-c3f1-11e7-8943-662426d4f2a8.jpg" alt="img_1230" style="max-width: 100%;"></a></p> <p dir="auto">Again on the same: TextField is unfocused.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8998518/32510565-52d1d4cc-c3f1-11e7-99bc-94d2b1aaad38.jpg"><img src="https://user-images.githubusercontent.com/8998518/32510565-52d1d4cc-c3f1-11e7-99bc-94d2b1aaad38.jpg" alt="img_1231" style="max-width: 100%;"></a></p> <p dir="auto">Again on the same, the correct TextField is finally focused with |.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8998518/32510575-56be533a-c3f1-11e7-8cf8-b8558fd630ab.jpg"><img src="https://user-images.githubusercontent.com/8998518/32510575-56be533a-c3f1-11e7-8cf8-b8558fd630ab.jpg" alt="img_1233" style="max-width: 100%;"></a></p> <ul dir="auto"> <li>[ x] I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">This is my dialog content:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;DialogContent style={{ textAlign: 'center' }}&gt; &lt;DialogTitle&gt; Enter your lorem link &lt;/DialogTitle&gt; &lt;DialogContentText&gt; Lorem ipsum. &lt;/DialogContentText&gt; &lt;TextField required autoFocus inputRef={el =&gt; this.TitleInput = el} margin=&quot;normal&quot; label=&quot;Enter your course title&quot; type=&quot;text&quot; style={{ width: '60%', minWidth: '250px' }} inputProps={{ maxLength: 10 }} /&gt; &lt;TextField required inputRef={el =&gt; this.LinkInput = el} margin=&quot;normal&quot; label=&quot;Enter your link&quot; type=&quot;text&quot; style={{ width: '60%', minWidth: '250px' }} /&gt; &lt;/DialogContent&gt;"><pre class="notranslate"><code class="notranslate">&lt;DialogContent style={{ textAlign: 'center' }}&gt; &lt;DialogTitle&gt; Enter your lorem link &lt;/DialogTitle&gt; &lt;DialogContentText&gt; Lorem ipsum. &lt;/DialogContentText&gt; &lt;TextField required autoFocus inputRef={el =&gt; this.TitleInput = el} margin="normal" label="Enter your course title" type="text" style={{ width: '60%', minWidth: '250px' }} inputProps={{ maxLength: 10 }} /&gt; &lt;TextField required inputRef={el =&gt; this.LinkInput = el} margin="normal" label="Enter your link" type="text" style={{ width: '60%', minWidth: '250px' }} /&gt; &lt;/DialogContent&gt; </code></pre></div> <h2 dir="auto">Environment</h2> <p dir="auto">This bug only happens on iOS devices.</p> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.19</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>browser</td> <td>iOS Safari</td> </tr> <tr> <td>etc</td> <td>iPhone 7, iPad Pro 9"</td> </tr> </tbody> </table>
0
<h3 dir="auto">Problem</h3> <p dir="auto"><code class="notranslate">rcParams["savefig.directory"]</code> sets the default directory used by the figure-saving dialog. It is either a fixed firectory (defaulting to $HOME), or, if an empty string, uses the current directory of the process. After saving a figure, its value gets updated to the directory where <em>that</em> figure was saved (so if it starts at /foo/bar but you interactively select to save a figure as /quux/baz.png, next time you click on the figure-saving icon the dialog will start at /quux)... <em>except</em> if the initial value is the empty string (i.e., the current directory) in which case later dialogs will <em>still</em> start at the current directory.</p> <p dir="auto">I have indeed set <code class="notranslate">savefig.directory</code> to be empty, as I quite often want to save figures "close" to the script directory; however, if I want e.g. to put multiple figures in the same subdirectory or sibling directory, then I need to interactively do so for each figure, which is a lot of clicking.</p> <h3 dir="auto">Proposed Solution</h3> <p dir="auto">Hence, at least for this use case, it would be reasonable to always update <code class="notranslate">savefig.directory</code> after an interactive save, even if its initial value is empty. I guess this may (like always) break some workflows(?!) -- although that seems slightly unlikely to me --, so we may possibly just put the decision of whether to ever update that rcParam into yet another separate rcParam (<code class="notranslate">savefig.update_directory_after_save</code>)... or we may decide it's not worth that additional complexity unless someone actually complains ;-)</p> <h3 dir="auto">Additional context and prior art</h3>
<h3 dir="auto">Problem</h3> <p dir="auto"><code class="notranslate">rcParams["savefig.directory"]</code> sets the default directory used by the figure-saving dialog. It is either a fixed firectory (defaulting to $HOME), or, if an empty string, uses the current directory of the process. After saving a figure, its value gets updated to the directory where <em>that</em> figure was saved (so if it starts at /foo/bar but you interactively select to save a figure as /quux/baz.png, next time you click on the figure-saving icon the dialog will start at /quux)... <em>except</em> if the initial value is the empty string (i.e., the current directory) in which case later dialogs will <em>still</em> start at the current directory.</p> <p dir="auto">I have indeed set <code class="notranslate">savefig.directory</code> to be empty, as I quite often want to save figures "close" to the script directory; however, if I want e.g. to put multiple figures in the same subdirectory or sibling directory, then I need to interactively do so for each figure, which is a lot of clicking.</p> <h3 dir="auto">Proposed Solution</h3> <p dir="auto">Hence, at least for this use case, it would be reasonable to always update <code class="notranslate">savefig.directory</code> after an interactive save, even if its initial value is empty. I guess this may (like always) break some workflows(?!) -- although that seems slightly unlikely to me --, so we may possibly just put the decision of whether to ever update that rcParam into yet another separate rcParam (<code class="notranslate">savefig.update_directory_after_save</code>)... or we may decide it's not worth that additional complexity unless someone actually complains ;-)</p> <h3 dir="auto">Additional context and prior art</h3>
1
<p dir="auto">I do a fair bit of editing in Markdown, and I like to hard-wrap blocks of text at column 120 (as opposed to the visual wrapping that happens in VSCode based on the editor.wrappingColumn setting).</p> <p dir="auto">It would be really helpful to have a visual guide at a user-defined column number. This visual guide would affect nothing, it would merely appear as a faintly visible vertical line that shows where the specified column is, such as column 120. That way, when I'm writing large blocks of text, I don't have to constantly look down to the column number indicator to see where I should be hard-wrapping the text.</p>
<p dir="auto">Ruler settings would be helpful for showing end of row text.<br> <strong>Sublime text</strong>:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3235047/12016568/ae2bb45c-ad5d-11e5-8a91-c8ef43c7a0cb.png"><img src="https://cloud.githubusercontent.com/assets/3235047/12016568/ae2bb45c-ad5d-11e5-8a91-c8ef43c7a0cb.png" alt="1234" style="max-width: 100%;"></a></p>
1
<h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: Yes</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Ubuntu 16.04</li> <li><strong>TensorFlow installed from (source or binary)</strong>: Source</li> <li><strong>TensorFlow version (use command below)</strong>: r1.5</li> <li><strong>Python version</strong>: 3.5.2</li> <li><strong>Bazel version (if compiling from source)</strong>: 0.9.0</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: 5.4.0</li> <li><strong>CUDA/cuDNN version</strong>: Cuda 8.0 and cuDNN 7.0</li> <li><strong>GPU model and memory</strong>: Jetson TX2</li> </ul> <h3 dir="auto">The problem</h3> <p dir="auto">I created a fully convolutional float 16 (half precision) neural network in tensorflow. When I run this network with some inputs, the inference time is slower than when I run the same network in float 32 (full precision) mode.<br> I should also note that the following variables are set:</p> <p dir="auto"><code class="notranslate">os.environ['TF_FP16_CONV_USE_FP32_COMPUTE'] = '0' os.environ['TF_FP16_MATMUL_USE_FP32_COMPUTE'] = '0'</code></p> <p dir="auto">As Nvidia Jetson TX2 support FP16 operations, I expected an inference time not worse than when I use FP32, but surprisingly it is about 1.5 times worse! (36 miliseconds vs 22 miliseconds). I guess it is becuase of the overhead of internal type conversion in the tensorflow core between float16 and float32!</p> <p dir="auto">Is it a problem with Tensorflow or TX2?</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="136722135" data-permission-text="Title is private" data-url="https://github.com/tensorflow/tensorflow/issues/1300" data-hovercard-type="issue" data-hovercard-url="/tensorflow/tensorflow/issues/1300/hovercard" href="https://github.com/tensorflow/tensorflow/issues/1300">#1300</a></p> <p dir="auto">I have got a nvidia p100 GPU which is support fp16, and I run the TF case 'cifar10_train.py'. Without option '--use_fp16', the performance is also 1600 examples/sec, and with the option '--use_fp16', the performance down to 500 examples/sec. Any ideas about this issue?</p> <p dir="auto">userid@ubuntu-WK-4xP100:<del>/weike/tensorflow-r0.11/tensorflow/models/image/cifar10$ vi cifar10_train.py<br> userid@ubuntu-WK-4xP100:</del>/weike/tensorflow-r0.11/tensorflow/models/image/cifar10$ python cifar10_train.py<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so.8.0 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so.5 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so.8.0 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so.8.0 locally</p> <blockquote> <blockquote> <p dir="auto">Downloading cifar-10-binary.tar.gz 100.0%<br> ...<br> 2016-11-14 00:07:57.143739: step 0, loss = 4.67 (12.1 examples/sec; 10.549 sec/batch)<br> 2016-11-14 00:07:58.395209: step 10, loss = 4.57 (1693.6 examples/sec; 0.076 sec/batch)<br> 2016-11-14 00:07:59.177525: step 20, loss = 4.97 (1668.9 examples/sec; 0.077 sec/batch)<br> 2016-11-14 00:07:59.957789: step 30, loss = 4.43 (1588.3 examples/sec; 0.081 sec/batch)<br> 2016-11-14 00:08:00.738431: step 40, loss = 4.52 (1690.5 examples/sec; 0.076 sec/batch)<br> 2016-11-14 00:08:01.501940: step 50, loss = 4.33 (1680.4 examples/sec; 0.076 sec/batch)<br> 2016-11-14 00:08:02.241604: step 60, loss = 4.20 (1733.4 examples/sec; 0.074 sec/batch)<br> 2016-11-14 00:08:03.001845: step 70, loss = 4.27 (1706.0 examples/sec; 0.075 sec/batch)<br> 2016-11-14 00:08:03.765522: step 80, loss = 4.18 (1601.3 examples/sec; 0.080 sec/batch)<br> 2016-11-14 00:08:04.516780: step 90, loss = 4.25 (1646.3 examples/sec; 0.078 sec/batch)</p> </blockquote> </blockquote> <p dir="auto">userid@ubuntu-WK-4xP100:~/weike/tensorflow-r0.11/tensorflow/models/image/cifar10$ python cifar10_train.py --use_fp16<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so.8.0 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so.5 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so.8.0 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally<br> I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so.8.0 locally<br> Filling queue with 20000 CIFAR images before starting to train. This will take a few minutes.<br> ..<br> 2016-11-14 00:09:09.382854: step 0, loss = 4.67 (12.3 examples/sec; 10.411 sec/batch)<br> 2016-11-14 00:09:11.923842: step 10, loss = 4.58 (659.6 examples/sec; 0.194 sec/batch)<br> 2016-11-14 00:09:13.918448: step 20, loss = 6.62 (460.6 examples/sec; 0.278 sec/batch)<br> 2016-11-14 00:09:16.211809: step 30, loss = 4.37 (583.7 examples/sec; 0.219 sec/batch)<br> 2016-11-14 00:09:18.327690: step 40, loss = 4.30 (618.3 examples/sec; 0.207 sec/batch)<br> 2016-11-14 00:09:20.395409: step 50, loss = 4.37 (643.8 examples/sec; 0.199 sec/batch)<br> 2016-11-14 00:09:22.466230: step 60, loss = 4.32 (574.0 examples/sec; 0.223 sec/batch)<br> 2016-11-14 00:09:24.533225: step 70, loss = 4.17 (646.2 examples/sec; 0.198 sec/batch)<br> 2016-11-14 00:09:26.609277: step 80, loss = 2.59 (601.5 examples/sec; 0.213 sec/batch)<br> 2016-11-14 00:09:28.703648: step 90, loss = 4.15 (625.5 examples/sec; 0.205 sec/batch)</p>
1
<p dir="auto">I am using the Chart.js library which does auto-sizing of the chart on window resize. It does that by using setTimeout() and clearTimeout() when the event is triggered.</p> <p dir="auto">The <code class="notranslate">clearTimeout</code> is tripping zone.js</p> <p dir="auto">Plunkr: <a href="http://plnkr.co/edit/JZMytm59PPlYq3bdSoHy" rel="nofollow">http://plnkr.co/edit/JZMytm59PPlYq3bdSoHy</a></p> <p dir="auto">Not sure if this is an issue with Angular or Zone or Chart.js. I tested chart.js independently and it works fine for window resize, when not inside an Angular component.</p>
<p dir="auto">[x] bug report</p> <p dir="auto">Either of these will crash zones</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var timerId = 42; // anything that isn't actually a handle clearInterval(timerId); // Error: cannot read property 'cancelTask' of undefined"><pre class="notranslate"><code class="notranslate">var timerId = 42; // anything that isn't actually a handle clearInterval(timerId); // Error: cannot read property 'cancelTask' of undefined </code></pre></div> <p dir="auto">and try this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var timerId = setInterval(()=&gt;{},1000); clearInterval(timerId); // clears the first timer clearInterval(timerId); // called twice ... boom! // Uncaught Error: Task does not support cancellation, or is already canceled."><pre class="notranslate"><code class="notranslate">var timerId = setInterval(()=&gt;{},1000); clearInterval(timerId); // clears the first timer clearInterval(timerId); // called twice ... boom! // Uncaught Error: Task does not support cancellation, or is already canceled. </code></pre></div> <p dir="auto"><code class="notranslate">clearInterval</code> is supposed to be safe in both cases`. It worked in beta.9</p> <p dir="auto">Here it is in a plunker:<br> <a href="http://plnkr.co/edit/nyQIKU4JzTlwp5eOG7Qo?p=preview" rel="nofollow">http://plnkr.co/edit/nyQIKU4JzTlwp5eOG7Qo?p=preview</a></p> <p dir="auto">Discovered while testing the docs "Cookbook Component Communication" sample. Here it is in the context of that cutdown sample:<br> <a href="http://plnkr.co/edit/pYlQdKk6qLOGhQwSreoG?p=preview" rel="nofollow">http://plnkr.co/edit/pYlQdKk6qLOGhQwSreoG?p=preview</a></p>
1
<p dir="auto">For the datepicker &amp; the timepicker components, it'd be very cool to have the option to make certain days/times unavailable, say for a booking app for instance.</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/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul>
<blockquote> <p dir="auto">Material-UI was designed with the Roboto font in mind. So be sure to include it in your project. Here are some instructions on how to do so.</p> </blockquote> <p dir="auto">The "some instructions" link is redirecting back to the fonts preview page.</p>
0
<p dir="auto"><a href="https://github.com/golang/go/blob/master/src/net/ipsock.go#L204">https://github.com/golang/go/blob/master/src/net/ipsock.go#L204</a></p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type addrList []Addr func internetAddrList(net, addr string, deadline time.Time) (addrList, error)"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">addrList</span> []<span class="pl-smi">Addr</span> <span class="pl-k">func</span> <span class="pl-en">internetAddrList</span>(<span class="pl-s1">net</span>, <span class="pl-s1">addr</span> <span class="pl-smi">string</span>, <span class="pl-s1">deadline</span> time.<span class="pl-smi">Time</span>) (<span class="pl-smi">addrList</span>, <span class="pl-smi">error</span>)</pre></div> <p dir="auto">However the internetAddrList only return one valid address.<br> I proposal split addr string by "," and return REAL addrList.</p>
<p dir="auto">The following example program:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main import ( &quot;net&quot; ) func main() { net.Listen(&quot;tcp&quot;, &quot;localhost:8080&quot;) select{} }"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-k">import</span> ( <span class="pl-s">"net"</span> ) <span class="pl-k">func</span> <span class="pl-en">main</span>() { <span class="pl-s1">net</span>.<span class="pl-en">Listen</span>(<span class="pl-s">"tcp"</span>, <span class="pl-s">"localhost:8080"</span>) <span class="pl-k">select</span>{} }</pre></div> <p dir="auto">Currently yields this result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ netstat -nl | grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN"><pre class="notranslate"><code class="notranslate">$ netstat -nl | grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN </code></pre></div> <p dir="auto">While the following result would be optimal:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ netstat -nl | grep 8080 tcp6 0 0 127.0.0.1:8080 :::* LISTEN tcp6 0 0 ::1:8080 :::* LISTEN"><pre class="notranslate"><code class="notranslate">$ netstat -nl | grep 8080 tcp6 0 0 127.0.0.1:8080 :::* LISTEN tcp6 0 0 ::1:8080 :::* LISTEN </code></pre></div> <p dir="auto">(Note that the first socket is actually dualstack, and bound to ::ffff:127.0.0.1, but that's less critical than adding the second socket bound to ::1.)</p> <p dir="auto">More generally, when you call <code class="notranslate">net.Listen()</code> on a hostname which resolves to multiple IPv4/IPv6 addresses, only the first IPv4 address is selected. An analogous problem occurs if you <code class="notranslate">Listen("tcp", ":8080")</code> on an operating system that doesn't support dualstack sockets: instead of returning a pair of sockets bound to <code class="notranslate">[::]:8080</code> and <code class="notranslate">0.0.0.0:80</code>, you only get IPv4.</p> <p dir="auto">The fundamental flaw is that <code class="notranslate">Listen()</code> assumes a single socket, which is a leaky abstraction that's inappropriate for high-level things like example servers, e.g.:<br> <a href="http://golang.org/pkg/net/#pkg-overview" rel="nofollow">http://golang.org/pkg/net/#pkg-overview</a></p> <p dir="auto">Go should either adapt the <code class="notranslate">Listen()</code> API to support multiple sockets, or if that's not feasible, a new multi-socket API should be introduced, which deprecates <code class="notranslate">Listen()</code> for all cases except simple non-wildcard addresses.</p>
1
<p dir="auto">Calling the pd.Series interpolate with method='time' returns inconsistent results when the first or the last value is NaN.</p> <p dir="auto">When the first value is NaN, interpolation is <strong>not</strong> performed on the first value. This is, for me, the expected behaviour since interpolation is not possible.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.Series(index=[datetime(2017,1,1), datetime(2017,1,2), datetime(2017,1,7)], data=[float('nan'), float('nan'), 3]).interpolate(method='time')"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>), <span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>), <span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">7</span>)], <span class="pl-s1">data</span><span class="pl-c1">=</span>[<span class="pl-en">float</span>(<span class="pl-s">'nan'</span>), <span class="pl-en">float</span>(<span class="pl-s">'nan'</span>), <span class="pl-c1">3</span>]).<span class="pl-en">interpolate</span>(<span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">'time'</span>)</pre></div> <p dir="auto">2017-01-01 NaN<br> 2017-01-02 NaN<br> 2017-01-07 3.0<br> dtype: float64</p> <p dir="auto">When the last value is a NaN, 'interpolation' is performed (like a forward-fill). I was expecting to keep the NaN values</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.Series(index=[datetime(2017,1,1), datetime(2017,1,2), datetime(2017,1,7)], data=[1, float('nan'), float('nan')]).interpolate(method='time')"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span>[<span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>), <span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>), <span class="pl-en">datetime</span>(<span class="pl-c1">2017</span>,<span class="pl-c1">1</span>,<span class="pl-c1">7</span>)], <span class="pl-s1">data</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-en">float</span>(<span class="pl-s">'nan'</span>), <span class="pl-en">float</span>(<span class="pl-s">'nan'</span>)]).<span class="pl-en">interpolate</span>(<span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">'time'</span>)</pre></div> <p dir="auto">2017-01-01 1.0<br> 2017-01-02 1.0<br> 2017-01-07 1.0<br> dtype: float64</p> <details> <h2 dir="auto">pd.show_versions()<br> INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.5.2.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.4.0-53-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8<br> pandas: 0.19.1<br> nose: None<br> pip: 9.0.1<br> setuptools: 27.2.0<br> Cython: None<br> numpy: 1.11.3<br> scipy: 0.18.1<br> statsmodels: None<br> xarray: None<br> IPython: None<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.0<br> pytz: 2016.7<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.8<br> boto: None<br> pandas_datareader: None</p> </details>
<p dir="auto">See also the discussion at <a href="http://stackoverflow.com/questions/25255496/dataframe-interpolate-extrapolates-over-trailing-missing-data" rel="nofollow">StackOverflow</a>.</p> <p dir="auto">Linear interpolation on a series with missing data at the end of the array will overwrite trailing missing values with the last non-missing value. In effect, the function extrapolates rather than strictly interpolating.</p> <p dir="auto">Example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np a = pd.Series([np.nan, 1, np.nan, 3, np.nan]) a.interpolate()"><pre class="notranslate"><code class="notranslate">import pandas as pd import numpy as np a = pd.Series([np.nan, 1, np.nan, 3, np.nan]) a.interpolate() </code></pre></div> <p dir="auto">Yields (note the extrapolated 4):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 NaN 1 1 2 2 3 3 4 4 5 4 dtype: float64"><pre class="notranslate"><code class="notranslate">0 NaN 1 1 2 2 3 3 4 4 5 4 dtype: float64 </code></pre></div> <p dir="auto">not</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 NaN 1 1 2 2 3 3 4 4 5 NaN dtype: float64"><pre class="notranslate"><code class="notranslate">0 NaN 1 1 2 2 3 3 4 4 5 NaN dtype: float64 </code></pre></div> <p dir="auto">I believe the fix is something along the lines of changing lines 1545:1546 in core/common.py from</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid])"><pre class="notranslate"><code class="notranslate">result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid]) </code></pre></div> <p dir="auto">to</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid], np.nan, np.nan)"><pre class="notranslate"><code class="notranslate">result[firstIndex:][invalid] = np.interp(inds[invalid], inds[valid], yvalues[firstIndex:][valid], np.nan, np.nan) </code></pre></div>
1
<p dir="auto">Matrices and array environments would be useful to display with matplotlib.</p> <p dir="auto">Here is a stackoverflow question that is related: <a href="http://stackoverflow.com/questions/26329177/how-to-display-a-matrix-in-the-matplotlib-annotations" rel="nofollow">http://stackoverflow.com/questions/26329177/how-to-display-a-matrix-in-the-matplotlib-annotations</a></p> <p dir="auto">We'd also like support for our SymPy printing backends. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109294341" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/5162" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/5162/hovercard" href="https://github.com/matplotlib/matplotlib/issues/5162">#5162</a> for some related info.</p>
<p dir="auto"><a href="https://sourceforge.net/tracker/?func=detail&amp;aid=2766156&amp;group_id=80706&amp;atid=560723" rel="nofollow">Original report at SourceForge, opened Wed Apr 15 14:40:54 2009</a></p> <p dir="auto">MPL currently has great math support for single line equations, but not for multiple line ones. We ran into this problem when generating docs using sphinx. The following snippet:</p> <h3 dir="auto">/begin</h3> <p dir="auto">.. math::</p> <p dir="auto">E(t) = x + \delta(t)</p> <p dir="auto">This type of experiment can be represented by two counting processes<br> :math:<code class="notranslate">(E_a, E_b)</code> defined as</p> <p dir="auto">.. math::</p> <p dir="auto">\begin{aligned}<br> E_a(t) &amp;= a + \delta(t) <br> E_b(t) &amp;= b + \delta(t)<br> \end{aligned}</p> <h3 dir="auto">/end</h3> <p dir="auto">has one single-line displayed equation, one inline and one multiline chunk. The first two are rendered fine by MPL, but the latter fails. It would be great to have MPL support this.</p> <p dir="auto">While multiline equations are not too common in plots, they could be very useful in certain cases, if this feature was supported.</p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In file included from /mnt/sda2/delaat/julia/deps/libuv/include/uv.h:67:0, from src/unix/async.c:25: /mnt/sda2/delaat/julia/deps/libuv/include/uv-private/uv-unix.h:132:1: error: unknown type name 'pthread_rwlock_t' /mnt/sda2/delaat/julia/deps/libuv/include/uv-private/uv-unix.h:149:1: error: unknown type name 'pthread_barrier_t' In file included from src/unix/async.c:25:0: /mnt/sda2/delaat/julia/deps/libuv/include/uv.h:353:42: warning: 'struct addrinfo' declared inside parameter list [enabled by default] In file included from src/unix/internal.h:35:0, from src/unix/async.c:26: src/unix/linux-syscalls.h:129:21: error: unknown type name 'sigset_t' src/unix/async.c: In function 'uv__async_start': src/unix/async.c:214:3: warning: implicit declaration of function 'uv__make_pipe' [-Wimplicit-function-declaration] make[3]: *** [src/unix/async.o] Error 1 make[2]: *** [libuv/libuv.a] Error 2 make[1]: *** [julia-release] Error 2 make: *** [release] Error 2"><pre class="notranslate"><code class="notranslate">In file included from /mnt/sda2/delaat/julia/deps/libuv/include/uv.h:67:0, from src/unix/async.c:25: /mnt/sda2/delaat/julia/deps/libuv/include/uv-private/uv-unix.h:132:1: error: unknown type name 'pthread_rwlock_t' /mnt/sda2/delaat/julia/deps/libuv/include/uv-private/uv-unix.h:149:1: error: unknown type name 'pthread_barrier_t' In file included from src/unix/async.c:25:0: /mnt/sda2/delaat/julia/deps/libuv/include/uv.h:353:42: warning: 'struct addrinfo' declared inside parameter list [enabled by default] In file included from src/unix/internal.h:35:0, from src/unix/async.c:26: src/unix/linux-syscalls.h:129:21: error: unknown type name 'sigset_t' src/unix/async.c: In function 'uv__async_start': src/unix/async.c:214:3: warning: implicit declaration of function 'uv__make_pipe' [-Wimplicit-function-declaration] make[3]: *** [src/unix/async.o] Error 1 make[2]: *** [libuv/libuv.a] Error 2 make[1]: *** [julia-release] Error 2 make: *** [release] Error 2 </code></pre></div>
<p dir="auto">Hi,</p> <p dir="auto">On <code class="notranslate">0.1.1</code> tag and master I get the following make error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In file included from /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:67, from src/unix/async.c:25: /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:132: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_rwlock_t¢ /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:149: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_barrier_t¢ In file included from src/unix/async.c:25: /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:353: warning: ¡struct addrinfo¢ declared inside parameter list /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1856: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1857: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1858: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1859: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1860: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1861: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1862: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1863: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1898: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1899: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1900: error: expected ¡)¢ before ¡*¢ token In file included from src/unix/internal.h:35, from src/unix/async.c:26: src/unix/linux-syscalls.h:129: warning: type defaults to ¡int¢ in declaration of ¡sigset_t¢ src/unix/linux-syscalls.h:129: error: expected ¡;¢, ¡,¢ or ¡)¢ before ¡*¢ token src/unix/async.c: In function ¡uv__async_start¢: src/unix/async.c:214: warning: implicit declaration of function ¡uv__make_pipe¢ make[3]: *** [src/unix/async.o] Error 1 make[2]: *** [libuv/libuv.a] Error 2 make[1]: *** [julia-release] Error 2 make: *** [release] Error 2"><pre class="notranslate"><code class="notranslate">In file included from /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:67, from src/unix/async.c:25: /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:132: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_rwlock_t¢ /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv-private/uv-unix.h:149: error: expected ¡=¢, ¡,¢, ¡;¢, ¡asm¢ or ¡__attribute__¢ before ¡uv_barrier_t¢ In file included from src/unix/async.c:25: /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:353: warning: ¡struct addrinfo¢ declared inside parameter list /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1856: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1857: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1858: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1859: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1860: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1861: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1862: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1863: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1898: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1899: error: expected ¡)¢ before ¡*¢ token /home/user/RedHatEnterpriseWS6/julia-master/deps/libuv/include/uv.h:1900: error: expected ¡)¢ before ¡*¢ token In file included from src/unix/internal.h:35, from src/unix/async.c:26: src/unix/linux-syscalls.h:129: warning: type defaults to ¡int¢ in declaration of ¡sigset_t¢ src/unix/linux-syscalls.h:129: error: expected ¡;¢, ¡,¢ or ¡)¢ before ¡*¢ token src/unix/async.c: In function ¡uv__async_start¢: src/unix/async.c:214: warning: implicit declaration of function ¡uv__make_pipe¢ make[3]: *** [src/unix/async.o] Error 1 make[2]: *** [libuv/libuv.a] Error 2 make[1]: *** [julia-release] Error 2 make: *** [release] Error 2 </code></pre></div> <p dir="auto">I tried both 1.1 branch and master and got the same error. I tried <code class="notranslate">make -C deps/libuv clean; make</code> and from a fresh install which didn't work.</p> <p dir="auto">Thanks,</p> <p dir="auto">Glen</p>
1
<h3 dir="auto">Version</h3> <p dir="auto">2.6.11</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codesandbox.io/s/vue2611-q4ky0?file=/src/components/HelloWorld.vue" rel="nofollow">https://codesandbox.io/s/vue2611-q4ky0?file=/src/components/HelloWorld.vue</a></p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>Follow the codesandbox link</li> <li>Click on the "Component Vue 2.6.11" text in the browser view to enable "edit mode"</li> <li>Click "cancel edit" to exit "edit mode"</li> </ol> <h3 dir="auto">What is expected?</h3> <p dir="auto">It is expected that $nextTick will defer the setting of the variable "editMode" to false, preventing the parent container click event from executing and re-setting the variable to true. (see line 26)</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">$nextTick isn't deferring execution as it did in 2.5.x. The variable "editMode" is being set to false and then the parent container click event immediately resets it to true.</p> <hr> <p dir="auto">Here is the codesandbox link for v2.5.22 to see how it behaved prior to 2.6.x:<br> <a href="https://codesandbox.io/s/vue2522-xo346?file=/src/components/HelloWorld.vue" rel="nofollow">https://codesandbox.io/s/vue2522-xo346?file=/src/components/HelloWorld.vue</a></p> <p dir="auto">I ran into this bug while trying to upgrade from 2.5.22 to 2.6.11. It broke our production app everywhere this edit component was used. For this type of edit component, this is a pretty natural design pattern.</p> <p dir="auto">Side note: If this is an intentional breaking change, are there recommended work arounds for these type of components (besides DOM restructuring)?</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.0-beta.1</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codepen.io/frlinw/pen/OreZMz" rel="nofollow">https://codepen.io/frlinw/pen/OreZMz</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Click on "Click me"</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">demo with v2.5.22 show the expected behavior: <a href="https://codepen.io/frlinw/pen/XoLYMR" rel="nofollow">https://codepen.io/frlinw/pen/XoLYMR</a></p> <p dir="auto">the "Dropdown" component should not be able to handle a click event which is supposed to create it</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">the Dropdown is automatically closed because it handles the click event</p>
1
<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 (if applicable): 0.6.2951.0 Any other software? Not important # Steps to reproduce Laptop DELL XPS 9560 (screen resolution 1920x1080) is connected to an external USB-C LG 4k 27&quot; monitor (LG 27UK650). Open terminal and move it from the second screen to the laptop's screen and the terminal will close without any error message after 2 seconds. # Expected behavior Terminal not to crash when moved to a second display. # Actual behavior Terminal closes when moved to a separate display"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.6.2951.0 Any other software? Not important # Steps to reproduce Laptop DELL XPS 9560 (screen resolution 1920x1080) is connected to an external USB-C LG 4k 27" monitor (LG 27UK650). Open terminal and move it from the second screen to the laptop's screen and the terminal will close without any error message after 2 seconds. # Expected behavior Terminal not to crash when moved to a second display. # Actual behavior Terminal closes when moved to a separate display </code></pre></div>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): 2019.1022.2157.0 Any other software? (WSL)"><pre lang="none" class="notranslate"><code class="notranslate">Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): 2019.1022.2157.0 Any other software? (WSL) </code></pre></div> <p dir="auto">I originaly asked this as a question on the unix stackexchange, because I thought this to be an issue with the WSL and not windows terminal. (<a href="https://unix.stackexchange.com/questions/550033/ansi-40-black-background-does-not-work-in-wsl-using-windows-terminal" rel="nofollow">Original Question</a>)</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Add the following Color scheme (or any other, I tried It didn't matter) to the profiles.json</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;background&quot;: &quot;#ECF0F1&quot;, &quot;black&quot;: &quot;#2C3E50&quot;, &quot;blue&quot;: &quot;#3498DB&quot;, &quot;brightBlack&quot;: &quot;#95A5A6&quot;, &quot;brightBlue&quot;: &quot;#3498DB&quot;, &quot;brightCyan&quot;: &quot;#1ABC9C&quot;, &quot;brightGreen&quot;: &quot;#2ECC71&quot;, &quot;brightPurple&quot;: &quot;#9B59B6&quot;, &quot;brightRed&quot;: &quot;#E74C3C&quot;, &quot;brightWhite&quot;: &quot;#ECF0F1&quot;, &quot;brightYellow&quot;: &quot;#F1C40F&quot;, &quot;cyan&quot;: &quot;#1ABC9C&quot;, &quot;foreground&quot;: &quot;#7F8C8D&quot;, &quot;green&quot;: &quot;#2ECC71&quot;, &quot;name&quot;: &quot;Flat Light&quot;, &quot;purple&quot;: &quot;#9B59B6&quot;, &quot;red&quot;: &quot;#E74C3C&quot;, &quot;white&quot;: &quot;#e0e0e0&quot;, &quot;yellow&quot;: &quot;#F1C40F&quot; }"><pre class="notranslate">{ <span class="pl-ent">"background"</span>: <span class="pl-s"><span class="pl-pds">"</span>#ECF0F1<span class="pl-pds">"</span></span>, <span class="pl-ent">"black"</span>: <span class="pl-s"><span class="pl-pds">"</span>#2C3E50<span class="pl-pds">"</span></span>, <span class="pl-ent">"blue"</span>: <span class="pl-s"><span class="pl-pds">"</span>#3498DB<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightBlack"</span>: <span class="pl-s"><span class="pl-pds">"</span>#95A5A6<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightBlue"</span>: <span class="pl-s"><span class="pl-pds">"</span>#3498DB<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightCyan"</span>: <span class="pl-s"><span class="pl-pds">"</span>#1ABC9C<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightGreen"</span>: <span class="pl-s"><span class="pl-pds">"</span>#2ECC71<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightPurple"</span>: <span class="pl-s"><span class="pl-pds">"</span>#9B59B6<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightRed"</span>: <span class="pl-s"><span class="pl-pds">"</span>#E74C3C<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightWhite"</span>: <span class="pl-s"><span class="pl-pds">"</span>#ECF0F1<span class="pl-pds">"</span></span>, <span class="pl-ent">"brightYellow"</span>: <span class="pl-s"><span class="pl-pds">"</span>#F1C40F<span class="pl-pds">"</span></span>, <span class="pl-ent">"cyan"</span>: <span class="pl-s"><span class="pl-pds">"</span>#1ABC9C<span class="pl-pds">"</span></span>, <span class="pl-ent">"foreground"</span>: <span class="pl-s"><span class="pl-pds">"</span>#7F8C8D<span class="pl-pds">"</span></span>, <span class="pl-ent">"green"</span>: <span class="pl-s"><span class="pl-pds">"</span>#2ECC71<span class="pl-pds">"</span></span>, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>Flat Light<span class="pl-pds">"</span></span>, <span class="pl-ent">"purple"</span>: <span class="pl-s"><span class="pl-pds">"</span>#9B59B6<span class="pl-pds">"</span></span>, <span class="pl-ent">"red"</span>: <span class="pl-s"><span class="pl-pds">"</span>#E74C3C<span class="pl-pds">"</span></span>, <span class="pl-ent">"white"</span>: <span class="pl-s"><span class="pl-pds">"</span>#e0e0e0<span class="pl-pds">"</span></span>, <span class="pl-ent">"yellow"</span>: <span class="pl-s"><span class="pl-pds">"</span>#F1C40F<span class="pl-pds">"</span></span> }</pre></div> <p dir="auto">And enable it for any profile. (I tried WSL (Arch &amp; Ubuntu) aswell as cmd)<br> Now if you try to get an black background of some sort. You'll get the background color.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31540351/68331725-c288ca00-00d5-11ea-88ae-a9b4f2f8c30c.png"><img src="https://user-images.githubusercontent.com/31540351/68331725-c288ca00-00d5-11ea-88ae-a9b4f2f8c30c.png" alt="1" style="max-width: 100%;"></a></p> <p dir="auto">I tried <code class="notranslate">printf "\033[40;30mNot a black background"</code> on WSL aswell as <code class="notranslate">color 0f</code> on cmd.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">The blackground is suposed to be black (grayish blue) on ASNI 40.</p> <hr> <p dir="auto">I assume that this is the result of my incompetence rather that an actual bug, but in this case the documentation should be updated.</p>
0
<p dir="auto">I have a dialog with a table in it that requires scrolling. The table contains a column that contains icons with tooltips. Everything is okay when tooltip placement='bottom'. When I change placement to 'right' an additional scrolling bar appears inside the dialog.</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/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Same as with Tooltip placement='bottom'</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/3v4wrk3jn1" rel="nofollow">https://codesandbox.io/s/3v4wrk3jn1</a></p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.21</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><code class="notranslate">&lt;Switch checked={this.props.isChecked} /&gt;</code><br> When this.props.isChecked is <strong>undefined</strong>( on initial render), the switch is off. When this.props.isChecked later updates to <code class="notranslate">true</code>, the switch should be on.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">When initial value is <code class="notranslate">true</code> or <code class="notranslate">false</code>, everything works as expected. When initial value = <code class="notranslate">undefined</code>, later updates do not show</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/04w6919x4v" rel="nofollow">https://codesandbox.io/s/04w6919x4v</a></p> <p dir="auto">In the sample, both switches should become <code class="notranslate">true</code> after timeout of 2000. checkedA with initial value of false works, checkedB remains unchecked.</p> <h2 dir="auto">Context</h2> <p dir="auto">Checked prop should be Boolean or String, but sometimes initial values are undefined until server data arrives. a <code class="notranslate">!!checkedB</code> resolves the issue, but it can be very confusing.</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>v1.0.0-beta.25</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> <tr> <td>browser</td> <td>Firefox, Chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wolverine:kubernetes-0.7.1 pires$ ./build/make-run-images.sh +++ Verifying Prerequisites.... +++ Setting boot2docker clock You don't have a local copy of the golang docker image. This image is 450MB. Download it now? [y/n] y +++ Pulling docker image: golang:1.3 golang:1.3: The image you are pulling has been verified cd9d7733886c: Pull complete bc3ee983ce77: Pull complete 0ea4f77cbe62: Pull complete 59a867a98a17: Pull complete 218f135dec09: Pull complete d8a647f6492b: Pull complete 060f214cb89b: Pull complete 3c09e87b5ef2: Pull complete efebd35e7458: Pull complete ebd3fd90ae2e: Pull complete 511136ea3c5a: Already exists 36fd425d7d8a: Already exists aaabd2b41e22: Already exists Status: Downloaded newer image for golang:1.3 +++ Building Docker image kube-build:cross. +++ Building Docker image kube-build:build-9759e. +++ Running build command.... +++ Creating data container exec: &quot;build/build-image/make-binaries.sh&quot;: stat build/build-image/make-binaries.sh: no such file or directoryFATA[0000] Error response from daemon: Cannot start container a94744ddf85b5ef5043b9e60cc6ce972269129199e5de6af11cb2ce6d95b7695: exec: &quot;build/build-image/make-binaries.sh&quot;: stat build/build-image/make-binaries.sh: no such file or directory !!! Error in ./build/../build/common.sh:406 '&quot;${docker_cmd[@]}&quot; &quot;$@&quot;' exited with status 1 Call stack: 1: ./build/../build/common.sh:406 kube::build::run_build_command(...) 2: ./build/make-run-images.sh:32 main(...) Exiting with status 1 wolverine:kubernetes-0.7.1 pires$"><pre class="notranslate"><code class="notranslate">wolverine:kubernetes-0.7.1 pires$ ./build/make-run-images.sh +++ Verifying Prerequisites.... +++ Setting boot2docker clock You don't have a local copy of the golang docker image. This image is 450MB. Download it now? [y/n] y +++ Pulling docker image: golang:1.3 golang:1.3: The image you are pulling has been verified cd9d7733886c: Pull complete bc3ee983ce77: Pull complete 0ea4f77cbe62: Pull complete 59a867a98a17: Pull complete 218f135dec09: Pull complete d8a647f6492b: Pull complete 060f214cb89b: Pull complete 3c09e87b5ef2: Pull complete efebd35e7458: Pull complete ebd3fd90ae2e: Pull complete 511136ea3c5a: Already exists 36fd425d7d8a: Already exists aaabd2b41e22: Already exists Status: Downloaded newer image for golang:1.3 +++ Building Docker image kube-build:cross. +++ Building Docker image kube-build:build-9759e. +++ Running build command.... +++ Creating data container exec: "build/build-image/make-binaries.sh": stat build/build-image/make-binaries.sh: no such file or directoryFATA[0000] Error response from daemon: Cannot start container a94744ddf85b5ef5043b9e60cc6ce972269129199e5de6af11cb2ce6d95b7695: exec: "build/build-image/make-binaries.sh": stat build/build-image/make-binaries.sh: no such file or directory !!! Error in ./build/../build/common.sh:406 '"${docker_cmd[@]}" "$@"' exited with status 1 Call stack: 1: ./build/../build/common.sh:406 kube::build::run_build_command(...) 2: ./build/make-run-images.sh:32 main(...) Exiting with status 1 wolverine:kubernetes-0.7.1 pires$ </code></pre></div>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="173930785" data-permission-text="Title is private" data-url="https://github.com/kubernetes/test-infra/issues/470" data-hovercard-type="issue" data-hovercard-url="/kubernetes/test-infra/issues/470/hovercard" href="https://github.com/kubernetes/test-infra/issues/470">kubernetes/test-infra#470</a> filed against test-infra repo, but that is a somewhat forgotten repo, and we need to make sure that this does not get overlooked so duplicating here.</p> <p dir="auto">Without fixing this, it's difficult to run full e2e tests against submitted PR's before merging them, which makes it very easy to introduce regressions.</p>
0
<p dir="auto">Prompted by this deprecation warning:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Warning: In the future `findall(A)` will only work on boolean collections. Use `findall(x-&gt;x!=0, A)` instead."><pre class="notranslate"><code class="notranslate"> Warning: In the future `findall(A)` will only work on boolean collections. Use `findall(x-&gt;x!=0, A)` instead. </code></pre></div> <p dir="auto">I decided to do a (n admittedly worst-case) test: <code class="notranslate">A = rand(10_000, 10_000);</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @time u = findall(x-&gt;x != 0, A); # this assumes 0 = zero(eltype(A)) 8.606016 seconds (65.73 k allocations: 260.716 MiB, 2.96% gc time) julia&gt; @time v = findall(!iszero, A); 12.464981 seconds (40 allocations: 1.531 GiB, 4.27% gc time) julia&gt; @time w = findall((!iszero).(A)); 1.531174 seconds (23 allocations: 1.502 GiB, 12.50% gc time) julia&gt; u == v == w true"><pre class="notranslate"><code class="notranslate">julia&gt; @time u = findall(x-&gt;x != 0, A); # this assumes 0 = zero(eltype(A)) 8.606016 seconds (65.73 k allocations: 260.716 MiB, 2.96% gc time) julia&gt; @time v = findall(!iszero, A); 12.464981 seconds (40 allocations: 1.531 GiB, 4.27% gc time) julia&gt; @time w = findall((!iszero).(A)); 1.531174 seconds (23 allocations: 1.502 GiB, 12.50% gc time) julia&gt; u == v == w true </code></pre></div> <p dir="auto">Had I taken the recommended approach, I would've run into a pretty bad performance regression. As it stands, the best (time) performing approach is among the worst in memory usage; the recommended approach with the anonymous function is bad in time but best in memory, and the negative function is worst in both.</p>
<p dir="auto">Example:</p> <p dir="auto">This is printing ARGS / args at the start of <code class="notranslate">process_options</code> in <code class="notranslate">client.jl</code>.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" julia&gt; test = &quot;$JULIA_HOME/julia&quot; &quot;/Users/jacobbolewski/Julia/julia/usr/bin/julia&quot; julia&gt; run(`$test --code-coverage=none -e &quot;exit(0)&quot;`) args = UTF8String[&quot;-e&quot;,&quot;exit(0)&quot;] ARGS = UTF8String[&quot;-e&quot;,&quot;exit(0)&quot;] julia&gt; run(`$test --code_coverage=none -e &quot;exit(0)&quot;`) args = UTF8String[&quot;--code_coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;] ARGS = UTF8String[&quot;--code_coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;] ERROR: unknown option: --code_coverage=none in process_options at ./client.jl:321 in _start at ./client.jl:401 ERROR: failed process: Process(`/Users/jacobbolewski/Julia/julia/usr/bin/julia --code_coverage=none -e exit(0)`, ProcessExited(1)) [1] in run at /Users/jacobbolewski/Julia/julia/usr/lib/julia/sys.dylib julia&gt; run(`$test --color=no --code-coverage=none -e &quot;exit(0)&quot;`) args = UTF8String[&quot;--code-coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;] ARGS = UTF8String[&quot;--code-coverage=none&quot;,&quot;-e&quot;,&quot;exit(0)&quot;] julia&gt; run(`$test --color=yes -e &quot;exit(0)&quot;`) args = UTF8String[&quot;--color=yes&quot;,&quot;-e&quot;,&quot;exit(0)&quot;] ARGS = UTF8String[&quot;--color=yes&quot;,&quot;-e&quot;,&quot;exit(0)&quot;]"><pre class="notranslate">julia<span class="pl-k">&gt;</span> test <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-v">$JULIA_HOME</span>/julia<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>/Users/jacobbolewski/Julia/julia/usr/bin/julia<span class="pl-pds">"</span></span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --code-coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>) args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] <span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --code_coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>) args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code_coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] <span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code_coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] ERROR<span class="pl-k">:</span> unknown option<span class="pl-k">:</span> <span class="pl-k">--</span>code_coverage<span class="pl-k">=</span>none <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">321</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">401</span> ERROR<span class="pl-k">:</span> failed process<span class="pl-k">:</span> <span class="pl-c1">Process</span>(<span class="pl-s"><span class="pl-pds">`</span>/Users/jacobbolewski/Julia/julia/usr/bin/julia --code_coverage=none -e exit(0)<span class="pl-pds">`</span></span>, <span class="pl-c1">ProcessExited</span>(<span class="pl-c1">1</span>)) [<span class="pl-c1">1</span>] <span class="pl-k">in</span> run at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jacobbolewski<span class="pl-k">/</span>Julia<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>lib<span class="pl-k">/</span>julia<span class="pl-k">/</span>sys<span class="pl-k">.</span>dylib julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --color=no --code-coverage=none -e "exit(0)"<span class="pl-pds">`</span></span>) args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code-coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] <span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--code-coverage=none<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>$test --color=yes -e "exit(0)"<span class="pl-pds">`</span></span>) args <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--color=yes<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>] <span class="pl-c1">ARGS</span> <span class="pl-k">=</span> UTF8String[<span class="pl-s"><span class="pl-pds">"</span>--color=yes<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>-e<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>exit(0)<span class="pl-pds">"</span></span>]</pre></div> <p dir="auto">I can start digging around, but does anyone have ideas?</p>
0
<h3 dir="auto">System Information</h3> <p dir="auto">OpenCV versions tested: 4.5.5, 4.7.0<br> Operating System / Platform: Ubuntu 18.04<br> Device: NVIDIA Jetson TX2 DevKit<br> CUDA version: 10.2<br> CUDNN version: 8.2.1</p> <h3 dir="auto">Detailed description</h3> <p dir="auto">Hi,</p> <p dir="auto">I was using OpenCV 4.5.5, backend CUDA on a NVIDIA Jetson TX2 Devkit with the specs defined above. A couple of days I decided to update to OpenCV 4.7.0 to check if I had some boost in performance for the models I'm currently using. However what I did saw was a performance loss (in terms of execution time) for the majority of the models. Do you know what is the reason for this loss of performance?</p> <p dir="auto">This is the execution times obtained for both versions of OpenCV:</p> <h2 dir="auto">Test 1</h2><ul dir="auto"><li>Device: <strong>TX2 DevKit</strong></li><li><strong>CUDA </strong>version: <strong>10.2</strong></li><li><strong>CUDNN</strong> version: <strong>8.2.1</strong></li><li><strong>OpenCV </strong>version:<strong> 4.7.0</strong></li></ul><p dir="auto"><br></p> <table role="table"> <thead> <tr> <th>Version</th> <th>Model 1</th> <th>Model 2</th> <th>Model 3</th> <th>Model 4</th> </tr> </thead> <tbody> <tr> <td>Input Size</td> <td>(112, 112)</td> <td>(112, 112)</td> <td>(112, 112)</td> <td>(112, 112)</td> </tr> <tr> <td>Model Architecture</td> <td>Resnet100</td> <td>MobileFaceNet</td> <td>Resnet100</td> <td>Resnet18</td> </tr> <tr> <td>Jetson CPU</td> <td>702</td> <td>20.5</td> <td>699</td> <td>167</td> </tr> <tr> <td>Jetson GPU</td> <td><strong>91.7</strong></td> <td><strong>10.5</strong></td> <td><strong>91.6</strong></td> <td><strong>52.2</strong></td> </tr> </tbody> </table> <h2 dir="auto">Test 2</h2><ul dir="auto"><li>Device: <strong>TX2 DevKit</strong></li><li><strong>CUDA </strong>version: <strong>10.2</strong></li><li><strong>CUDNN</strong> version: <strong>8.2.1</strong></li><li><strong>OpenCV </strong>version:<strong> 4.5.5</strong></li></ul><p dir="auto"><br></p> <table role="table"> <thead> <tr> <th>Version</th> <th>Model 1</th> <th>Model 2</th> <th>Model 3</th> <th>Model 4</th> </tr> </thead> <tbody> <tr> <td>Input Size</td> <td>(112, 112)</td> <td>(112, 112)</td> <td>(112, 112)</td> <td>(112, 112)</td> </tr> <tr> <td>Model Architecture</td> <td>Resnet100</td> <td>MobileFaceNet</td> <td>Resnet100</td> <td>Resnet18</td> </tr> <tr> <td>Jetson CPU</td> <td>1088</td> <td>23.1</td> <td>1096</td> <td>257</td> </tr> <tr> <td>Jetson GPU</td> <td><strong>60.9</strong></td> <td><strong>5.34</strong></td> <td><strong>60.7</strong></td> <td><strong>19.9</strong></td> </tr> </tbody> </table> <p dir="auto"><strong>Note:</strong> Both tests were built with the same OpenCV flags and requirements, the only thing that changed was the version of both opencv and opencv_contrib. Moreover, all the execution times presented in those tables are in ms.</p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">You can use this piece of code to reproduce this issue/loss of performance:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#include &lt;thread&gt; #include &lt;fstream&gt; #include &lt;opencv2/imgproc.hpp&gt; #include &lt;opencv2/dnn.hpp&gt; #include &lt;opencv2/core.hpp&gt; #include &lt;opencv2/highgui.hpp&gt; int main(int argc, char** argv) { auto imageToTest = argv[1]; auto modelToTest = argv[2]; int modelInputWidth = atoi(argv[3]); int modelInputHeight = atoi(argv[4]); cv::Size currSize = cv::Size(modelInputWidth, modelInputHeight); std::string modelToTestOnnx = modelToTest; std::string imagefilename = imageToTest; unsigned int num_inferences = 100; cv::dnn::Net net = cv::dnn::readNetFromONNX(modelToTestOnnx); net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA); net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA); cv::Mat img = cv::imread(imagefilename, cv::IMREAD_ANYCOLOR); cv::Mat resized; cv::resize(img, resized, currSize); std::vector&lt;cv::Mat&gt; imgBatch = { resized }; bool swaprbchannels = false; cv::Mat blob = cv::dnn::blobFromImages(imgBatch, 1.0f / 255.0f, cv::Size(), cv::Scalar(), swaprbchannels, false, CV_32F); net.setInput(blob); std::vector&lt;cv::String&gt; unconnectedOutLayerNames = net.getUnconnectedOutLayersNames(); std::vector&lt;cv::Mat&gt; outputs; outputs.clear(); auto timeLoadModelPlusInference1 = std::chrono::high_resolution_clock::now(); net.forward(outputs, unconnectedOutLayerNames); auto timeLoadModelPlusInference2 = std::chrono::high_resolution_clock::now(); std::chrono::duration&lt;double, std::milli&gt; ms_doubleTimeLoadModelPlusInference = timeLoadModelPlusInference2 - timeLoadModelPlusInference1; std::cout &lt;&lt; &quot;Execution time (load model + inference): &quot; &lt;&lt; ms_doubleTimeLoadModelPlusInference.count() &lt;&lt; std::endl; // in ms auto time1 = std::chrono::high_resolution_clock::now(); try { for (size_t i = 0; i &lt; num_inferences; i++) net.forward(outputs, unconnectedOutLayerNames); } catch (std::exception&amp; ex) { std::cout &lt;&lt; ex.what() &lt;&lt; std::endl; } auto time2 = std::chrono::high_resolution_clock::now(); std::chrono::duration&lt;double, std::milli&gt; ms_double = time2 - time1; std::cout &lt;&lt; &quot;Execution time inference only: &quot; &lt;&lt; ms_double.count() / num_inferences &lt;&lt; std::endl; // in ms std::cout &lt;&lt; &quot;Outputs Size: &quot; &lt;&lt; outputs[0].size[0] &lt;&lt; &quot;x&quot; &lt;&lt; outputs[0].size[1] &lt;&lt; std::endl; std::cout &lt;&lt; &quot;Outputs value: &quot; &lt;&lt; outputs[0] &lt;&lt; std::endl; } "><pre class="notranslate"><code class="notranslate">#include &lt;thread&gt; #include &lt;fstream&gt; #include &lt;opencv2/imgproc.hpp&gt; #include &lt;opencv2/dnn.hpp&gt; #include &lt;opencv2/core.hpp&gt; #include &lt;opencv2/highgui.hpp&gt; int main(int argc, char** argv) { auto imageToTest = argv[1]; auto modelToTest = argv[2]; int modelInputWidth = atoi(argv[3]); int modelInputHeight = atoi(argv[4]); cv::Size currSize = cv::Size(modelInputWidth, modelInputHeight); std::string modelToTestOnnx = modelToTest; std::string imagefilename = imageToTest; unsigned int num_inferences = 100; cv::dnn::Net net = cv::dnn::readNetFromONNX(modelToTestOnnx); net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA); net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA); cv::Mat img = cv::imread(imagefilename, cv::IMREAD_ANYCOLOR); cv::Mat resized; cv::resize(img, resized, currSize); std::vector&lt;cv::Mat&gt; imgBatch = { resized }; bool swaprbchannels = false; cv::Mat blob = cv::dnn::blobFromImages(imgBatch, 1.0f / 255.0f, cv::Size(), cv::Scalar(), swaprbchannels, false, CV_32F); net.setInput(blob); std::vector&lt;cv::String&gt; unconnectedOutLayerNames = net.getUnconnectedOutLayersNames(); std::vector&lt;cv::Mat&gt; outputs; outputs.clear(); auto timeLoadModelPlusInference1 = std::chrono::high_resolution_clock::now(); net.forward(outputs, unconnectedOutLayerNames); auto timeLoadModelPlusInference2 = std::chrono::high_resolution_clock::now(); std::chrono::duration&lt;double, std::milli&gt; ms_doubleTimeLoadModelPlusInference = timeLoadModelPlusInference2 - timeLoadModelPlusInference1; std::cout &lt;&lt; "Execution time (load model + inference): " &lt;&lt; ms_doubleTimeLoadModelPlusInference.count() &lt;&lt; std::endl; // in ms auto time1 = std::chrono::high_resolution_clock::now(); try { for (size_t i = 0; i &lt; num_inferences; i++) net.forward(outputs, unconnectedOutLayerNames); } catch (std::exception&amp; ex) { std::cout &lt;&lt; ex.what() &lt;&lt; std::endl; } auto time2 = std::chrono::high_resolution_clock::now(); std::chrono::duration&lt;double, std::milli&gt; ms_double = time2 - time1; std::cout &lt;&lt; "Execution time inference only: " &lt;&lt; ms_double.count() / num_inferences &lt;&lt; std::endl; // in ms std::cout &lt;&lt; "Outputs Size: " &lt;&lt; outputs[0].size[0] &lt;&lt; "x" &lt;&lt; outputs[0].size[1] &lt;&lt; std::endl; std::cout &lt;&lt; "Outputs value: " &lt;&lt; outputs[0] &lt;&lt; std::endl; } </code></pre></div> <h3 dir="auto">Issue submission checklist</h3> <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, 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" checked=""> 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 =&gt; 4.0.1.25</li> <li>Operating System / Platform =&gt; Windows 64 bit</li> <li>Compiler =&gt; MSC v.1900 64 bit (AMD64)</li> </ul> <h5 dir="auto">Detailed description</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;thresh.py&quot;, line 24, in &lt;module&gt; cropped_image = region_of_interest(thresh_img) File &quot;thresh.py&quot;, line 13, in region_of_interest cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2) TypeError: an integer is required (got type tuple)"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "thresh.py", line 24, in &lt;module&gt; cropped_image = region_of_interest(thresh_img) File "thresh.py", line 13, in region_of_interest cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2) TypeError: an integer is required (got type tuple) </code></pre></div> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">The error arises in the rectangle() function.</p> <p dir="auto">Here is the small script in which i am trying to use it.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np import cv2 def thresh(image): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) _, th = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) return th def region_of_interest(image): height = image.shape[0] mask = np.zeros_like(image, np.uint8) req_height = 0.4*height cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2) masked_image = cv2.bitwise_and(image, mask) f_image = cv2.bitwise_not(masked_image) return f_image image = cv2.imread('image2.jpg') copy_img = np.copy(image) thresh_img = thresh(copy_img) cropped_image = region_of_interest(thresh_img) cv2.imshow('image', cropped_image) cv2.waitKey(0)"><pre class="notranslate"><code class="notranslate">import numpy as np import cv2 def thresh(image): gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) _, th = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) return th def region_of_interest(image): height = image.shape[0] mask = np.zeros_like(image, np.uint8) req_height = 0.4*height cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2) masked_image = cv2.bitwise_and(image, mask) f_image = cv2.bitwise_not(masked_image) return f_image image = cv2.imread('image2.jpg') copy_img = np.copy(image) thresh_img = thresh(copy_img) cropped_image = region_of_interest(thresh_img) cv2.imshow('image', cropped_image) cv2.waitKey(0) </code></pre></div> <p dir="auto">Error occuring on this line:-</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2)"><pre class="notranslate"><code class="notranslate"> cv2.rectangle(mask, (0, req_height), (image.shape[1], height), (0, 255, 0), 5, 2) </code></pre></div> <p dir="auto">I have tried passing in one argument after the color attribute.<br> I also have tried naming the attributes i.e:-<br> ---&gt; color=(0,255,0), thickness=5 etc.</p> <p dir="auto">Let me know if I have missed out any information which should have been given.</p>
0
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow):<br> Yes, duplicated the minimal code from documentation snippet from <a href="https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/distribute#example-with-keras-api">here</a></li> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04):"18.04.1 LTS (Bionic Beaver)"</li> <li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:None</li> <li>TensorFlow installed from (source or binary): source and binary</li> <li>TensorFlow version (use command below): v1.12.0-rc2-0-g748435b8ef</li> <li>Python version: 3.6.6</li> <li>Bazel version (if compiling from source): 0.15.2</li> <li>GCC/Compiler version (if compiling from source): 6.4.0</li> <li>CUDA/cuDNN version: 9.0 / 7.3</li> <li>GPU model and memory: 2 x 1080-ti</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> Cannot save a tf.keras model if trained with MirroredStrategy either by calling save_weight or by a tf.keras.callbacks.ModelCheckpoint, but does work if MirroredStrategy is not used.</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="inputs = tf.keras.layers.Input(shape=(1,)) predictions = tf.keras.layers.Dense(1)(inputs) model = tf.keras.models.Model(inputs=inputs, outputs=predictions) features = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10) labels = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10) train_dataset = tf.data.Dataset.zip((features, labels)) distribution = tf.contrib.distribute.MirroredStrategy() model.compile(loss='categorical_crossentropy', optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.2), distribute=distribution) model.fit(train_dataset, epochs=5, steps_per_epoch=10)"><pre class="notranslate"><code class="notranslate">inputs = tf.keras.layers.Input(shape=(1,)) predictions = tf.keras.layers.Dense(1)(inputs) model = tf.keras.models.Model(inputs=inputs, outputs=predictions) features = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10) labels = tf.data.Dataset.from_tensors([1.]).repeat(10000).batch(10) train_dataset = tf.data.Dataset.zip((features, labels)) distribution = tf.contrib.distribute.MirroredStrategy() model.compile(loss='categorical_crossentropy', optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.2), distribute=distribution) model.fit(train_dataset, epochs=5, steps_per_epoch=10) </code></pre></div> <p dir="auto">And adding:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model.save_weights('my_weight')"><pre class="notranslate"><code class="notranslate">model.save_weights('my_weight') </code></pre></div> <p dir="auto">Error looks like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py&quot;, line 72, in get return self._index[device] KeyError: '/replica:0/task:0/device:CPU:0' The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;minimal_example.py&quot;, line 17, in &lt;module&gt; model.save_weights('my_weight') File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py&quot;, line 1449, in save_weights session = backend.get_session() File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py&quot;, line 469, in get_session _initialize_variables(session) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py&quot;, line 722, in _initialize_variables variables = _get_variables(ops.get_default_graph()) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py&quot;, line 716, in _get_variables variables.update(opt.optimizer.variables()) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py&quot;, line 787, in variables optimizer_variables = [v for v in self._non_slot_variables() File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py&quot;, line 788, in &lt;listcomp&gt; if _from_current_graph(v)] File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py&quot;, line 781, in _from_current_graph return variable.op.graph is current_graph File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py&quot;, line 308, in op return self.get().op File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py&quot;, line 76, in get (device, self._index.keys(), device_util.current())), e) File &quot;&lt;string&gt;&quot;, line 3, in raise_from ValueError: Device /replica:0/task:0/device:CPU:0 not found in dict_keys(['/replica:0/task:0/device:GPU:0', '/replica:0/task:0/device:GPU:1']) (current device )"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py", line 72, in get return self._index[device] KeyError: '/replica:0/task:0/device:CPU:0' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "minimal_example.py", line 17, in &lt;module&gt; model.save_weights('my_weight') File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1449, in save_weights session = backend.get_session() File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 469, in get_session _initialize_variables(session) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 722, in _initialize_variables variables = _get_variables(ops.get_default_graph()) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/backend.py", line 716, in _get_variables variables.update(opt.optimizer.variables()) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 787, in variables optimizer_variables = [v for v in self._non_slot_variables() File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 788, in &lt;listcomp&gt; if _from_current_graph(v)] File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 781, in _from_current_graph return variable.op.graph is current_graph File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py", line 308, in op return self.get().op File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/contrib/distribute/python/values.py", line 76, in get (device, self._index.keys(), device_util.current())), e) File "&lt;string&gt;", line 3, in raise_from ValueError: Device /replica:0/task:0/device:CPU:0 not found in dict_keys(['/replica:0/task:0/device:GPU:0', '/replica:0/task:0/device:GPU:1']) (current device ) </code></pre></div> <p dir="auto">Changing to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="checkpoint_path = &quot;my_weight&quot; cp_callback = tf.keras.callbacks.ModelCheckpoint(checkpoint_path, save_weights_only=True, verbose=1, period=1) model.fit(train_dataset, epochs=5, steps_per_epoch=10, callbacks=[cp_callback])"><pre class="notranslate"><code class="notranslate">checkpoint_path = "my_weight" cp_callback = tf.keras.callbacks.ModelCheckpoint(checkpoint_path, save_weights_only=True, verbose=1, period=1) model.fit(train_dataset, epochs=5, steps_per_epoch=10, callbacks=[cp_callback]) </code></pre></div> <p dir="auto">Also does not work an end up with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Epoch 1/5 1/10 [==&gt;...........................] - ETA: 4s - loss: 1.1921e-07 Epoch 00001: saving model to model_dir/my_weight WARNING:tensorflow:You are accessing attribute _replicated_modelof the DistributedCallbackModel that may not have been set correctly. Traceback (most recent call last): File &quot;minimal_example.py&quot;, line 35, in &lt;module&gt; callbacks=[cp_callback]) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py&quot;, line 1624, in fit validation_steps=validation_steps) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_distributed.py&quot;, line 198, in fit_loop callbacks.on_epoch_end(epoch, epoch_logs) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py&quot;, line 214, in on_epoch_end callback.on_epoch_end(epoch, logs) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py&quot;, line 599, in on_epoch_end self.model.save_weights(filepath, overwrite=True) File &quot;/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py&quot;, line 2336, in save_weights self._replicated_model.save_weights(filepath, overwrite=overwrite, AttributeError: 'NoneType' object has no attribute 'save_weights'"><pre class="notranslate"><code class="notranslate">Epoch 1/5 1/10 [==&gt;...........................] - ETA: 4s - loss: 1.1921e-07 Epoch 00001: saving model to model_dir/my_weight WARNING:tensorflow:You are accessing attribute _replicated_modelof the DistributedCallbackModel that may not have been set correctly. Traceback (most recent call last): File "minimal_example.py", line 35, in &lt;module&gt; callbacks=[cp_callback]) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 1624, in fit validation_steps=validation_steps) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training_distributed.py", line 198, in fit_loop callbacks.on_epoch_end(epoch, epoch_logs) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py", line 214, in on_epoch_end callback.on_epoch_end(epoch, logs) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/callbacks.py", line 599, in on_epoch_end self.model.save_weights(filepath, overwrite=True) File "/home/BP/anaconda3/envs/tf12_gpu/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 2336, in save_weights self._replicated_model.save_weights(filepath, overwrite=overwrite, AttributeError: 'NoneType' object has no attribute 'save_weights' </code></pre></div>
<hr> <h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br> No</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br> N/A</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> N/A</li> <li><strong>TensorFlow version (use command below)</strong>:<br> N/A</li> <li><strong>Python version</strong>:<br> N/A</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">We need to expose <code class="notranslate">align_corners</code> in this Keras upsample<br> <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/layers/convolutional.py#L1935">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/keras/layers/convolutional.py#L1935</a></p> <p dir="auto">See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="354016520" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/10994" data-hovercard-type="pull_request" data-hovercard-url="/keras-team/keras/pull/10994/hovercard?comment_id=430305648&amp;comment_type=issue_comment" href="https://github.com/keras-team/keras/pull/10994#issuecomment-430305648">keras-team/keras#10994 (comment)</a></p>
0
<h1 dir="auto">Implement a feature that split one window into multiple windows</h1> <p dir="auto">Usually , when we start a terminal , and make a connection ,then the whole connection will occupy the whole window, I hope we can split one window into multiple ,then we can start connection in each sub window , then we can watch multiple connection at the same time. cool.</p> <p dir="auto">Maybe a picture is much more clear to express what I want ,<br> See bellow:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/36788337/67753291-769faa80-fa6f-11e9-8795-a9a09651183c.png"><img src="https://user-images.githubusercontent.com/36788337/67753291-769faa80-fa6f-11e9-8795-a9a09651183c.png" alt="slipt" style="max-width: 100%;"></a></p>
<h1 dir="auto">Description of the new feature/enhancement</h1> <p dir="auto">When opening a new CMD tab, the width of the tab is small due to the name of the prompt being small "cmd." This makes it a little uncomfortable, and if the tabs were to have a minimum width it would give it more space, specially when you're blazing through tabs and don't want to accidentally close the tab.</p> <p dir="auto">I think that the minimum width I highlited below would be way better than the smaller CMD tab.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/41349879/67162865-8237f680-f336-11e9-856c-42b40159f92e.png"><img src="https://user-images.githubusercontent.com/41349879/67162865-8237f680-f336-11e9-856c-42b40159f92e.png" alt="image" style="max-width: 100%;"></a></p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" 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.5</li> <li>Operating System version: Mac OS 10.15.2</li> <li>Java version: 1.8.0_231</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>通过brew安装etcd</li> <li>执行etcd命令,前台模式启动etcd</li> <li>启动provider服务(grpc + etcd)</li> <li>执行 <code class="notranslate">etcdctl get / --prefix</code> 命令,观察到etcd中有数据</li> <li>等mac经过1轮休眠,再执行 <code class="notranslate">etcdctl get / --prefix</code>,发现数据为空</li> </ol> <h3 dir="auto">Expected Result</h3> <ul dir="auto"> <li> <p dir="auto">注册信息不应该自己丢失</p> </li> <li> <p dir="auto">即便注册信息丢失,也能在电脑唤醒后自己恢复</p> </li> </ul> <h3 dir="auto">Actual Result</h3> <ul dir="auto"> <li> <p dir="auto">注册信息丢失</p> </li> <li> <p dir="auto">dubbo输出以下日志</p> </li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2020-01-09 16:20:35.020 WARN 15182 --- [pool-6-thread-2] o.a.d.r.etcd.jetcd.JEtcdClientWrapper : [DUBBO] Failed to keep alive for global lease '7587843563781079999', waiting for retry again., dubbo version: 2.7.5, current host: ***"><pre class="notranslate"><code class="notranslate">2020-01-09 16:20:35.020 WARN 15182 --- [pool-6-thread-2] o.a.d.r.etcd.jetcd.JEtcdClientWrapper : [DUBBO] Failed to keep alive for global lease '7587843563781079999', waiting for retry again., dubbo version: 2.7.5, current host: *** </code></pre></div> <h3 dir="auto">相关代码和配置</h3> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import io.grpc.stub.StreamObserver; import org.apache.dubbo.config.annotation.Service; import org.apache.dubbo.rpc.RpcContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import testproto.DubboGreeterGrpc; import testproto.HelloReply; import testproto.HelloRequest; import java.util.concurrent.*; @Service(interfaceClass = DubboGreeterGrpc.IGreeter.class, version = &quot;1.0.0&quot;) public class GreeterServiceImpl extends DubboGreeterGrpc.GreeterImplBase { @Override public void sayHello(HelloRequest request, StreamObserver&lt;HelloReply&gt; responseObserver) { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException ignored) { } responseObserver.onNext(HelloReply.newBuilder().setMessage(&quot;pong-java-&quot; + System.currentTimeMillis()).build()); responseObserver.onCompleted(); } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">grpc</span>.<span class="pl-s1">stub</span>.<span class="pl-s1">StreamObserver</span>; <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">config</span>.<span class="pl-s1">annotation</span>.<span class="pl-s1">Service</span>; <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">dubbo</span>.<span class="pl-s1">rpc</span>.<span class="pl-s1">RpcContext</span>; <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">slf4j</span>.<span class="pl-s1">Logger</span>; <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">slf4j</span>.<span class="pl-s1">LoggerFactory</span>; <span class="pl-k">import</span> <span class="pl-s1">testproto</span>.<span class="pl-s1">DubboGreeterGrpc</span>; <span class="pl-k">import</span> <span class="pl-s1">testproto</span>.<span class="pl-s1">HelloReply</span>; <span class="pl-k">import</span> <span class="pl-s1">testproto</span>.<span class="pl-s1">HelloRequest</span>; <span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">concurrent</span>.*; <span class="pl-c1">@</span><span class="pl-c1">Service</span>(<span class="pl-s1">interfaceClass</span> = <span class="pl-smi">DubboGreeterGrpc</span>.<span class="pl-smi">IGreeter</span>.<span class="pl-k">class</span>, <span class="pl-s1">version</span> = <span class="pl-s">"1.0.0"</span>) <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">GreeterServiceImpl</span> <span class="pl-k">extends</span> <span class="pl-smi">DubboGreeterGrpc</span>.<span class="pl-smi">GreeterImplBase</span> { <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">sayHello</span>(<span class="pl-smi">HelloRequest</span> <span class="pl-s1">request</span>, <span class="pl-smi">StreamObserver</span>&lt;<span class="pl-smi">HelloReply</span>&gt; <span class="pl-s1">responseObserver</span>) { <span class="pl-k">try</span> { <span class="pl-smi">TimeUnit</span>.<span class="pl-c1">SECONDS</span>.<span class="pl-en">sleep</span>(<span class="pl-c1">1</span>); } <span class="pl-k">catch</span> (<span class="pl-smi">InterruptedException</span> <span class="pl-s1">ignored</span>) { } <span class="pl-s1">responseObserver</span>.<span class="pl-en">onNext</span>(<span class="pl-smi">HelloReply</span>.<span class="pl-en">newBuilder</span>().<span class="pl-en">setMessage</span>(<span class="pl-s">"pong-java-"</span> + <span class="pl-smi">System</span>.<span class="pl-en">currentTimeMillis</span>()).<span class="pl-en">build</span>()); <span class="pl-s1">responseObserver</span>.<span class="pl-en">onCompleted</span>(); } }</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="spring.application.name=dubbo-provider server.port=8080 dubbo.application.name=${spring.application.name} dubbo.application.metadata=remote dubbo.protocol.name=grpc dubbo.protocol.port=8888 dubbo.registry.address=etcd3://127.0.0.1:2379?registry-type=service dubbo.provider.threads=10 dubbo.provider.threadpool=fixed dubbo.provider.loadbalance=roundrobin dubbo.metadata-report.address=etcd://127.0.0.1:2379"><pre class="notranslate"><code class="notranslate">spring.application.name=dubbo-provider server.port=8080 dubbo.application.name=${spring.application.name} dubbo.application.metadata=remote dubbo.protocol.name=grpc dubbo.protocol.port=8888 dubbo.registry.address=etcd3://127.0.0.1:2379?registry-type=service dubbo.provider.threads=10 dubbo.provider.threadpool=fixed dubbo.provider.loadbalance=roundrobin dubbo.metadata-report.address=etcd://127.0.0.1:2379 </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4</li> <li>Operating System version: win 10</li> <li>Java version: jdk 8u22</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">dubbo 2.7.4 版本dubbo-demo 运行报错,无法初始化配置器</p> <ol dir="auto"> <li> <p dir="auto">运行 dubbo-demo-api-provider,使用 zookeeper 3.5,已经确认zk 正常。<br> service.setRegistry(new RegistryConfig("zookeeper://192.168.1.203:2181"));<br> 运行报错,错误位于 AbstractInterfaceConfig::useRegistryForConfigIfNecessary<br> 的 628 行<br> cc.getParameters().put(org.apache.dubbo.remoting.Constants.CLIENT_KEY,rc.getClient());<br> 提示 rc.getClient() 为空</p> </li> <li> <p dir="auto">使用 nacos 正常,修改代码,编译运行正常<br> service.setRegistry(new RegistryConfig("nacos://192.168.1.207:8848"));</p> </li> <li> <p dir="auto">dubbo-demo-xml-provider 也是相同的错误</p> </li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here! Exception in thread &quot;main&quot; java.lang.NullPointerException at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:628) at java.util.Optional.orElseGet(Optional.java:267)"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! Exception in thread "main" java.lang.NullPointerException at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:628) at java.util.Optional.orElseGet(Optional.java:267) </code></pre></div>
0
<p dir="auto">Plugins will want to do something at least for hot-restart. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johnmccutchan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johnmccutchan">@johnmccutchan</a></p>
<p dir="auto">I think it would be an OK design choice if they didn't. But it's probably better if they do.</p> <p dir="auto">If we need to add new API to teach plugins about hot-reload or hot-restart we might need to do that sooner rather than later.</p> <p dir="auto">FYI <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mravn-google/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mravn-google">@mravn-google</a></p>
1
<ul dir="auto"> <li>VSCode Version: 1.2.0 stable</li> <li>OS Version: Tried it on OS X 10.10.5 and Ubuntu 16.04</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Open a file where breakpoints are supported</li> <li>Set a breakpoint at any line</li> <li>Right click the breakpoint and select "Edit Breakpoint"</li> <li>While the "Edit Breakpoint" dialog is open, move the line where the breakpoint is set</li> <li>Hit Enter to confirm the "Edit Breakpoint" dialog</li> <li>The breakpoint gets duplicated, but it should just move like it does if escape is pressed instead of Enter.</li> </ol> <p dir="auto">Note that this reproes without actually starting debugging.</p> <p dir="auto">Here's a recording of the repro:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/637952/15873703/b6abbed4-2cb4-11e6-8a33-913c7251c05c.gif"><img src="https://cloud.githubusercontent.com/assets/637952/15873703/b6abbed4-2cb4-11e6-8a33-913c7251c05c.gif" alt="double_breakpoint_repro" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/isidorn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/isidorn">@isidorn</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weinand/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weinand">@weinand</a></p>
<ul dir="auto"> <li>VSCode Version: 1.1.1</li> <li>OS Version: Windows 7 SP1</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Open folder in the VSCode with many subdirectories</li> <li>Navigate to some file in sub-sub directory and start to edit it</li> <li>Press Ctrl+O to open other file from the same directory of currently edited file</li> <li>But open file dialog starts with something really different directory, probably with directory I last used Ctrl+O with.</li> <li>That's counter-intuitive and in usual Visual Studio it works the way I expect it to behave.</li> </ol> <p dir="auto">Should I enable some hidden config rule to get desired behaviour?</p>
0
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-give-your-javascript-slot-machine-some-stylish-images" rel="nofollow">http://freecodecamp.com/challenges/waypoint-give-your-javascript-slot-machine-some-stylish-images</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">The first test case (<strong>Use the provided code three times. One for each slot</strong>) cannot be completed. Tried several different ways, non of them worked.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/a3a50752684e3c2e71fba49fd877a0e8184b121a9dcb6f45396eefff34f8656a/687474703a2f2f692e696d6775722e636f6d2f573656794f30722e706e67"><img src="https://camo.githubusercontent.com/a3a50752684e3c2e71fba49fd877a0e8184b121a9dcb6f45396eefff34f8656a/687474703a2f2f692e696d6775722e636f6d2f573656794f30722e706e67" alt="Challange Bug" data-canonical-src="http://i.imgur.com/W6VyO0r.png" style="max-width: 100%;"></a></p> <ul dir="auto"> <li>Possible duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="101447197" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/1862" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/1862/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/1862">#1862</a></li> </ul>
<p dir="auto">I lost most of my work last night when there were problems on the server. I think this is the 4th time this has happened with my account. My points number reflects over 300 while my map does not.<br> I have been working at this for close to a year, if not over a year.<br> And the issue was closed even though my map is not restored to where it should be.</p> <p dir="auto">Lost most of my work last night <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110210744" data-permission-text="Title is private" data-url="https://github.com/freeCodeCamp/freeCodeCamp/issues/3629" data-hovercard-type="issue" data-hovercard-url="/freeCodeCamp/freeCodeCamp/issues/3629/hovercard" href="https://github.com/freeCodeCamp/freeCodeCamp/issues/3629">#3629</a></p> <p dir="auto">Help please</p>
0
<p dir="auto">Hi,</p> <p dir="auto">can you integrate a Mega Menu into bootstrap3?</p> <p dir="auto">There is a solution already made by someone?</p> <p dir="auto">Thanks</p>
<p dir="auto">i think it will be useful...</p>
1
<p dir="auto">Similarly to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="252845724" data-permission-text="Title is private" data-url="https://github.com/puppeteer/puppeteer/issues/540" data-hovercard-type="issue" data-hovercard-url="/puppeteer/puppeteer/issues/540/hovercard" href="https://github.com/puppeteer/puppeteer/issues/540">puppeteer/puppeteer#540</a></p> <p dir="auto">Currently when navigating to a page that requires client certificates and client certificates are available a popup is shown in Firefox and Chrome which asks to select which certificate to use. It would be beneficial to provide an API to select the correct certificate to use (or use none). <a href="https://Adsdiary.pk" rel="nofollow">Digital marketing in Lahore</a></p>
<p dir="auto">Similarly to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="252845724" data-permission-text="Title is private" data-url="https://github.com/puppeteer/puppeteer/issues/540" data-hovercard-type="issue" data-hovercard-url="/puppeteer/puppeteer/issues/540/hovercard" href="https://github.com/puppeteer/puppeteer/issues/540">puppeteer/puppeteer#540</a></p> <p dir="auto">Currently when navigating to a page that requires client certificates and client certificates are available a popup is shown in Firefox and Chrome which asks to select which certificate to use. It would be beneficial to provide an API to select the correct certificate to use (or use none).</p>
1
<p dir="auto">I would think that the right thing to do here is to silently carry on, if there is no upstream tracking branch than there is nothing to update.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: Update finished with errors. =&gt; Package MXNet cannot be updated. GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) in #123 at ./libgit2/libgit2.jl:414 [inlined] in with(::Base.LibGit2.##123#128{Base.LibGit2.GitRepo}, ::Void) at ./libgit2/types.jl:638 in (::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo})(::Base.LibGit2.GitReference) at ./libgit2/libgit2.jl:412 in with(::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo}, ::Base.LibGit2.GitReference) at ./libgit2/types.jl:638 in (::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at ./&lt;missing&gt;:0 in (::Base.Pkg.Entry.##39#45{CompositeException})(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:428 in with(::Base.Pkg.Entry.##39#45{CompositeException}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:638 in update(::String, ::Set{String}) at ./pkg/entry.jl:416 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:59 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31 in update() at ./pkg/pkg.jl:210 in eval(::Module, ::Any) at ./boot.jl:234 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66 in macro expansion at ./REPL.jl:97 [inlined] in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68 in update(::String, ::Set{String}) at ./pkg/entry.jl:463 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:59 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31 in update() at ./pkg/pkg.jl:210"><pre class="notranslate"><code class="notranslate">ERROR: Update finished with errors. =&gt; Package MXNet cannot be updated. GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) in #123 at ./libgit2/libgit2.jl:414 [inlined] in with(::Base.LibGit2.##123#128{Base.LibGit2.GitRepo}, ::Void) at ./libgit2/types.jl:638 in (::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo})(::Base.LibGit2.GitReference) at ./libgit2/libgit2.jl:412 in with(::Base.LibGit2.##119#124{String,String,Bool,Base.LibGit2.MergeOptions,Base.LibGit2.CheckoutOptions,Base.LibGit2.GitRepo}, ::Base.LibGit2.GitReference) at ./libgit2/types.jl:638 in (::Base.#kw##merge!)(::Array{Any,1}, ::Base.#merge!, ::Base.LibGit2.GitRepo) at ./&lt;missing&gt;:0 in (::Base.Pkg.Entry.##39#45{CompositeException})(::Base.LibGit2.GitRepo) at ./pkg/entry.jl:428 in with(::Base.Pkg.Entry.##39#45{CompositeException}, ::Base.LibGit2.GitRepo) at ./libgit2/types.jl:638 in update(::String, ::Set{String}) at ./pkg/entry.jl:416 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:59 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31 in update() at ./pkg/pkg.jl:210 in eval(::Module, ::Any) at ./boot.jl:234 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66 in macro expansion at ./REPL.jl:97 [inlined] in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68 in update(::String, ::Set{String}) at ./pkg/entry.jl:463 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}})() at ./pkg/dir.jl:31 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#update,Tuple{String,Set{String}}}, ::String) at ./file.jl:59 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31 in update() at ./pkg/pkg.jl:210 </code></pre></div>
<p dir="auto">Starting from a tagged version:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; Pkg.checkout(&quot;TaylorSeries&quot;, &quot;warningsv05&quot;) INFO: Checking out TaylorSeries warningsv05... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.)"><pre class="notranslate"><code class="notranslate">julia&gt; Pkg.checkout("TaylorSeries", "warningsv05") INFO: Checking out TaylorSeries warningsv05... ERROR: GitError(Code:ERROR, Class:Merge, There is no tracking information for the current branch.) </code></pre></div> <p dir="auto">but this works if <code class="notranslate">master</code> is <code class="notranslate">checkout</code>ed first.</p>
1
<p dir="auto">I migrate from webpack from 1.x to latest 2.3.1, when I start, always show module.entry is invalid.</p> <p dir="auto">my webpack config as follwing, I did not see any issue in the config.</p> <p dir="auto">var webpack = require('webpack');<br> var autoprefixer = require('autoprefixer');<br> var path = require('path');<br> var config = require('config')<br> var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');</p> <p dir="auto">module.exports = {<br> resolve: {<br> extensions: ['.js', '.ts', '.tsx', '.js'],<br> modules: ['node_modules'],<br> alias: {<br> bower: path.resolve(__dirname, 'ui/bower_components'),<br> "matches-selector/matches-selector": "desandro-matches-selector",<br> "eventEmitter/EventEmitter": "wolfy87-eventemitter",<br> "get-style-property/get-style-property": "desandro-get-style-property"<br> }<br> },</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="entry: { app: path.resolve(__dirname, 'ui/app/index.ts') 'app.vendor': './ui/editor/app.index.ts', home: './ui/home/index.ts', 'home.vendor': './ui/home/vendor.index.ts', }, output: { path: path.resolve(__dirname, 'ui/build'), pathinfo: true, publicPath: config.uiServer.protocol + config.uiServer.host + ':' + config.uiServer.port + '/build/', filename: '[name].js' }, devServer: { contentBase: './ui' }, module: { rules: [ { test: /\-template\.(|html|js)$/, use: ['raw'] }, { test: /\.css$/, loader: &quot;style!css&quot; }, { test: /\.scss$/, include: [/node_modules/, /bower_components/], use: [{ loader: &quot;style-loader&quot; // creates style nodes from JS strings }, { loader: &quot;css-loader&quot; // translates CSS into CommonJS }, { loader: &quot;sass-loader&quot; // compiles Sass to CSS }] }, { test: /\.scss$/, exclude: [/node_modules/, /bower_components/], use: [{ loader: &quot;style-loader&quot; }, { loader: &quot;css-loader&quot;, options: { sourceMap: true } }, { loader: &quot;sass-loader&quot;, options: { sourceMap: true } }] }, { test: /\.tsx?$/, use: ['ts-loader'] }, { test: /\.coffee$/, use: [&quot;coffee&quot;] }, { test: /\.json$/, use: [&quot;json&quot;] }, { test: /\.pug$/, use: [&quot;ngtemplate?relativeTo=&quot; + __dirname + &quot;!raw!pug-html?basedir=&quot; + __dirname] }, { test: /\.png$/, use: ['url-loader?limit=8192'], query: { mimetype: &quot;image/png&quot; } }, { test: /\.jpg$/, use: ['url-loader?limit=8192&amp;mimetype=image/jpg'], query: { mimetype: &quot;image/jpg&quot; } }, { test: /\.gif$/, use: ['url-loader?limit=8192&amp;mimetype=image/gif'], query: { mimetype: &quot;image/gif&quot; } }, { test: /\.webp$/, use: ['url-loader?limit=8192&amp;mimetype=image/webp'], query: { mimetype: &quot;image/webp&quot; } }, { test: /\.swf$/, use: ['url-loader?mimetype=application/x-shockwave-flash'], query: { mimetype: &quot;application/x-shockwave-flash&quot; } }, // Added for bootstrap-css-loader { test: /bootstrap.*\/javascripts\//, use: ['imports?jQuery=jquery'] }, { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, use: [&quot;url?limit=10000&amp;mimetype=application/font-woff&quot;] }, { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, use: [&quot;url?limit=10000&amp;mimetype=application/font-woff&quot;] }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: [&quot;url?limit=10000&amp;mimetype=application/octet-stream&quot;] }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: [&quot;file&quot;] }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: [&quot;url?limit=10000&amp;mimetype=image/svg+xml&quot;] } ], noParse: [ /bower_components/ ] }, plugins: [ new CommonsChunkPlugin({ name: 'app.vendor', chunks: ['app', 'app.vendor'] }), new CommonsChunkPlugin({ name: 'home.vendor', chunks: ['home', 'home.vendor'] }), new webpack.SourceMapDevToolPlugin({ exclude: /.*\.vendor\.js/, columns: false, module: true }), new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', &quot;window.jQuery&quot;: 'jquery', '_': 'lodash', i18next: 'i18next' }), ],"><pre class="notranslate"><code class="notranslate">entry: { app: path.resolve(__dirname, 'ui/app/index.ts') 'app.vendor': './ui/editor/app.index.ts', home: './ui/home/index.ts', 'home.vendor': './ui/home/vendor.index.ts', }, output: { path: path.resolve(__dirname, 'ui/build'), pathinfo: true, publicPath: config.uiServer.protocol + config.uiServer.host + ':' + config.uiServer.port + '/build/', filename: '[name].js' }, devServer: { contentBase: './ui' }, module: { rules: [ { test: /\-template\.(|html|js)$/, use: ['raw'] }, { test: /\.css$/, loader: "style!css" }, { test: /\.scss$/, include: [/node_modules/, /bower_components/], use: [{ loader: "style-loader" // creates style nodes from JS strings }, { loader: "css-loader" // translates CSS into CommonJS }, { loader: "sass-loader" // compiles Sass to CSS }] }, { test: /\.scss$/, exclude: [/node_modules/, /bower_components/], use: [{ loader: "style-loader" }, { loader: "css-loader", options: { sourceMap: true } }, { loader: "sass-loader", options: { sourceMap: true } }] }, { test: /\.tsx?$/, use: ['ts-loader'] }, { test: /\.coffee$/, use: ["coffee"] }, { test: /\.json$/, use: ["json"] }, { test: /\.pug$/, use: ["ngtemplate?relativeTo=" + __dirname + "!raw!pug-html?basedir=" + __dirname] }, { test: /\.png$/, use: ['url-loader?limit=8192'], query: { mimetype: "image/png" } }, { test: /\.jpg$/, use: ['url-loader?limit=8192&amp;mimetype=image/jpg'], query: { mimetype: "image/jpg" } }, { test: /\.gif$/, use: ['url-loader?limit=8192&amp;mimetype=image/gif'], query: { mimetype: "image/gif" } }, { test: /\.webp$/, use: ['url-loader?limit=8192&amp;mimetype=image/webp'], query: { mimetype: "image/webp" } }, { test: /\.swf$/, use: ['url-loader?mimetype=application/x-shockwave-flash'], query: { mimetype: "application/x-shockwave-flash" } }, // Added for bootstrap-css-loader { test: /bootstrap.*\/javascripts\//, use: ['imports?jQuery=jquery'] }, { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, use: ["url?limit=10000&amp;mimetype=application/font-woff"] }, { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, use: ["url?limit=10000&amp;mimetype=application/font-woff"] }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, use: ["url?limit=10000&amp;mimetype=application/octet-stream"] }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, use: ["file"] }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, use: ["url?limit=10000&amp;mimetype=image/svg+xml"] } ], noParse: [ /bower_components/ ] }, plugins: [ new CommonsChunkPlugin({ name: 'app.vendor', chunks: ['app', 'app.vendor'] }), new CommonsChunkPlugin({ name: 'home.vendor', chunks: ['home', 'home.vendor'] }), new webpack.SourceMapDevToolPlugin({ exclude: /.*\.vendor\.js/, columns: false, module: true }), new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', "window.jQuery": 'jquery', '_': 'lodash', i18next: 'i18next' }), ], </code></pre></div> <p dir="auto">};</p> <p dir="auto">the error message as following:<br> Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.</p> <ul dir="auto"> <li>configuration.entry should be one of these:<br> object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function<br> The entry point(s) of the compilation.<br> Details: <ul dir="auto"> <li>configuration.entry['home'] should be a string.</li> <li>configuration.entry['home'] should NOT have duplicate items (items ## 1 and 3 are identical) ({<br> "keyword": "uniqueItems",<br> "dataPath": ".entry['home']",<br> "schemaPath": "#/definitions/common.nonEmptyArrayOfUniqueStringValues/uniqueItems",<br> "params": {<br> "i": 3,<br> "j": 1<br> },<br> "message": "should NOT have duplicate items (items ## 1 and 3 are identical)",<br> "schema": true,<br> "parentSchema": {<br> "items": {<br> "minLength": 1,<br> "type": "string"<br> },<br> "minItems": 1,<br> "type": "array",<br> "uniqueItems": true<br> },<br> "data": [<br> "/usr/local/lib/node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:4000",<br> "webpack/hot/dev-server",<br> "/Users/yishuihanxiao/ws/ror/University_Work/node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:4000",<br> "webpack/hot/dev-server",<br> "./ui/home/index.ts"<br> ]<br> }).<br> [non-empty string]</li> <li>configuration.entry['home'] should be one of these:<br> non-empty string | [non-empty string]</li> <li>configuration.entry should be a string.</li> <li>configuration.entry should be an array:<br> [non-empty string]</li> <li>configuration.entry should be an instance of function<br> function returning an entry object or a promise..</li> </ul> </li> </ul>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">If we have two modules say A and B. A and B imports react.<br> During dynamic import of these two module I found react code to be duplicated.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">This is the <a href="https://github.com/nikhilnayyar002/react-min">repo link</a>.</p> <p dir="auto">This is the source and public.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38173563/125198276-e45d2b80-e27e-11eb-8d10-31077b1b7964.png"><img src="https://user-images.githubusercontent.com/38173563/125198276-e45d2b80-e27e-11eb-8d10-31077b1b7964.png" alt="image" style="max-width: 100%;"></a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//src/index.js import &quot;@styles/index.css&quot;; import &quot;jquery/dist/jquery.slim&quot; import(/* webpackExports: [&quot;default&quot;] */&quot;./app&quot;).then(({default:App})=&gt;{ import(/* webpackExports: [&quot;default&quot;] */&quot;./app2&quot;).then(({default:render})=&gt;{ render(App) }) })"><pre class="notranslate"><span class="pl-c">//src/index.js</span> <span class="pl-k">import</span> <span class="pl-s">"@styles/index.css"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s">"jquery/dist/jquery.slim"</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-c">/* webpackExports: ["default"] */</span><span class="pl-s">"./app"</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-kos">{</span><span class="pl-c1">default</span>:<span class="pl-v">App</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-c">/* webpackExports: ["default"] */</span><span class="pl-s">"./app2"</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-kos">{</span><span class="pl-c1">default</span>:<span class="pl-s1">render</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-v">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></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//src/app.js import { Modal } from 'bootstrap'; import{ useEffect, useState } from 'react'; export default function App() { const [state] = useState(Date.now()) useEffect(()=&gt;{ if(document.getElementById(&quot;myModal&quot;)) { let elem = document.getElementById(&quot;myModal&quot;) let modal = new Modal(elem) modal.hide() } },[]) return ( &lt;div&gt; &lt;div&gt;Hello WORLD&lt;/div&gt; &lt;div&gt;{state}&lt;/div&gt; &lt;/div&gt; ) }"><pre class="notranslate"><span class="pl-c">//src/app.js</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">Modal</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'bootstrap'</span><span class="pl-kos">;</span> <span class="pl-k">import</span><span class="pl-kos">{</span> <span class="pl-s1">useEffect</span><span class="pl-kos">,</span> <span class="pl-s1">useState</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-v">App</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">state</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-v">Date</span><span class="pl-kos">.</span><span class="pl-en">now</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"myModal"</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">elem</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"myModal"</span><span class="pl-kos">)</span> <span class="pl-k">let</span> <span class="pl-s1">modal</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Modal</span><span class="pl-kos">(</span><span class="pl-s1">elem</span><span class="pl-kos">)</span> <span class="pl-s1">modal</span><span class="pl-kos">.</span><span class="pl-en">hide</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-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span>Hello WORLD<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">state</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</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="//src/app2.js import React from 'react'; import ReactDOM from 'react-dom'; export default function render(App) { ReactDOM.render( &lt;React.StrictMode&gt; &lt;App /&gt; &lt;/React.StrictMode&gt;, document.getElementById('root') ); }"><pre class="notranslate"><span class="pl-c">//src/app2.js</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-v">ReactDOM</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-v">App</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">StrictMode</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-v">App</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">StrictMode</span><span class="pl-c1">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">'root'</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</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="//webpack.prod.js mode: 'production', output: { filename: '[name].[contenthash].js', chunkFilename:'[id].[contenthash].js', }, plugins: [ ... ], optimization: { minimize: true, minimizer: [ new TerserPlugin({ extractComments: false, }), new CssMinimizerPlugin() ], moduleIds: 'deterministic', runtimeChunk: 'single', splitChunks: { chunks: 'all', cacheGroups: { vendorsInitial: { test: /[\\/]node_modules[\\/]/, chunks: 'initial', }, vendorsAsync: { test: /[\\/]node_modules[\\/]/, chunks: 'async', },"><pre class="notranslate"><span class="pl-c">//webpack.prod.js</span> <span class="pl-s1">mode</span>: <span class="pl-s">'production'</span><span class="pl-kos">,</span> <span class="pl-s1">output</span>: <span class="pl-kos">{</span> <span class="pl-c1">filename</span>: <span class="pl-s">'[name].[contenthash].js'</span><span class="pl-kos">,</span> <span class="pl-c1">chunkFilename</span>:<span class="pl-s">'[id].[contenthash].js'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">plugins</span>: <span class="pl-kos">[</span> ... <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">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-c1">minimizer</span>: <span class="pl-kos">[</span> <span class="pl-k">new</span> <span class="pl-v">TerserPlugin</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">extractComments</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-v">CssMinimizerPlugin</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">moduleIds</span>: <span class="pl-s">'deterministic'</span><span class="pl-kos">,</span> <span class="pl-c1">runtimeChunk</span>: <span class="pl-s">'single'</span><span class="pl-kos">,</span> <span class="pl-c1">splitChunks</span>: <span class="pl-kos">{</span> <span class="pl-c1">chunks</span>: <span class="pl-s">'all'</span><span class="pl-kos">,</span> <span class="pl-c1">cacheGroups</span>: <span class="pl-kos">{</span> <span class="pl-c1">vendorsInitial</span>: <span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span>node_modules<span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">chunks</span>: <span class="pl-s">'initial'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">vendorsAsync</span>: <span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span>node_modules<span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">chunks</span>: <span class="pl-s">'async'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span></pre></div> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="npm ci npm run build"><pre class="notranslate">npm ci npm run build</pre></div> <p dir="auto">These are the build assets:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="310.3f191f82792ae2cafdf4.js 589.7d374a5468098e334db1.js 598.dccce690a646df0467cb.js 601.05cbbc0a1fa75c999014.js 70.af0523773e96dec9c092.js favicon.ico index.html main.099275078be1d62b3b50.css main.aa06ebf00a2dc10cbae3.js runtime.fd41db16facc83bbd2f9.js"><pre lang="text" class="notranslate"><code class="notranslate">310.3f191f82792ae2cafdf4.js 589.7d374a5468098e334db1.js 598.dccce690a646df0467cb.js 601.05cbbc0a1fa75c999014.js 70.af0523773e96dec9c092.js favicon.ico index.html main.099275078be1d62b3b50.css main.aa06ebf00a2dc10cbae3.js runtime.fd41db16facc83bbd2f9.js </code></pre></div> <ul dir="auto"> <li><strong>index.html</strong></li> </ul> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot; /&gt; &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot; /&gt; &lt;title&gt;React Min&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot; /&gt; &lt;link href=&quot;/main.099275078be1d62b3b50.css&quot; rel=&quot;stylesheet&quot; /&gt; &lt;/head&gt; &lt;body&gt; &lt;div id=&quot;root&quot;&gt;&lt;/div&gt; &lt;script defer=&quot;defer&quot; src=&quot;/runtime.fd41db16facc83bbd2f9.js&quot;&gt;&lt;/script&gt; &lt;script defer=&quot;defer&quot; src=&quot;/70.af0523773e96dec9c092.js&quot;&gt;&lt;/script&gt; &lt;script defer=&quot;defer&quot; src=&quot;/main.aa06ebf00a2dc10cbae3.js&quot;&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-c1">&lt;!DOCTYPE html<span class="pl-kos">&gt;</span></span> <span class="pl-kos">&lt;</span><span class="pl-ent">html</span> <span class="pl-c1">lang</span>="<span class="pl-s">en</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">charset</span>="<span class="pl-s">UTF-8</span>" /&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">http-equiv</span>="<span class="pl-s">X-UA-Compatible</span>" <span class="pl-c1">content</span>="<span class="pl-s">IE=edge</span>" /&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">name</span>="<span class="pl-s">viewport</span>" <span class="pl-c1">content</span>="<span class="pl-s">width=device-width,initial-scale=1</span>" /&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span>React Min<span class="pl-kos">&lt;/</span><span class="pl-ent">title</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span>="<span class="pl-s">icon</span>" <span class="pl-c1">href</span>="<span class="pl-s">/favicon.ico</span>" /&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">href</span>="<span class="pl-s">/main.099275078be1d62b3b50.css</span>" <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" /&gt; <span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">id</span>="<span class="pl-s">root</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">defer</span>="<span class="pl-s">defer</span>" <span class="pl-c1">src</span>="<span class="pl-s">/runtime.fd41db16facc83bbd2f9.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">defer</span>="<span class="pl-s">defer</span>" <span class="pl-c1">src</span>="<span class="pl-s">/70.af0523773e96dec9c092.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">defer</span>="<span class="pl-s">defer</span>" <span class="pl-c1">src</span>="<span class="pl-s">/main.aa06ebf00a2dc10cbae3.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">body</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <ul dir="auto"> <li><strong>310.3f191f82792ae2cafdf4.js</strong>: this one is <code class="notranslate">src/app.js</code> chunk</li> <li><strong>589.7d374a5468098e334db1.js</strong>: node_modules code chunk for <code class="notranslate">src/app2.js</code> (showing comments only..):</li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/* object-assign (c) Sindre Sorhus @license MIT */ ... /** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ... /** @license React v17.0.2 * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ... /** @license React v17.0.2 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ... /** @license React v0.20.2 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ..."><pre class="notranslate"><span class="pl-c">/*</span> <span class="pl-c">object-assign</span> <span class="pl-c">(c) Sindre Sorhus</span> <span class="pl-c"><span class="pl-k">@license</span> MIT</span> <span class="pl-c">*/</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react-dom.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react-jsx-runtime.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v0.20.2</span> <span class="pl-c"> * scheduler.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ...</pre></div> <ul dir="auto"> <li><strong>598.dccce690a646df0467cb.js</strong>: this one is <code class="notranslate">src/app2.js</code> chunk</li> <li><strong>601.05cbbc0a1fa75c999014.js</strong>: node_modules code chunk for <code class="notranslate">src/app.js</code> (showing comments only..):</li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="... // &lt;-- popperjs code /*! * Bootstrap v5.0.2 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ ... /* object-assign (c) Sindre Sorhus @license MIT */ ... /** @license React v17.0.2 * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ... /** @license React v17.0.2 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ..."><pre class="notranslate">... <span class="pl-c">// &lt;-- popperjs code</span> <span class="pl-c">/*!</span> <span class="pl-c"> * Bootstrap v5.0.2 (https://getbootstrap.com/)</span> <span class="pl-c"> * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)</span> <span class="pl-c"> * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)</span> <span class="pl-c"> */</span> ... <span class="pl-c">/*</span> <span class="pl-c">object-assign</span> <span class="pl-c">(c) Sindre Sorhus</span> <span class="pl-c"><span class="pl-k">@license</span> MIT</span> <span class="pl-c">*/</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react-jsx-runtime.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ...</pre></div> <ul dir="auto"> <li><strong>70.af0523773e96dec9c092.js</strong>: this one include jquery code only. Remember we imported jquery in <code class="notranslate">src/index.js</code>. It is a entry module.</li> <li><strong>main.aa06ebf00a2dc10cbae3.js</strong>: <code class="notranslate">src/index.js</code> code is included in it. It is a entry module.</li> <li><strong>runtime.fd41db16facc83bbd2f9.js</strong>: runtime. It is a entry module.</li> <li><strong>main.099275078be1d62b3b50.css</strong>: style imported inside <code class="notranslate">src/index.js</code> .</li> <li><strong>favicon.ico</strong></li> </ul> <p dir="auto">As one can see these two chunks: <strong>601.05cbbc0a1fa75c999014.js</strong> &amp; <strong>589.7d374a5468098e334db1.js</strong> has code in common:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/* object-assign (c) Sindre Sorhus @license MIT */ ... /** @license React v17.0.2 * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ... /** @license React v17.0.2 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */"><pre class="notranslate"><span class="pl-c">/*</span> <span class="pl-c">object-assign</span> <span class="pl-c">(c) Sindre Sorhus</span> <span class="pl-c"><span class="pl-k">@license</span> MIT</span> <span class="pl-c">*/</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react-jsx-runtime.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span> ... <span class="pl-c">/** <span class="pl-k">@license</span> React v17.0.2</span> <span class="pl-c"> * react.production.min.js</span> <span class="pl-c"> *</span> <span class="pl-c"> * Copyright (c) Facebook, Inc. and its affiliates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * This source code is licensed under the MIT license found in the</span> <span class="pl-c"> * LICENSE file in the root directory of this source tree.</span> <span class="pl-c"> */</span></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Webpack should be able to check that if it has generated chunk for library say React, Bootstrap, React-dom etc then it should not generate code again if it founds that library has been imported inside a dynamically imported module.</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: ^5.44.0<br> Node.js version: 14.17.3<br> Operating System: Windows 10<br> Additional tools:</p>
0
<p dir="auto">1.Go to settings<br> 2. Keybindings and find alt-s<br> 3. Select text and righ-click</p> <p dir="auto"><strong>Atom Version</strong>: 1.0.0<br> <strong>System</strong>: Unknown Windows Version<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: Cannot find module './context-menu'<br> Error: Cannot find module './context-menu'<br> at Function.Module._resolveFilename (module.js:328:15)<br> at Function.Module._load (module.js:270:25)<br> at Module.require (module.js:357:17)<br> at require (module.js:376:17)<br> at BrowserWindow. (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27)<br> at emitOne (events.js:77:13)<br> at BrowserWindow.emit (events.js:166:7)<br> at callFunction (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br> at EventEmitter. (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br> at emitMany (events.js:108:13)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77 Error: Cannot find module './context-menu' Error: Cannot find module './context-menu' at Function.Module._resolveFilename (module.js:328:15) at Function.Module._load (module.js:270:25) at Module.require (module.js:357:17) at require (module.js:376:17) at BrowserWindow.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27) at emitOne (events.js:77:13) at BrowserWindow.emit (events.js:166:7) at callFunction (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\window-event-handler.js:150:33) at HTMLDocument.handler (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46) "><pre class="notranslate"><code class="notranslate">At C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77 Error: Cannot find module './context-menu' Error: Cannot find module './context-menu' at Function.Module._resolveFilename (module.js:328:15) at Function.Module._load (module.js:270:25) at Module.require (module.js:357:17) at require (module.js:376:17) at BrowserWindow.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\browser\atom-window.js:149:27) at emitOne (events.js:77:13) at BrowserWindow.emit (events.js:166:7) at callFunction (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\window-event-handler.js:150:33) at HTMLDocument.handler (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\Halamix2\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 3x -3:57.7.0 core:confirm (atom-text-editor.editor.mini.is-focused) -2:40.9.0 keyboard-localization:keymap-generator (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui) -2:34.6.0 core:move-right (atom-pane.pane.active) 6x -2:29.2.0 application:run-all-specs (input.key-input) 3x -2:24.1.0 core:backspace (input.key-input) 9x -2:22.9.0 application:run-all-specs (input.key-input) 3x -2:11 core:backspace (atom-text-editor.editor.is-focused) 5x -1:59 core:save (input.key-input) 2x -1:44.7.0 application:run-all-specs (atom-text-editor.editor.is-focused) 2x -1:42.1.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused) 5x -1:38.9.0 core:backspace (atom-text-editor.editor.is-focused) -1:27.6.0 application:run-all-specs (atom-text-editor.editor.mini.is-focused) -1:24.7.0 core:backspace (atom-text-editor.editor.mini.is-focused) -1:23 core:confirm (atom-text-editor.editor.mini.is-focused) 2x -1:21.9.0 core:backspace (atom-text-editor.editor.mini.is-focused) 2x -1:20.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)"><pre class="notranslate"><code class="notranslate"> 3x -3:57.7.0 core:confirm (atom-text-editor.editor.mini.is-focused) -2:40.9.0 keyboard-localization:keymap-generator (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui) -2:34.6.0 core:move-right (atom-pane.pane.active) 6x -2:29.2.0 application:run-all-specs (input.key-input) 3x -2:24.1.0 core:backspace (input.key-input) 9x -2:22.9.0 application:run-all-specs (input.key-input) 3x -2:11 core:backspace (atom-text-editor.editor.is-focused) 5x -1:59 core:save (input.key-input) 2x -1:44.7.0 application:run-all-specs (atom-text-editor.editor.is-focused) 2x -1:42.1.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused) 5x -1:38.9.0 core:backspace (atom-text-editor.editor.is-focused) -1:27.6.0 application:run-all-specs (atom-text-editor.editor.mini.is-focused) -1:24.7.0 core:backspace (atom-text-editor.editor.mini.is-focused) -1:23 core:confirm (atom-text-editor.editor.mini.is-focused) 2x -1:21.9.0 core:backspace (atom-text-editor.editor.mini.is-focused) 2x -1:20.4.0 core:confirm (atom-text-editor.editor.mini.is-focused) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: {}, &quot;editor&quot;: { &quot;invisibles&quot;: {}, &quot;tabLength&quot;: 4 } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: {}, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {}, <span class="pl-ent">"tabLength"</span>: <span class="pl-c1">4</span> } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User color-picker, v2.0.7 keyboard-localization, v1.4.3 language-batch, v0.3.3 language-rust, v0.4.3 linter-javac, v0.1.4 linter-rust, v0.1.0 minimap, v4.10.0 pigments, v0.8.1 racer, v0.15.2 rust-api-docs-helper, v0.5.1 text-manipulation, v0.6.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> color<span class="pl-k">-</span>picker, v2.<span class="pl-ii">0</span>.<span class="pl-ii">7</span> keyboard<span class="pl-k">-</span>localization, v1.<span class="pl-ii">4</span>.<span class="pl-ii">3</span> language<span class="pl-k">-</span>batch, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span> language<span class="pl-k">-</span>rust, v0.<span class="pl-ii">4</span>.<span class="pl-ii">3</span> linter<span class="pl-k">-</span>javac, v0.<span class="pl-ii">1</span>.<span class="pl-ii">4</span> linter<span class="pl-k">-</span>rust, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> minimap, v4.<span class="pl-ii">10</span>.<span class="pl-ii">0</span> pigments, v0.<span class="pl-ii">8</span>.<span class="pl-ii">1</span> racer, v0.<span class="pl-ii">15</span>.<span class="pl-ii">2</span> rust<span class="pl-k">-</span>api<span class="pl-k">-</span>docs<span class="pl-k">-</span>helper, v0.<span class="pl-ii">5</span>.<span class="pl-ii">1</span> text<span class="pl-k">-</span>manipulation, v0.<span class="pl-ii">6</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">I right-clicked on a folder in the tree view</p> <p dir="auto"><strong>Atom Version</strong>: 0.194.0<br> <strong>System</strong>: Windows 7 Entreprise<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: Cannot find module './context-menu'<br> Error: Cannot find module './context-menu'<br> at Function.Module._resolveFilename (module.js:328:15)<br> at Function.Module._load (module.js:270:25)<br> at Module.require (module.js:357:17)<br> at require (module.js:376:17)<br> at BrowserWindow. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27)<br> at emitOne (events.js:77:13)<br> at BrowserWindow.emit (events.js:166:7)<br> at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br> at EventEmitter. (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br> at emitMany (events.js:108:13)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77 Error: Cannot find module './context-menu' Error: Cannot find module './context-menu' at Function.Module._resolveFilename (module.js:328:15) at Function.Module._load (module.js:270:25) at Module.require (module.js:357:17) at require (module.js:376:17) at BrowserWindow.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27) at emitOne (events.js:77:13) at BrowserWindow.emit (events.js:166:7) at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33) at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46) "><pre class="notranslate"><code class="notranslate">At C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77 Error: Cannot find module './context-menu' Error: Cannot find module './context-menu' at Function.Module._resolveFilename (module.js:328:15) at Function.Module._load (module.js:270:25) at Module.require (module.js:357:17) at require (module.js:376:17) at BrowserWindow.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\browser\atom-window.js:152:27) at emitOne (events.js:77:13) at BrowserWindow.emit (events.js:166:7) at callFunction (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:116:18) at EventEmitter.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\browser\lib\rpc-server.js:208:14) at emitMany (events.js:108:13) at metaToValue (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:77:15) at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\atom.asar\renderer\api\lib\remote.js:111:26) at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\context-menu-manager.js:170:31) at HTMLDocument.&lt;anonymous&gt; (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\window-event-handler.js:149:33) at HTMLDocument.handler (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\src\space-pen-extensions.js:112:34) at HTMLDocument.jQuery.event.dispatch (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9) at HTMLDocument.elemData.handle (C:\Users\jbrichardet\AppData\Local\atom\app-0.194.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused) 2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor) -3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel) -2:47.4.0 editor:newline (atom-text-editor.editor.is-focused) -2:38.2.0 core:cut (atom-text-editor.editor) -2:36.5.0 core:paste (atom-text-editor.editor.is-focused) -2:26.6.0 core:save (atom-text-editor.editor.is-focused) -2:20.6.0 core:move-down (atom-text-editor.editor) -2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor) -2:15.8.0 core:save (atom-text-editor.editor) -2:08.7.0 core:copy (atom-text-editor.editor.is-focused) -2:01.2.0 core:paste (atom-text-editor.editor.is-focused) -1:59.7.0 core:save (atom-text-editor.editor.is-focused) -1:52.2.0 core:paste (atom-text-editor.editor.is-focused) -1:51.6.0 core:save (atom-text-editor.editor.is-focused) -1:30.6.0 core:backspace (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -4:55.5.0 editor:checkout-head-revision (atom-text-editor.editor.is-focused) 2x -3:41.6.0 window:focus-pane-on-right (atom-text-editor.editor) -3:17.5.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel) -2:47.4.0 editor:newline (atom-text-editor.editor.is-focused) -2:38.2.0 core:cut (atom-text-editor.editor) -2:36.5.0 core:paste (atom-text-editor.editor.is-focused) -2:26.6.0 core:save (atom-text-editor.editor.is-focused) -2:20.6.0 core:move-down (atom-text-editor.editor) -2:20.4.0 autocomplete-plus:confirm (atom-text-editor.editor) -2:15.8.0 core:save (atom-text-editor.editor) -2:08.7.0 core:copy (atom-text-editor.editor.is-focused) -2:01.2.0 core:paste (atom-text-editor.editor.is-focused) -1:59.7.0 core:save (atom-text-editor.editor.is-focused) -1:52.2.0 core:paste (atom-text-editor.editor.is-focused) -1:51.6.0 core:save (atom-text-editor.editor.is-focused) -1:30.6.0 core:backspace (atom-text-editor.editor) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;ignoredNames&quot;: [ &quot;node_modules&quot; ], &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;seti-syntax&quot; ], &quot;disabledPackages&quot;: [ &quot;Tern&quot; ], &quot;projectHome&quot;: &quot;Y:\\app-tfoumax&quot; }, &quot;editor&quot;: { &quot;invisibles&quot;: {}, &quot;softWrap&quot;: true, &quot;showIndentGuide&quot;: true } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"ignoredNames"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span> ], <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>seti-syntax<span class="pl-pds">"</span></span> ], <span class="pl-ent">"disabledPackages"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>Tern<span class="pl-pds">"</span></span> ], <span class="pl-ent">"projectHome"</span>: <span class="pl-s"><span class="pl-pds">"</span>Y:<span class="pl-cce">\\</span>app-tfoumax<span class="pl-pds">"</span></span> }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {}, <span class="pl-ent">"softWrap"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span> } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User autocomplete-plus, v2.12.0 autocomplete-snippets, v1.2.0 javascript-snippets, v1.0.0 jshint, v1.3.5 language-ejs, v0.1.0 linter, v0.12.1 pretty-json, v0.3.3 save-session, v0.14.0 Search, v0.4.0 seti-syntax, v0.4.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">2</span>.<span class="pl-ii">0</span> javascript<span class="pl-k">-</span>snippets, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span> jshint, v1.<span class="pl-ii">3</span>.<span class="pl-ii">5</span> language<span class="pl-k">-</span>ejs, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> linter, v0.<span class="pl-ii">12</span>.<span class="pl-ii">1</span> pretty<span class="pl-k">-</span>json, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span> save<span class="pl-k">-</span>session, v0.<span class="pl-ii">14</span>.<span class="pl-ii">0</span> Search, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span> seti<span class="pl-k">-</span>syntax, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
1
<p dir="auto">I ues python 2.7.9 and requests 2.5.1<br> when I do like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="files = {'file1':('中文','hello')} r = requests.post('http://test',files=files)"><pre class="notranslate"><code class="notranslate">files = {'file1':('中文','hello')} r = requests.post('http://test',files=files) </code></pre></div> <p dir="auto">the request is like this(copy from fiddler):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Content-Disposition: form-data; name=&quot;file1&quot;; filename*=utf-8''%E4%B8%AD%E6%96%87"><pre class="notranslate"><code class="notranslate">Content-Disposition: form-data; name="file1"; filename*=utf-8''%E4%B8%AD%E6%96%87 </code></pre></div> <p dir="auto">I think the format of filename is wrong.</p> <p dir="auto">the right format should be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Content-Disposition: form-data; name=&quot;file1&quot;; filename=&quot;中文&quot;"><pre class="notranslate"><code class="notranslate">Content-Disposition: form-data; name="file1"; filename="中文" </code></pre></div>
<p dir="auto">This code:</p> <p dir="auto">requests.post(url, files={"file": open(u"漢字.o8d", "r")})</p> <p dir="auto">will return a 200, but the file is never uploaded.</p> <p dir="auto">I can upload that file by posting in the browser so this doesn't seem to be a server-side issue. Also, if I change the name of the file to "bob" or something ASCII it works perfectly.</p>
1
<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>.): No</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.): None</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ kubectl version Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;5+&quot;, GitVersion:&quot;v1.5.0-beta.2.2+f64c9f2d999ceb&quot;, GitCommit:&quot;f64c9f2d999ceb157d5672e9bba6639a4c456f6e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-29T15:21:56Z&quot;, GoVersion:&quot;go1.7.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;5+&quot;, GitVersion:&quot;v1.5.0-beta.2.2+f64c9f2d999ceb&quot;, GitCommit:&quot;f64c9f2d999ceb157d5672e9bba6639a4c456f6e&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-29T15:13:51Z&quot;, GoVersion:&quot;go1.7.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate">$ <span class="pl-s1">kubectl version </span> <span class="pl-c1">Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2.2+f64c9f2d999ceb", GitCommit:"f64c9f2d999ceb157d5672e9bba6639a4c456f6e", GitTreeState:"clean", BuildDate:"2016-11-29T15:21:56Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}</span> <span class="pl-c1">Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2.2+f64c9f2d999ceb", GitCommit:"f64c9f2d999ceb157d5672e9bba6639a4c456f6e", GitTreeState:"clean", BuildDate:"2016-11-29T15:13:51Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}</span></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: GKE</li> </ul> <p dir="auto"><strong>What happened</strong>: Upgrades to version 1.5 (from any previous version) change existing addons from ReplicationControllers to Deployments without deleting old ReplicationControllers. This leads to multiple versions of the addons running at the same time. There also seems to be multiple deployments of heapster as well.</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ kubectl get rc --namespace=kube-system NAME DESIRED CURRENT READY AGE kube-dns-v17.1 2 2 2 1h kubernetes-dashboard-v1.1.1 1 1 1 1h l7-default-backend-v1.0 1 1 1 1h $ kubectl get deployment --namespace=kube-system NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE heapster-v1.1.0 1 1 1 1 1h heapster-v1.2.0 1 1 1 1 1h kube-dns 1 1 1 1 1h kubernetes-dashboard 1 1 1 1 1h l7-default-backend 1 1 1 1 1h $ kubectl get pods --namespace=kube-system NAME READY STATUS RESTARTS AGE fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-f3wt 1/1 Unknown 0 1h fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-mgst 1/1 Running 0 1h fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-zhm0 1/1 Running 0 1h heapster-v1.1.0-2096339923-39key 2/2 Running 0 1h heapster-v1.2.0-2168613315-1bcy3 2/2 Running 0 1h kube-dns-4101612645-78hx6 4/4 Running 0 1h kube-dns-v17.1-3pyz0 3/3 Running 0 1h kube-dns-v17.1-zaskz 3/3 Running 0 1h kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-f3wt 1/1 Unknown 0 1h kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-mgst 1/1 Running 0 1h kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-zhm0 1/1 Running 0 1h kubernetes-dashboard-3697774758-n808h 1/1 Running 0 1h kubernetes-dashboard-v1.1.1-ljtj5 1/1 Running 0 1h l7-default-backend-2234341178-vo5z1 1/1 Running 0 1h l7-default-backend-v1.0-qe9yo 1/1 Running 0 1h"><pre class="notranslate">$ <span class="pl-s1">kubectl get rc --namespace=kube-system </span> <span class="pl-c1">NAME DESIRED CURRENT READY AGE</span> <span class="pl-c1">kube-dns-v17.1 2 2 2 1h</span> <span class="pl-c1">kubernetes-dashboard-v1.1.1 1 1 1 1h</span> <span class="pl-c1">l7-default-backend-v1.0 1 1 1 1h</span> $ <span class="pl-s1">kubectl get deployment --namespace=kube-system </span> <span class="pl-c1">NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE</span> <span class="pl-c1">heapster-v1.1.0 1 1 1 1 1h</span> <span class="pl-c1">heapster-v1.2.0 1 1 1 1 1h</span> <span class="pl-c1">kube-dns 1 1 1 1 1h</span> <span class="pl-c1">kubernetes-dashboard 1 1 1 1 1h</span> <span class="pl-c1">l7-default-backend 1 1 1 1 1h</span> $ <span class="pl-s1">kubectl get pods --namespace=kube-system </span> <span class="pl-c1">NAME READY STATUS RESTARTS AGE</span> <span class="pl-c1">fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-f3wt 1/1 Unknown 0 1h</span> <span class="pl-c1">fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-mgst 1/1 Running 0 1h</span> <span class="pl-c1">fluentd-cloud-logging-gke-jenkins-e2e-default-pool-91ebbcc7-zhm0 1/1 Running 0 1h</span> <span class="pl-c1">heapster-v1.1.0-2096339923-39key 2/2 Running 0 1h</span> <span class="pl-c1">heapster-v1.2.0-2168613315-1bcy3 2/2 Running 0 1h</span> <span class="pl-c1">kube-dns-4101612645-78hx6 4/4 Running 0 1h</span> <span class="pl-c1">kube-dns-v17.1-3pyz0 3/3 Running 0 1h</span> <span class="pl-c1">kube-dns-v17.1-zaskz 3/3 Running 0 1h</span> <span class="pl-c1">kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-f3wt 1/1 Unknown 0 1h</span> <span class="pl-c1">kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-mgst 1/1 Running 0 1h</span> <span class="pl-c1">kube-proxy-gke-jenkins-e2e-default-pool-91ebbcc7-zhm0 1/1 Running 0 1h</span> <span class="pl-c1">kubernetes-dashboard-3697774758-n808h 1/1 Running 0 1h</span> <span class="pl-c1">kubernetes-dashboard-v1.1.1-ljtj5 1/1 Running 0 1h</span> <span class="pl-c1">l7-default-backend-2234341178-vo5z1 1/1 Running 0 1h</span> <span class="pl-c1">l7-default-backend-v1.0-qe9yo 1/1 Running 0 1h</span></pre></div> <p dir="auto">I found this as a counting error in <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-container_vm-1.3-container_vm-1.5-upgrade-cluster/337" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-container_vm-1.3-container_vm-1.5-upgrade-cluster/337</a>. At first, I just thought it was incorrectly counting, and I attempted to fix that <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189872287" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/36924" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/36924/hovercard" href="https://github.com/kubernetes/kubernetes/pull/36924">#36924</a>. That fix is still valid and an improvement, but the underlying problem of multiple versions of addons still running is probably bad.</p> <p dir="auto">We need a mechanism to delete the old ReplicationControllers/Deployments after an upgrade.</p>
<p dir="auto">There are a number of small pieces of discussion scattered across this and the rkt repository related to how to handle networking setup; I'd like to consolidate this discussion here, talk about all the issues and options I know about, and hopefully figure out what the best option is.</p> <p dir="auto">Discussion refs:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="138331624" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2249" data-hovercard-type="issue" data-hovercard-url="/rkt/rkt/issues/2249/hovercard" href="https://github.com/rkt/rkt/issues/2249">rkt/rkt#2249</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="156300306" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/26081" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/26081/hovercard" href="https://github.com/kubernetes/kubernetes/issues/26081">#26081</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="153996692" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/25404" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/25404/hovercard?comment_id=218402169&amp;comment_type=issue_comment" href="https://github.com/kubernetes/kubernetes/issues/25404#issuecomment-218402169">#25404 (comment)</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="150472538" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/24688" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/24688/hovercard" href="https://github.com/kubernetes/kubernetes/pull/24688">#24688</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="136210275" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/21923" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/21923/hovercard" href="https://github.com/kubernetes/kubernetes/issues/21923">#21923</a><br> And quite possibly several more I missed</p> <h2 dir="auto">Introduction</h2> <p dir="auto">Kubernetes and rkt both make use of CNI to configure container network namespaces. Each has independent means of configuring and executing plugins. Kubernetes also has a number of features that relate somewhat to the network namespace, such as availability of the pod's IP in a number of locations (status, downwards API, etc).</p> <p dir="auto">Until recently, rkt's handled network configuration on its own with no regard for Kubernetes' network logic. As of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="152677957" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/25062" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/25062/hovercard" href="https://github.com/kubernetes/kubernetes/pull/25062">#25062</a>, it was changed such that kubelet handles network setup and configuration for rkt. Unfortunately, both of these solutions have problems.</p> <p dir="auto">Below, the problems with each approach are listed. Finally, some paths forwards are suggested.</p> <h2 dir="auto">Issues</h2> <ul dir="auto"> <li>The PodIP should be available to the kubelet prior to applications running for a number of features to work <ul dir="auto"> <li>Downwards API (both volume and environment variables) rely on this</li> <li><code class="notranslate">/etc/hosts</code> file, created by kubelet, relies on this (alternately, rkt should create this correctly)</li> </ul> </li> <li>The network plugin configuration used by the docker container runtime should work, in general, for rkt with no changes (including filepath) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="138331624" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2249" data-hovercard-type="issue" data-hovercard-url="/rkt/rkt/issues/2249/hovercard" href="https://github.com/rkt/rkt/issues/2249">rkt/rkt#2249</a>)</li> <li>The solution should work with any rkt stage1 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="156300306" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/26081" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/26081/hovercard" href="https://github.com/kubernetes/kubernetes/issues/26081">#26081</a>)</li> </ul> <h2 dir="auto">Solutions</h2> <ol dir="auto"> <li>Rkt manages the network</li> <li>Kubelet manages the network</li> <li>Hybrid of 1 &amp; 2</li> </ol> <h3 dir="auto">Rkt manages networking</h3> <p dir="auto">This option has a few problems:</p> <ol dir="auto"> <li>The PodIP is not available to the kubelet until after the application is finalized (including mounts and environment variables) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="136232605" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2223" data-hovercard-type="issue" data-hovercard-url="/rkt/rkt/issues/2223/hovercard" href="https://github.com/rkt/rkt/issues/2223">rkt/rkt#2223</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="145801751" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2375" data-hovercard-type="issue" data-hovercard-url="/rkt/rkt/issues/2375/hovercard" href="https://github.com/rkt/rkt/issues/2375">rkt/rkt#2375</a>)</li> <li>The network plugin configuration path is not configurable (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="142424014" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2312" data-hovercard-type="pull_request" data-hovercard-url="/rkt/rkt/pull/2312/hovercard" href="https://github.com/rkt/rkt/pull/2312">rkt/rkt#2312</a>)</li> <li>Duplication of logic/code between kubelet and rkt (more or less depending on who creates <code class="notranslate">/etc/hosts</code> and so on).</li> </ol> <p dir="auto">The first issue there is a difficult one to solve and is the main reason that this approach was discarded, whether temporarily or not.</p> <p dir="auto">This is probably the only robust long-term solution when considering the large variety of stage1's (and thus network configurations) that are available and, once rkt provides a container-level interface (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="145801751" data-permission-text="Title is private" data-url="https://github.com/rkt/rkt/issues/2375" data-hovercard-type="issue" data-hovercard-url="/rkt/rkt/issues/2375/hovercard" href="https://github.com/rkt/rkt/issues/2375">rkt/rkt#2375</a>), there should be a natural way to solve problem number one via the separation of sandbox creation and container creation.</p> <h3 dir="auto">Kubelet manages networking</h3> <p dir="auto">This option has its own problems:</p> <ol dir="auto"> <li>Does not work with kvm flavor stage1 (or any stage1 that does not use Linux network namespaces or does not support <code class="notranslate">--net=host</code>).</li> <li>Depends on availability of nsenter / ip tools (already depended on elsewhere I believe, mostly a nonissue)</li> <li>Results in the <code class="notranslate">rkt</code> cli reporting incorrect network information</li> </ol> <p dir="auto">This allows fulfilling more of kubelet's assumptions about networking, but does not play nicely with rkt's existing abstractions. It does solve the most problems for the case of the default stage1 and existing rkt featureset while also not being a large amount of code. It also shares significant logic with the docker network setup, with the benefits that entails.</p> <h3 dir="auto">Hybrid</h3> <p dir="auto">The kubelet could decide whether it or rkt should manage the networking based on whether the stage1 suports it. When rkt manages networking, the features dependent on PodIP being available early on will not work.</p> <ol dir="auto"> <li>More code in kubelet to support both methods</li> <li>rkt does not provide an easy means to determine whether one or the other is appropriate currently</li> <li>Inconsistent featureset depending on stage1 (<g-emoji class="g-emoji" alias="frowning" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f626.png">😦</g-emoji>)</li> </ol> <h2 dir="auto">Conclusion</h2> <p dir="auto">My current preference is to continue with the kubelet-managed network for 1.0 (though given the timeline, I'm not sure there's another choice), and rethink this afterwards. If it's possible to support a hybrid approach by 1.0 with the understanding that it's a temporary solution, that also seems reasonable.</p> <p dir="auto">Ideally, the kubelet's abstractions would not interfere with rkt's ability to manage networking itself since, I admit, the above solution is a bit of a hacky one.</p> <p dir="auto">It's also possible that the upcoming Container Runtime Interface changes, with a focus on sandboxes, will require further changes in both the kubelet and rkt that changes what issues are present.</p> <p dir="auto">I'd like to gather other's thoughts and make sure we're all on the same page and figure out if there are other options or issues I'm not thinking of.</p> <p dir="auto">/cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yifan-gu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yifan-gu">@yifan-gu</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jellonek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jellonek">@jellonek</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pskrzyns/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pskrzyns">@pskrzyns</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jonboulle/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jonboulle">@jonboulle</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dcbw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dcbw">@dcbw</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/iaguis/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/iaguis">@iaguis</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/philips/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/philips">@philips</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thockin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thockin">@thockin</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/freehan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/freehan">@freehan</a></p>
0
<p dir="auto"><strong>Migrated issue, originally created by tosh</strong></p> <p dir="auto">Hi there,</p> <p dir="auto">I use SQLAlchemy 0.8.3 (so maybe it's fixed in newer releases) with MySQL 5.1.73.<br> When I do the query</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Session.query(distinct(Model))"><pre class="notranslate"><code class="notranslate">Session.query(distinct(Model)) </code></pre></div> <p dir="auto">it generates something like</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT :param_1 AS anon_1;"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT :param_1 AS anon_1; </code></pre></div> <p dir="auto">Where :param_1 is replaced with Model.__repr__() which is a simple string.</p> <p dir="auto">Maybe it would be more obvious if such SQLAlchemy-queries generated the following code?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT DISTINCT id AS anon_1 FROM model_table;"><pre class="notranslate"><code class="notranslate">SELECT DISTINCT id AS anon_1 FROM model_table; </code></pre></div> <p dir="auto">Optionally, SQLAlchemy could raise an exception if a model was passed as an argument.</p>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p>
1
<p dir="auto">React version: 17.0.1<br> React Reconciler version: 0.26.1</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>I upgraded from <code class="notranslate">[email protected]</code> to <code class="notranslate">[email protected]</code> and from <code class="notranslate">[email protected]</code> to <code class="notranslate">[email protected]</code></li> <li>I am using custom made renderer with my hostconfig (see code example)</li> </ol> <p dir="auto">Link to code example: Unfortunately project is private, but I am including all related files below (click sections to expand)</p> <details> <summary>Custom reconciler hostconfig (click to expand)</summary> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import danteApp from '$dante/util/danteApp'; import { diffProps, instances } from '$dante/util/helpers'; import { DanteInstance, InstanceType, PixiStage, UnknownProps } from '$dante/util/types'; import { isFunction } from 'lodash'; import { ReactNode } from 'react'; import ReactReconciler from 'react-reconciler'; const reconciler = ReactReconciler({ createInstance&lt;T extends InstanceType&gt;(type: T, props: UnknownProps) { // @ts-expect-error return new instances[type](props); }, createTextInstance() { throw new Error('dante does not support text instances. Use Text component instead.'); }, shouldSetTextContent() { return false; }, appendChild(parentInstance: DanteInstance, child: DanteInstance) { parentInstance.addDanteChild(child); }, appendChildToContainer(container: PixiStage, child: DanteInstance) { container.addChild(child.instance); }, appendInitialChild(parentInstance: DanteInstance, child: DanteInstance) { parentInstance.addDanteChild(child); }, insertBefore(parentInstance: DanteInstance, child: DanteInstance, beforeChild: DanteInstance) { if (child === beforeChild) { throw new Error('dante cannot insert node before itself'); } const index = parentInstance.getDanteChildIndex(beforeChild); const childExists = parentInstance.getDanteChildIndex(child) !== -1; if (childExists) { parentInstance.setDanteChildIndex(child, index); } else { parentInstance.addDanteChildAt(child, index); } }, insertInContainerBefore(container: PixiStage, child: DanteInstance, beforeChild: DanteInstance) { if (child === beforeChild) { throw new Error('dante cannot insert node before itself'); } const index = container.getChildIndex(beforeChild.instance); const childExists = container.getChildIndex(child.instance) !== -1; if (childExists) { container.setChildIndex(child.instance, index); } else { container.addChildAt(child.instance, index); } }, removeChild(parentInstance: DanteInstance, child: DanteInstance) { parentInstance.removeDanteChild(child); }, removeChildFromContainer(container: PixiStage, child: DanteInstance) { container.removeChild(child.instance); child.instance.destroy(); }, getPublicInstance(instance: DanteInstance) { return instance; }, getRootHostContext(rootContainerInstance) { return rootContainerInstance; }, getChildHostContext() { return {}; }, prepareForCommit() { return null; }, prepareUpdate(_instance, _type, oldProps: UnknownProps, newProps: UnknownProps) { return diffProps(oldProps, newProps); }, commitUpdate(instance: DanteInstance, updatePayload: UnknownProps) { if (isFunction(instance.applyProps)) { instance.applyProps(updatePayload); } }, finalizeInitialChildren(parentInstance: DanteInstance, _type, props: UnknownProps) { if (isFunction(parentInstance.finalizeChildren)) { parentInstance.finalizeChildren(props); } return false; }, now: window.performance.now, setTimeout: window.setTimeout, clearTimeout: window.clearTimeout, resetAfterCommit() { // Noop }, // @ts-expect-error clearContainer() { return false; }, hideInstance(instance: DanteInstance) { instance.instance.renderable = false; instance.instance.visible = false; }, unhideInstance(instance: DanteInstance) { instance.instance.renderable = true; instance.instance.visible = true; }, noTimeout: -1, isPrimaryRenderer: true, supportsMutation: true, supportsPersistence: false, supportsHydration: false }); export function render(root: ReactNode) { const container = reconciler.createContainer(danteApp.stage, false, false); reconciler.updateContainer(root, container, null, () =&gt; null); } export const danteRenderer = danteApp.renderer; "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">danteApp</span> <span class="pl-k">from</span> <span class="pl-s">'$dante/util/danteApp'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">diffProps</span><span class="pl-kos">,</span> <span class="pl-s1">instances</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'$dante/util/helpers'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-smi">InstanceType</span><span class="pl-kos">,</span> <span class="pl-smi">PixiStage</span><span class="pl-kos">,</span> <span class="pl-smi">UnknownProps</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'$dante/util/types'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">isFunction</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'lodash'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">ReactNode</span> <span class="pl-kos">}</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-smi">ReactReconciler</span> <span class="pl-k">from</span> <span class="pl-s">'react-reconciler'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">reconciler</span> <span class="pl-c1">=</span> <span class="pl-smi">ReactReconciler</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-en">createInstance</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">InstanceType</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-s1">props</span>: <span class="pl-smi">UnknownProps</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// <span class="pl-k">@ts</span>-expect-error</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-s1">instances</span><span class="pl-kos">[</span><span class="pl-s1">type</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-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">createTextInstance</span><span class="pl-kos">(</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-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">'dante does not support text instances. Use Text component instead.'</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">shouldSetTextContent</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">appendChild</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">addDanteChild</span><span class="pl-kos">(</span><span class="pl-s1">child</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">appendChildToContainer</span><span class="pl-kos">(</span><span class="pl-s1">container</span>: <span class="pl-smi">PixiStage</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">container</span><span class="pl-kos">.</span><span class="pl-en">addChild</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</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">appendInitialChild</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">addDanteChild</span><span class="pl-kos">(</span><span class="pl-s1">child</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">insertBefore</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">beforeChild</span>: <span class="pl-smi">DanteInstance</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">child</span> <span class="pl-c1">===</span> <span class="pl-s1">beforeChild</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-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">'dante cannot insert node before itself'</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">index</span> <span class="pl-c1">=</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">getDanteChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">beforeChild</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">childExists</span> <span class="pl-c1">=</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">getDanteChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">)</span> <span class="pl-c1">!==</span> <span class="pl-c1">-</span><span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">childExists</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">setDanteChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">,</span> <span class="pl-s1">index</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-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">addDanteChildAt</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">,</span> <span class="pl-s1">index</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">insertInContainerBefore</span><span class="pl-kos">(</span><span class="pl-s1">container</span>: <span class="pl-smi">PixiStage</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">beforeChild</span>: <span class="pl-smi">DanteInstance</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">child</span> <span class="pl-c1">===</span> <span class="pl-s1">beforeChild</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-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">'dante cannot insert node before itself'</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">index</span> <span class="pl-c1">=</span> <span class="pl-s1">container</span><span class="pl-kos">.</span><span class="pl-en">getChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">beforeChild</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">childExists</span> <span class="pl-c1">=</span> <span class="pl-s1">container</span><span class="pl-kos">.</span><span class="pl-en">getChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">)</span> <span class="pl-c1">!==</span> <span class="pl-c1">-</span><span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">childExists</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">container</span><span class="pl-kos">.</span><span class="pl-en">setChildIndex</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">,</span> <span class="pl-s1">index</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-s1">container</span><span class="pl-kos">.</span><span class="pl-en">addChildAt</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">,</span> <span class="pl-s1">index</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">removeChild</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">removeDanteChild</span><span class="pl-kos">(</span><span class="pl-s1">child</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">removeChildFromContainer</span><span class="pl-kos">(</span><span class="pl-s1">container</span>: <span class="pl-smi">PixiStage</span><span class="pl-kos">,</span> <span class="pl-s1">child</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">container</span><span class="pl-kos">.</span><span class="pl-en">removeChild</span><span class="pl-kos">(</span><span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">.</span><span class="pl-en">destroy</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">getPublicInstance</span><span class="pl-kos">(</span><span class="pl-s1">instance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">instance</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">getRootHostContext</span><span class="pl-kos">(</span><span class="pl-s1">rootContainerInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">rootContainerInstance</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">getChildHostContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">prepareForCommit</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">null</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">prepareUpdate</span><span class="pl-kos">(</span><span class="pl-s1">_instance</span><span class="pl-kos">,</span> <span class="pl-s1">_type</span><span class="pl-kos">,</span> <span class="pl-s1">oldProps</span>: <span class="pl-smi">UnknownProps</span><span class="pl-kos">,</span> <span class="pl-s1">newProps</span>: <span class="pl-smi">UnknownProps</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-en">diffProps</span><span class="pl-kos">(</span><span class="pl-s1">oldProps</span><span class="pl-kos">,</span> <span class="pl-s1">newProps</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">commitUpdate</span><span class="pl-kos">(</span><span class="pl-s1">instance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">updatePayload</span>: <span class="pl-smi">UnknownProps</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-en">isFunction</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">applyProps</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-en">applyProps</span><span class="pl-kos">(</span><span class="pl-s1">updatePayload</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">finalizeInitialChildren</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">,</span> <span class="pl-s1">_type</span><span class="pl-kos">,</span> <span class="pl-s1">props</span>: <span class="pl-smi">UnknownProps</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-en">isFunction</span><span class="pl-kos">(</span><span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-c1">finalizeChildren</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">parentInstance</span><span class="pl-kos">.</span><span class="pl-en">finalizeChildren</span><span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">now</span>: <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">performance</span><span class="pl-kos">.</span><span class="pl-c1">now</span><span class="pl-kos">,</span> <span class="pl-c1">setTimeout</span>: <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">setTimeout</span><span class="pl-kos">,</span> <span class="pl-c1">clearTimeout</span>: <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">clearTimeout</span><span class="pl-kos">,</span> <span class="pl-en">resetAfterCommit</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Noop</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">// <span class="pl-k">@ts</span>-expect-error</span> <span class="pl-en">clearContainer</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">hideInstance</span><span class="pl-kos">(</span><span class="pl-s1">instance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">.</span><span class="pl-c1">renderable</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">.</span><span class="pl-c1">visible</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">unhideInstance</span><span class="pl-kos">(</span><span class="pl-s1">instance</span>: <span class="pl-smi">DanteInstance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">.</span><span class="pl-c1">renderable</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-s1">instance</span><span class="pl-kos">.</span><span class="pl-c1">instance</span><span class="pl-kos">.</span><span class="pl-c1">visible</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">noTimeout</span>: <span class="pl-c1">-</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">isPrimaryRenderer</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">supportsMutation</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">supportsPersistence</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-c1">supportsHydration</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">root</span>: <span class="pl-smi">ReactNode</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">container</span> <span class="pl-c1">=</span> <span class="pl-s1">reconciler</span><span class="pl-kos">.</span><span class="pl-en">createContainer</span><span class="pl-kos">(</span><span class="pl-s1">danteApp</span><span class="pl-kos">.</span><span class="pl-c1">stage</span><span class="pl-kos">,</span> <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-c1">false</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">reconciler</span><span class="pl-kos">.</span><span class="pl-en">updateContainer</span><span class="pl-kos">(</span><span class="pl-s1">root</span><span class="pl-kos">,</span> <span class="pl-s1">container</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">danteRenderer</span> <span class="pl-c1">=</span> <span class="pl-s1">danteApp</span><span class="pl-kos">.</span><span class="pl-c1">renderer</span><span class="pl-kos">;</span></pre></div> </details> <details> <summary>Hook related to the error (click to expand)</summary> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { FONTS } from '$app/util/assets'; import theme from '$app/util/theme'; import { widthPercentage } from '$core/helpers'; import { BitmapFont, TextStyle } from 'pixi.js'; import { useCallback, useEffect, useState } from 'react'; /** * Utilities */ const { fonts } = document; const fontSize = widthPercentage(theme.fontSize.large); const fontOptions = { chars: BitmapFont.ALPHANUMERIC, resolution: devicePixelRatio, padding: widthPercentage(2) }; const gold = new TextStyle({ fill: theme.gradient.gold, fillGradientStops: [0.1, 0.5, 1], fillGradientType: 0, fontSize, ...theme.shadow.textShadowDark }); /** * Hook */ function useFonts() { const [ready, setReady] = useState(false); const loadFonts = useCallback(async () =&gt; { // Load custom fonts const openSans = new FontFace('OpenSans', `url(${FONTS.OpenSans})`, { weight: 'normal', style: 'normal' }); fonts.add(openSans); await openSans.load(); // Create optimised bitmap fonts BitmapFont.from('Script-gold', { ...gold, fontFamily: 'OpenSans' }, fontOptions); setReady(true); }, []); useEffect(() =&gt; { loadFonts(); }, [loadFonts]); return ready; } export default useFonts; "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">FONTS</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'$app/util/assets'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">theme</span> <span class="pl-k">from</span> <span class="pl-s">'$app/util/theme'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">widthPercentage</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'$core/helpers'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">BitmapFont</span><span class="pl-kos">,</span> <span class="pl-smi">TextStyle</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'pixi.js'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">useCallback</span><span class="pl-kos">,</span> <span class="pl-s1">useEffect</span><span class="pl-kos">,</span> <span class="pl-s1">useState</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Utilities</span> <span class="pl-c"> */</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> fonts <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-smi">document</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">fontSize</span> <span class="pl-c1">=</span> <span class="pl-en">widthPercentage</span><span class="pl-kos">(</span><span class="pl-s1">theme</span><span class="pl-kos">.</span><span class="pl-c1">fontSize</span><span class="pl-kos">.</span><span class="pl-c1">large</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">fontOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">chars</span>: <span class="pl-smi">BitmapFont</span><span class="pl-kos">.</span><span class="pl-c1">ALPHANUMERIC</span><span class="pl-kos">,</span> <span class="pl-c1">resolution</span>: <span class="pl-s1">devicePixelRatio</span><span class="pl-kos">,</span> <span class="pl-c1">padding</span>: <span class="pl-en">widthPercentage</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">gold</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">TextStyle</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">fill</span>: <span class="pl-s1">theme</span><span class="pl-kos">.</span><span class="pl-c1">gradient</span><span class="pl-kos">.</span><span class="pl-c1">gold</span><span class="pl-kos">,</span> <span class="pl-c1">fillGradientStops</span>: <span class="pl-kos">[</span><span class="pl-c1">0.1</span><span class="pl-kos">,</span> <span class="pl-c1">0.5</span><span class="pl-kos">,</span> <span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">fillGradientType</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> fontSize<span class="pl-kos">,</span> ...<span class="pl-s1">theme</span><span class="pl-kos">.</span><span class="pl-c1">shadow</span><span class="pl-kos">.</span><span class="pl-c1">textShadowDark</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * Hook</span> <span class="pl-c"> */</span> <span class="pl-k">function</span> <span class="pl-en">useFonts</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">ready</span><span class="pl-kos">,</span> <span class="pl-s1">setReady</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">false</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">loadFonts</span> <span class="pl-c1">=</span> <span class="pl-en">useCallback</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Load custom fonts</span> <span class="pl-k">const</span> <span class="pl-s1">openSans</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">FontFace</span><span class="pl-kos">(</span><span class="pl-s">'OpenSans'</span><span class="pl-kos">,</span> <span class="pl-s">`url(<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-smi">FONTS</span><span class="pl-kos">.</span><span class="pl-c1">OpenSans</span><span class="pl-kos">}</span></span>)`</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">weight</span>: <span class="pl-s">'normal'</span><span class="pl-kos">,</span> <span class="pl-c1">style</span>: <span class="pl-s">'normal'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">fonts</span><span class="pl-kos">.</span><span class="pl-en">add</span><span class="pl-kos">(</span><span class="pl-s1">openSans</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">openSans</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Create optimised bitmap fonts</span> <span class="pl-smi">BitmapFont</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s">'Script-gold'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> ...<span class="pl-s1">gold</span><span class="pl-kos">,</span> <span class="pl-c1">fontFamily</span>: <span class="pl-s">'OpenSans'</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">fontOptions</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">setReady</span><span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">loadFonts</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">loadFonts</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">ready</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">useFonts</span><span class="pl-kos">;</span></pre></div> </details> <details> <summary>Hook usage in the application (click to expand)</summary> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import LayoutRouteTransition from '$app/components/LayoutRouteTransition'; import Route from '$app/components/Route'; import useFonts from '$app/hooks/useFonts'; import Game from '$app/layouts/Game'; import Registration from '$app/layouts/Registration'; import React, { Fragment } from 'react'; function App() { const fonts = useFonts(); if (!fonts) { return null; } return ( &lt;LayoutRouteTransition&gt; {layout =&gt; ( &lt;Fragment&gt; &lt;Route route={layout} match=&quot;Registration&quot; Component={Registration} /&gt; &lt;Route route={layout} match=&quot;Game&quot; Component={Game} /&gt; &lt;/Fragment&gt; )} &lt;/LayoutRouteTransition&gt; ); } export default App;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-smi">LayoutRouteTransition</span> <span class="pl-k">from</span> <span class="pl-s">'$app/components/LayoutRouteTransition'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-smi">Route</span> <span class="pl-k">from</span> <span class="pl-s">'$app/components/Route'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">useFonts</span> <span class="pl-k">from</span> <span class="pl-s">'$app/hooks/useFonts'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-smi">Game</span> <span class="pl-k">from</span> <span class="pl-s">'$app/layouts/Game'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-smi">Registration</span> <span class="pl-k">from</span> <span class="pl-s">'$app/layouts/Registration'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-smi">React</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-smi">Fragment</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-smi">App</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">fonts</span> <span class="pl-c1">=</span> <span class="pl-en">useFonts</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">fonts</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">null</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-kos">&lt;</span><span class="pl-smi">LayoutRouteTransition</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span><span class="pl-c1">layout</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span> <span class="pl-kos">&lt;</span><span class="pl-smi">Fragment</span><span class="pl-kos">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Route</span> <span class="pl-smi">route</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">layout</span><span class="pl-kos">}</span> <span class="pl-s1">match</span><span class="pl-c1">=</span><span class="pl-s">"Registration"</span> <span class="pl-smi">Component</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">Registration</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Route</span> <span class="pl-s1">route</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">layout</span><span class="pl-kos">}</span> <span class="pl-s1">match</span><span class="pl-c1">=</span><span class="pl-s">"Game"</span> <span class="pl-smi">Component</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">Game</span><span class="pl-kos">}</span> <span class="pl-pds"><span class="pl-c1">/</span>&gt;</span><span class="pl-c1"></span> <span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>Fragment&gt;</span> <span class="pl-pds"> <span class="pl-kos">)</span><span class="pl-kos">}</span></span> <span class="pl-pds"> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span></span><span class="pl-smi">LayoutRouteTransition</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-s1">default</span> <span class="pl-smi">App</span><span class="pl-kos">;</span></pre></div> </details> <h2 dir="auto">The current behavior</h2> <blockquote> <p dir="auto">Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:</p> <ol dir="auto"> <li>You might have mismatching versions of React and the renderer (such as React DOM)</li> <li>You might be breaking the Rules of Hooks</li> <li>You might have more than one copy of React in the same app<br> See <a href="https://reactjs.org/link/invalid-hook-call" rel="nofollow">https://reactjs.org/link/invalid-hook-call</a> for tips about how to debug and fix this problem.<br> at resolveDispatcher (react.development.js:1476)<br> at useState (react.development.js:1507)<br> at useFonts (useFonts.ts:39)<br> at App (App.tsx:10)<br> at renderWithHooks (react-reconciler.development.js:6412)<br> at mountIndeterminateComponent (react-reconciler.development.js:9238)<br> at beginWork (react-reconciler.development.js:10476)<br> at HTMLUnknownElement.callCallback (react-reconciler.development.js:12184)<br> at Object.invokeGuardedCallbackDev (react-reconciler.development.js:12233)<br> at invokeGuardedCallback (react-reconciler.development.js:12292)</li> </ol> </blockquote> <h2 dir="auto">The expected behavior</h2> <p dir="auto">As far as I can tell this should be valid?</p>
<p dir="auto">When a function passed through props is used inside <code class="notranslate">useCallback</code>, the <code class="notranslate">react-hooks/exhaustive-deps</code> eslint rule give a false positive.</p> <p dir="auto">Using a value on the props object or reference the function doesn't generate a warning. Only when the function is called. See example below.</p> <p dir="auto">React version: 17.0.1<br> eslint-plugin-react-hooks: 4.6.0</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>The following code causes a linting error:</li> </ol> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React, { useCallback } from 'react'; interface TestComponent { value: number; testFunc: () =&gt; void; } export const TestComponent: React.FC&lt;TestComponent&gt; = (props) =&gt; { const onClick1 = useCallback(() =&gt; { props.testFunc(); }, [props.testFunc]); // Error here const onClick2 = useCallback(() =&gt; { console.log(props.value); }, [props.value]); // No error here const onClick3 = useCallback(() =&gt; { console.log(props.testFunc); }, [props.testFunc]); // No error here return &lt;div&gt; &lt;div onClick={onClick1}&gt;&lt;/div&gt; &lt;div onClick={onClick2}&gt;&lt;/div&gt; &lt;div onClick={onClick3}&gt;&lt;/div&gt; &lt;/div&gt; };"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-smi">React</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s1">useCallback</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">interface</span> <span class="pl-smi">TestComponent</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span> <span class="pl-c1">testFunc</span>: <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-smi">TestComponent</span>: <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-smi">FC</span><span class="pl-kos">&lt;</span><span class="pl-smi">TestComponent</span><span class="pl-kos">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">onClick1</span> <span class="pl-c1">=</span> <span class="pl-en">useCallback</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-en">testFunc</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">props</span><span class="pl-kos">.</span><span class="pl-c1">testFunc</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Error here</span> <span class="pl-k">const</span> <span class="pl-s1">onClick2</span> <span class="pl-c1">=</span> <span class="pl-en">useCallback</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">props</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// No error here</span> <span class="pl-k">const</span> <span class="pl-s1">onClick3</span> <span class="pl-c1">=</span> <span class="pl-en">useCallback</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</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">props</span><span class="pl-kos">.</span><span class="pl-c1">testFunc</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">props</span><span class="pl-kos">.</span><span class="pl-c1">testFunc</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// No error here</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">onClick1</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">onClick2</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">onClick3</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Link to code example:</p> <h2 dir="auto">The current behavior</h2> <p dir="auto">eslint produces an error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="React Hook useCallback has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside useCallback."><pre class="notranslate"><code class="notranslate">React Hook useCallback has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside useCallback. </code></pre></div> <h2 dir="auto">The expected behavior</h2> <p dir="auto">No error on all 3 cases.</p>
0
<p dir="auto">TODO:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> create_table_with_out_of_line_check</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> insert_on_duplicate_key_update_with_placeholders</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> select_count_with_sub_with_whitespace</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> select_distinct_function</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> update_with_case_when</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> update_with_where_calculation</li> </ul> <p dir="auto">The following SQL is not supported by SQL 92 and should be remove from the tests:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">CREATE INDEX order_index ON t_order (order_id, user_id, status)</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">CREATE INDEX t_log_index ON t_log (id)</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">CREATE UNIQUE INDEX t_log_index ON t_log (id)</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">CREATE USER user1 IDENTIFIED BY RANDOM password default role role1</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">CREATE USER user1 IDENTIFIED BY RANDOM password default role role1 PASSWORD EXPIRE ACCOUNT LOCK</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Unsupported SQL of <code class="notranslate">TRUNCATE TABLE t_log</code></li> </ul> <h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>For English only</strong>, other languages will not accept.</p> <p dir="auto">Before report a bug, make sure you have:</p> <ul dir="auto"> <li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li> <li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li> </ul> <p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br> If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p> <p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">5.0.0-RC1-SNAPSHOT</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">Both</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">SQL 92 parser test pass</p> <h3 dir="auto">Actual behavior</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ shardingsphere-sql-parser-test --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:145 no viable alternative at input 'HASH' line 1:145 mismatched input 'HASH' expecting {LINEAR, LIST, RANGE} line 1:7 no viable alternative at input 'CREATEUNIQUE' line 1:7 no viable alternative at input 'CREATEUNIQUE' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:0 no viable alternative at input 'TRUNCATE' line 1:0 mismatched input 'TRUNCATE' expecting {SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, GRANT, REVOKE, SET, COMMIT, ROLLBACK} [ERROR] Tests run: 1899, Failures: 7, Errors: 6, Skipped: 0, Time elapsed: 7.002 s &lt;&lt;&lt; FAILURE! - in org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest [ERROR] assertSupportedSQL[create_composite_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.007 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE INDEX order_index ON t_order (order_id, user_id, status)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE INDEX t_log_index ON t_log (id)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_table_with_out_of_line_check (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.017 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : create_table_with_out_of_line_check SQL : CREATE TABLE t_order (order_id INT, user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CHECK (order_id &gt; 0)) Constraint definitions size assertion error: Expected: is &lt;1&gt; but: was &lt;0&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[create_unique_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE UNIQUE INDEX t_log_index ON t_log (id)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_user_with_password (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE USER user1 IDENTIFIED BY RANDOM password default role role1` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_user_with_password_expire_lock (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE USER user1 IDENTIFIED BY RANDOM password default role role1 PASSWORD EXPIRE ACCOUNT LOCK` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[insert_on_duplicate_key_update_with_placeholders (Placeholder) -&gt; MySQL](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : insert_on_duplicate_key_update_with_placeholders SQL : INSERT INTO t_order (order_id, user_id, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE status = ? SQL Params : [1, 1, 'init', 'init'] Parameter markers count assertion error: Expected: is &lt;4&gt; but: was &lt;5&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[select_count_with_sub_with_whitespace (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : select_count_with_sub_with_whitespace SQL : SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id &gt; 1 - 1 Common expression text assertion error: Expected: is &quot;1 - 1&quot; but: was &quot;1-1&quot; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[select_distinct_function (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : select_distinct_function SQL : SELECT DISTINCT(item_id) FROM t_order_item ORDER BY item_id Projection type assertion error: Expected: an instance of org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.expression.ExpectedExpressionProjection but: &lt;org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection@163c7925&gt; is a org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[truncate_table (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `TRUNCATE TABLE t_log` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[update_with_case_when (Placeholder) -&gt; MySQL](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_case_when SQL : update stock_freeze_detail set row_status=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_user=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_time=case WHEN (id=?) THEN ? end where tenant_id = ? SQL Params : [3, 2, 4, 2, 10, 2, 3, 'll', 4, 'll', 10, 'll', 3, '2020-08-10T17:15:25.979+0800', 'jd'] Parameter markers count assertion error: Expected: is &lt;15&gt; but: was &lt;1&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[update_with_where_calculation (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = 1 WHERE order_id = order_id - 2 AND user_id = 3 Common expression text assertion error: Expected: is &quot;order_id - 2&quot; but: was &quot;order_id-2&quot; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[update_with_where_calculation (Placeholder) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = ? WHERE order_id = order_id - ? AND user_id = ? SQL Params : [1, 2, 3] Common expression text assertion error: Expected: is &quot;order_id - ?&quot; but: was &quot;order_id-?&quot; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [INFO] Running org.apache.shardingsphere.sql.parser.integrate.engine.UnsupportedSQLParserParameterizedTest [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s - in org.apache.shardingsphere.sql.parser.integrate.engine.UnsupportedSQLParserParameterizedTest [INFO] Running org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.SQLCasesLoaderTest [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.SQLCasesLoaderTest [INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : create_table_with_out_of_line_check SQL : CREATE TABLE t_order (order_id INT, user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CHECK (order_id &gt; 0)) Constraint definitions size assertion error: Expected: is &lt;1&gt; but: was &lt;0&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : insert_on_duplicate_key_update_with_placeholders SQL : INSERT INTO t_order (order_id, user_id, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE status = ? SQL Params : [1, 1, 'init', 'init'] Parameter markers count assertion error: Expected: is &lt;4&gt; but: was &lt;5&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : select_count_with_sub_with_whitespace SQL : SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id &gt; 1 - 1 Common expression text assertion error: Expected: is &quot;1 - 1&quot; but: was &quot;1-1&quot; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : select_distinct_function SQL : SELECT DISTINCT(item_id) FROM t_order_item ORDER BY item_id Projection type assertion error: Expected: an instance of org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.expression.ExpectedExpressionProjection but: &lt;org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection@163c7925&gt; is a org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_case_when SQL : update stock_freeze_detail set row_status=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_user=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_time=case WHEN (id=?) THEN ? end where tenant_id = ? SQL Params : [3, 2, 4, 2, 10, 2, 3, 'll', 4, 'll', 10, 'll', 3, '2020-08-10T17:15:25.979+0800', 'jd'] Parameter markers count assertion error: Expected: is &lt;15&gt; but: was &lt;1&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = 1 WHERE order_id = order_id - 2 AND user_id = 3 Common expression text assertion error: Expected: is &quot;order_id - 2&quot; but: was &quot;order_id-2&quot; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = ? WHERE order_id = order_id - ? AND user_id = ? SQL Params : [1, 2, 3] Common expression text assertion error: Expected: is &quot;order_id - ?&quot; but: was &quot;order_id-?&quot; [ERROR] Errors: [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [INFO] [ERROR] Tests run: 1905, Failures: 7, Errors: 6, Skipped: 0"><pre class="notranslate"><code class="notranslate">[INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ shardingsphere-sql-parser-test --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:7 no viable alternative at input 'CREATEINDEX' line 1:145 no viable alternative at input 'HASH' line 1:145 mismatched input 'HASH' expecting {LINEAR, LIST, RANGE} line 1:7 no viable alternative at input 'CREATEUNIQUE' line 1:7 no viable alternative at input 'CREATEUNIQUE' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:7 no viable alternative at input 'CREATEUSER' line 1:0 no viable alternative at input 'TRUNCATE' line 1:0 mismatched input 'TRUNCATE' expecting {SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, GRANT, REVOKE, SET, COMMIT, ROLLBACK} [ERROR] Tests run: 1899, Failures: 7, Errors: 6, Skipped: 0, Time elapsed: 7.002 s &lt;&lt;&lt; FAILURE! - in org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest [ERROR] assertSupportedSQL[create_composite_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.007 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE INDEX order_index ON t_order (order_id, user_id, status)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE INDEX t_log_index ON t_log (id)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_table_with_out_of_line_check (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.017 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : create_table_with_out_of_line_check SQL : CREATE TABLE t_order (order_id INT, user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CHECK (order_id &gt; 0)) Constraint definitions size assertion error: Expected: is &lt;1&gt; but: was &lt;0&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[create_unique_index (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE UNIQUE INDEX t_log_index ON t_log (id)` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_user_with_password (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE USER user1 IDENTIFIED BY RANDOM password default role role1` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[create_user_with_password_expire_lock (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `CREATE USER user1 IDENTIFIED BY RANDOM password default role role1 PASSWORD EXPIRE ACCOUNT LOCK` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[insert_on_duplicate_key_update_with_placeholders (Placeholder) -&gt; MySQL](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : insert_on_duplicate_key_update_with_placeholders SQL : INSERT INTO t_order (order_id, user_id, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE status = ? SQL Params : [1, 1, 'init', 'init'] Parameter markers count assertion error: Expected: is &lt;4&gt; but: was &lt;5&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[select_count_with_sub_with_whitespace (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : select_count_with_sub_with_whitespace SQL : SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id &gt; 1 - 1 Common expression text assertion error: Expected: is "1 - 1" but: was "1-1" at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[select_distinct_function (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : select_distinct_function SQL : SELECT DISTINCT(item_id) FROM t_order_item ORDER BY item_id Projection type assertion error: Expected: an instance of org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.expression.ExpectedExpressionProjection but: &lt;org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection@163c7925&gt; is a org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[truncate_table (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; ERROR! org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `TRUNCATE TABLE t_log` at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:93) [ERROR] assertSupportedSQL[update_with_case_when (Placeholder) -&gt; MySQL](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_case_when SQL : update stock_freeze_detail set row_status=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_user=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_time=case WHEN (id=?) THEN ? end where tenant_id = ? SQL Params : [3, 2, 4, 2, 10, 2, 3, 'll', 4, 'll', 10, 'll', 3, '2020-08-10T17:15:25.979+0800', 'jd'] Parameter markers count assertion error: Expected: is &lt;15&gt; but: was &lt;1&gt; at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[update_with_where_calculation (Literal) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = 1 WHERE order_id = order_id - 2 AND user_id = 3 Common expression text assertion error: Expected: is "order_id - 2" but: was "order_id-2" at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [ERROR] assertSupportedSQL[update_with_where_calculation (Placeholder) -&gt; SQL92](org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest) Time elapsed: 0.001 s &lt;&lt;&lt; FAILURE! java.lang.AssertionError: SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = ? WHERE order_id = order_id - ? AND user_id = ? SQL Params : [1, 2, 3] Common expression text assertion error: Expected: is "order_id - ?" but: was "order_id-?" at org.apache.shardingsphere.sql.parser.integrate.engine.SQLParserParameterizedTest.assertSupportedSQL(SQLParserParameterizedTest.java:94) [INFO] Running org.apache.shardingsphere.sql.parser.integrate.engine.UnsupportedSQLParserParameterizedTest [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s - in org.apache.shardingsphere.sql.parser.integrate.engine.UnsupportedSQLParserParameterizedTest [INFO] Running org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.SQLCasesLoaderTest [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.SQLCasesLoaderTest [INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : create_table_with_out_of_line_check SQL : CREATE TABLE t_order (order_id INT, user_id INT, status VARCHAR(10), column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), CHECK (order_id &gt; 0)) Constraint definitions size assertion error: Expected: is &lt;1&gt; but: was &lt;0&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : insert_on_duplicate_key_update_with_placeholders SQL : INSERT INTO t_order (order_id, user_id, status) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE status = ? SQL Params : [1, 1, 'init', 'init'] Parameter markers count assertion error: Expected: is &lt;4&gt; but: was &lt;5&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : select_count_with_sub_with_whitespace SQL : SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id &gt; 1 - 1 Common expression text assertion error: Expected: is "1 - 1" but: was "1-1" [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : select_distinct_function SQL : SELECT DISTINCT(item_id) FROM t_order_item ORDER BY item_id Projection type assertion error: Expected: an instance of org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.expression.ExpectedExpressionProjection but: &lt;org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection@163c7925&gt; is a org.apache.shardingsphere.sql.parser.integrate.jaxb.cases.domain.segment.impl.projection.impl.column.ExpectedColumnProjection [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_case_when SQL : update stock_freeze_detail set row_status=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_user=case WHEN (id=?) THEN ? WHEN (id=?) THEN ? WHEN (id=?) THEN ? end, update_time=case WHEN (id=?) THEN ? end where tenant_id = ? SQL Params : [3, 2, 4, 2, 10, 2, 3, 'll', 4, 'll', 10, 'll', 3, '2020-08-10T17:15:25.979+0800', 'jd'] Parameter markers count assertion error: Expected: is &lt;15&gt; but: was &lt;1&gt; [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = 1 WHERE order_id = order_id - 2 AND user_id = 3 Common expression text assertion error: Expected: is "order_id - 2" but: was "order_id-2" [ERROR] SQLParserParameterizedTest.assertSupportedSQL:94 SQL Case ID : update_with_where_calculation SQL : UPDATE t_order SET status = ? WHERE order_id = order_id - ? AND user_id = ? SQL Params : [1, 2, 3] Common expression text assertion error: Expected: is "order_id - ?" but: was "order_id-?" [ERROR] Errors: [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [ERROR] SQLParserParameterizedTest.assertSupportedSQL:93 » SQLParsing Unsupported SQL ... [INFO] [ERROR] Tests run: 1905, Failures: 7, Errors: 6, Skipped: 0 </code></pre></div> <h3 dir="auto">Reason analyze (If you can)</h3> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">In SQLCasesLoader.java:</p> <p dir="auto">Modify the method to</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" private static Collection&lt;String&gt; getALlDatabaseTypes() { return Arrays.asList(&quot;H2&quot;, &quot;MySQL&quot;, &quot;PostgreSQL&quot;, &quot;Oracle&quot;, &quot;SQLServer&quot;, &quot;SQL92&quot;); }"><pre class="notranslate"><code class="notranslate"> private static Collection&lt;String&gt; getALlDatabaseTypes() { return Arrays.asList("H2", "MySQL", "PostgreSQL", "Oracle", "SQLServer", "SQL92"); } </code></pre></div> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<p dir="auto">1、Which version of ShardingSphere did you use?<br> shardingsphere-jdbc:5.0.0-alpha</p> <p dir="auto">2、Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?<br> shardingsphere-jdbc</p> <p dir="auto">3、Expected behavior:<br> excute sql like "INSERT INTO user_info ( id, name, sex, updateTime) VALUES ( ?, ?, ?) ON DUPLICATE KEY UPDATE <code class="notranslate">name</code>=VALUES(<code class="notranslate">name</code>),updateTime=VALUES(updateTime);",<br> I want the <code class="notranslate">name</code> colume encrypted update</p> <p dir="auto">4、Actual behavior:<br> when excute this sql,throw some exceptions like this:<br> Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.common.segment.dml.item.ExpressionProjectionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment<br> at org.apache.shardingsphere.infra.binder.segment.insert.values.OnDuplicateUpdateContext.getValue(OnDuplicateUpdateContext.java:87) ~[shardingsphere-infra-binder-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.encrypt.rewrite.parameter.impl.EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.lambda$rewrite$0(EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.java:59) ~[shardingsphere-encrypt-rewrite-5.0.0-alpha.jar:5.0.0-alpha]<br> at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_73]<br> at org.apache.shardingsphere.encrypt.rewrite.parameter.impl.EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.rewrite(EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.java:58) ~[shardingsphere-encrypt-rewrite-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.encrypt.rewrite.parameter.impl.EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.rewrite(EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter.java:40) ~[shardingsphere-encrypt-rewrite-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.encrypt.rewrite.context.EncryptSQLRewriteContextDecorator.decorate(EncryptSQLRewriteContextDecorator.java:42) ~[shardingsphere-encrypt-rewrite-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.encrypt.rewrite.context.EncryptSQLRewriteContextDecorator.decorate(EncryptSQLRewriteContextDecorator.java:34) ~[shardingsphere-encrypt-rewrite-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.lambda$decorate$0(SQLRewriteEntry.java:83) ~[shardingsphere-infra-rewrite-engine-5.0.0-alpha.jar:5.0.0-alpha]<br> at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676) ~[?:1.8.0_73]<br> at org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.decorate(SQLRewriteEntry.java:83) ~[shardingsphere-infra-rewrite-engine-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.createSQLRewriteContext(SQLRewriteEntry.java:76) ~[shardingsphere-infra-rewrite-engine-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.infra.rewrite.SQLRewriteEntry.rewrite(SQLRewriteEntry.java:69) ~[shardingsphere-infra-rewrite-engine-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:54) ~[shardingsphere-infra-context-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:266) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]<br> at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:198) ~[shardingsphere-jdbc-core-5.0.0-alpha.jar:5.0.0-alpha]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73]<br> at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.4.0.jar:3.4.0]<br> at com.sun.proxy.$Proxy77.execute(Unknown Source) ~[?:?]<br> at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198) ~[mybatis-3.4.0.jar:3.4.0]<br> at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185) ~[mybatis-3.4.0.jar:3.4.0]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73]<br> at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73]<br> at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434) ~[mybatis-spring-1.3.0.jar:1.3.0]<br> ... 45 more</p> <p dir="auto">5、Reason analyze (If you can):<br> when excute on line 59 in class EncryptInsertOnDuplicateKeyUpdateValueParameterRewriter and on line 87 in class OnDuplicateUpdateContext,this exception appeared, valueExpression instance of ExpressionProjectionSegment , canot be cast to<br> LiteralExpressionSegment</p> <p dir="auto">6、Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc:<br> the table DDL is:<br> CREATE TABLE <code class="notranslate">anchor_info_1</code> (<br> <code class="notranslate">id</code> bigint(20) NOT NULL COMMENT '主键id',<br> <code class="notranslate">source</code> varchar(16) NOT NULL COMMENT '主播来源,yy(yy);后续扩展',<br> <code class="notranslate">anchorId</code> varchar(64) NOT NULL COMMENT '主播id',<br> <code class="notranslate">name</code> varchar(64) NOT NULL DEFAULT '' COMMENT '主播昵称',<br> <code class="notranslate">avatar</code> varchar(1024) NOT NULL DEFAULT '' COMMENT '主播头像',<br> <code class="notranslate">status</code> tinyint(4) NOT NULL DEFAULT '1' COMMENT '记录状态,-1-删除,1-有效,默认为1',<br> <code class="notranslate">createTime</code> bigint(20) NOT NULL COMMENT '创建时间,精确到毫秒',<br> <code class="notranslate">updateTime</code> bigint(20) NOT NULL DEFAULT '0' COMMENT '最近修改时间,精确到毫秒',<br> <code class="notranslate">lastUpdateTime</code> timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最近的修改时间,服务端专用,用来爬取更新的数据',<br> PRIMARY KEY (<code class="notranslate">id</code>) USING BTREE,<br> UNIQUE KEY <code class="notranslate">idx_source_anchorId</code> (<code class="notranslate">source</code>,<code class="notranslate">anchorId</code>) USING BTREE,<br> KEY <code class="notranslate">idx_createTime</code> (<code class="notranslate">createTime</code>) USING BTREE,<br> KEY <code class="notranslate">idx_updateTime</code> (<code class="notranslate">updateTime</code>) USING BTREE,<br> KEY <code class="notranslate">idx_lastUpdateTime</code> (<code class="notranslate">lastUpdateTime</code>) USING BTREE<br> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='主播信息表';</p> <p dir="auto">excute sql is:<br> <br> INSERT INTO anchor_info (id, source, anchorId, name, avatar, status, createTime, updateTime) VALUES<br> (#{id,jdbcType=BIGINT}, #{source,jdbcType=VARCHAR}, #{anchorId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},<br> #{avatar,jdbcType=VARCHAR},#{status,jdbcType=TINYINT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})<br> ON DUPLICATE KEY UPDATE <code class="notranslate">name</code>=VALUES(name),<br> updateTime=VALUES(updateTime);<br> </p> <p dir="auto">7、sharding rule configuration is:<br> rules:</p> <ul dir="auto"> <li>!ENCRYPT<br> tables:<br> anchor_info:<br> columns:<br> name:<br> cipherColumn: name<br> encryptorName: aes<br> encryptors:<br> aes:<br> type: AES<br> props:<br> aes-key-value: abcdisjckel14003c2f8ea32cc1d59e5</li> </ul>
0
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1931" rel="nofollow">http://projects.scipy.org/numpy/ticket/1931</a> on 2011-08-10 by trac user tlatorre, assigned to unknown.</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.uint64(5) &lt;&lt; 1 Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; TypeError: ufunc 'left_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe' &gt;&gt;&gt; np.uint64(5) &gt;&gt; 3 Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; np.uint64(5) &lt;&lt; 1 Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; TypeError: ufunc 'left_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe' &gt;&gt;&gt; np.uint64(5) &gt;&gt; 3 Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; TypeError: ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe' </code></pre></div>
<p dir="auto">This is to gather and close some other issues. The NEP 50 proposal would close it. In many cases using int64 as the default Python integer for scalar operations (where we disable value-based logic) can be surprising</p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10533985" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2955" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2955/hovercard" href="https://github.com/numpy/numpy/issues/2955">gh-2955</a> (bitwise_and)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66254462" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/5746" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/5746/hovercard" href="https://github.com/numpy/numpy/issues/5746">gh-5746</a> (comparison) although uint64 and int64 comparisons of course have still more issues (covered by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7731593" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2524" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2524/hovercard" href="https://github.com/numpy/numpy/issues/2524">gh-2524</a> (bit shift operators)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216032133" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/8809" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/8809/hovercard" href="https://github.com/numpy/numpy/issues/8809">gh-8809</a> power is surprising for promotion (which is just the normal madness of scalar+value-based logic), again together with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a></li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="415655775" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/13057" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/13057/hovercard" href="https://github.com/numpy/numpy/issues/13057">gh-13057</a> (division of uint by Python int)</li> </ul> <p dir="auto">This issue is just to gather and close the other ones as duplicates.</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/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.</li> <li>Operating System version: mac</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Step to reproduce this issue</h3> <ol dir="auto"> <li>表现:<br> consumer 在某些情况下会抛出<code class="notranslate">Dubbo client can not supported string message</code>异常,并且 message 显示为乱码信息,经查找资料是说消息体 &gt;8M 导致;</li> <li>实际测试结果:<br> 我本地测试的时候,均无法复现对应的异常信息,&gt;8M 的表现为 consumer 等待超时,且 provider 抛出<code class="notranslate">Data length too large:</code>异常。</li> </ol> <p dir="auto">求大神们帮忙分析一下,在什么情况下会出现标题中的那种异常?</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4.1</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Actual Result</h3> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/apache/dubbo/blob/00febe9e3cb450737d403a937322dc08ab5c6f2a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyClient.java#L80">dubbo/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyClient.java</a> </p> <p class="mb-0 color-fg-muted"> Line 80 in <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/00febe9e3cb450737d403a937322dc08ab5c6f2a">00febe9</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L80" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="80"></td> <td id="LC80" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// the handler will be warped: MultiMessageHandler-&gt;HeartbeatHandler-&gt;handler</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/apache/dubbo/blob/00febe9e3cb450737d403a937322dc08ab5c6f2a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyServer.java#L79">dubbo/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyServer.java</a> </p> <p class="mb-0 color-fg-muted"> Line 79 in <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/00febe9e3cb450737d403a937322dc08ab5c6f2a">00febe9</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L79" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="79"></td> <td id="LC79" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// the handler will be warped: MultiMessageHandler-&gt;HeartbeatHandler-&gt;handler</span> </td> </tr> </tbody></table> </div> </div> <p></p> <h3 dir="auto">Expected Result</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wrapped"><pre class="notranslate"><code class="notranslate">wrapped </code></pre></div>
0
<p dir="auto"><code class="notranslate">CartesianIndices</code> seems to enforce <code class="notranslate">Int</code> even if the arguments are of a different type; e.g.,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = Int32(3) @show typeof(-x:x) # =&gt; UnitRange{Int32} c = CartesianIndices((-x:x, -x:x)) @show typeof(c.indices[1]) # =&gt; UnitRange{Int64}"><pre class="notranslate"><code class="notranslate">x = Int32(3) @show typeof(-x:x) # =&gt; UnitRange{Int32} c = CartesianIndices((-x:x, -x:x)) @show typeof(c.indices[1]) # =&gt; UnitRange{Int64} </code></pre></div> <p dir="auto">This is very bad for writing type-stable code that uses an integer type other than <code class="notranslate">Int</code>.</p> <p dir="auto"><code class="notranslate">versioninfo()</code> -&gt;</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 1.1.0 Commit 80516ca202* (2019-01-21 21:24 UTC) Platform Info: OS: macOS (x86_64-apple-darwin18.2.0) CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA_NUM_THREADS = 1"><pre class="notranslate"><code class="notranslate">Julia Version 1.1.0 Commit 80516ca202* (2019-01-21 21:24 UTC) Platform Info: OS: macOS (x86_64-apple-darwin18.2.0) CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA_NUM_THREADS = 1 </code></pre></div>
<p dir="auto">Due to <code class="notranslate">LinearIndices</code> only supporting <code class="notranslate">Int</code>s, <code class="notranslate">keys</code> and <code class="notranslate">LinearIndices</code> do not work when the indices are not representable as <code class="notranslate">Int</code>s:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; keys(1:typemax(Int128)) ERROR: InexactError: trunc(Int64, 170141183460469231731687303715884105727) [...] julia&gt; LinearIndices(1:typemax(Int128)) ERROR: InexactError: trunc(Int64, 170141183460469231731687303715884105727) [...]"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">keys</span>(<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">typemax</span>(Int128)) ERROR<span class="pl-k">:</span> InexactError<span class="pl-k">:</span> <span class="pl-c1">trunc</span>(Int64, <span class="pl-c1">170141183460469231731687303715884105727</span>) [<span class="pl-k">...</span>] julia<span class="pl-k">&gt;</span> <span class="pl-c1">LinearIndices</span>(<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">typemax</span>(Int128)) ERROR<span class="pl-k">:</span> InexactError<span class="pl-k">:</span> <span class="pl-c1">trunc</span>(Int64, <span class="pl-c1">170141183460469231731687303715884105727</span>) [<span class="pl-k">...</span>]</pre></div> <p dir="auto">Related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322622328" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/27090" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/27090/hovercard" href="https://github.com/JuliaLang/julia/issues/27090">#27090</a></p>
1
<h1 dir="auto">The problem</h1> <ul dir="auto"> <li>Neo4J version: 3.4.5 (community)</li> <li>Operating System: Ubuntu 16.04</li> <li>API/Driver: Python driver 1.6.2</li> </ul> <p dir="auto">When a node string property participates in an index. Neo4J imposes a (reasonable) limit on its <strong>byte</strong> length. However, sometimes, even if one trims the string length to that limit, the transaction does go ahead, no problem is reported but the database is left at an unusable state from which it has to be recovered by a restart.</p> <p dir="auto"><strong>The specific question I have</strong> about this issue is about a clarification of the 4095 bytes limit because if I trim at 4095 characters, the query does go ahead gracefully but still leaves the database at an unusable state.</p> <p dir="auto">Is there anything else that might be added to this key internally that has to be taken into account?</p> <p dir="auto">Currently, I am trimming at 4000 bytes which is even lower than <code class="notranslate">keyValueSizeCap</code> (4047) but there are still test cases which fail :(</p> <p dir="auto">I do not want to empirically lower this limit until I get no errors in my test cases, but rather I would like to understand how to determine the limit at which to trim an indexable property so that I do not have any errors. This will also help a lot with an effective solution for <a href="https://github.com/neo4j-contrib/neomodel/issues/377" data-hovercard-type="issue" data-hovercard-url="/neo4j-contrib/neomodel/issues/377/hovercard">the validation of neomodel's <code class="notranslate">StringProperty</code></a>.</p> <h1 dir="auto">Reproducing the problem</h1> <p dir="auto">A much more detailed presentation of the problem with test cases of predictable and unpredictable behaviour is available in <a href="https://github.com/aanastasiou/neomodlon">this repository</a>.</p> <h1 dir="auto">Expected behaviour</h1> <p dir="auto">If the node property does not participate in an index, Neo4J has no problem in storing attribute values that may even be as big as 8kB.</p> <p dir="auto">Rather than throwing an exception which halts the whole process, would it be possible to consider specifying that in the case of indices, only the first ~4kB of the string's <strong>byte stream</strong> will participate in the key?</p> <p dir="auto">This means that if two strings happen to have the first N bytes identical, they would be considered as being the same even if their "ending" is different. (e.g. "Hello Neo4J" and "Hello" with <code class="notranslate">key_size=5</code>). This could be specified in the documentation around the node properties.</p> <p dir="auto">In this way, a property can still store long(ish) strings if required.</p> <p dir="auto"><strong>Note:</strong> The data I am dealing with were not expected to have such long values and in samples of hundreds of thousands of data items, just 2 happen to have such long values. We are talking about very rare occurrences but still possible. This indexing requirement means that I have to find an alternative way of both indexing the attribute and retaining its complete value which I will have to process at some point. I do not mind at all if duplicates are flagged just on the first ~4kB of the string because in my use case, if the first 4kB are the same, it is very likely that this is indeed the exact same value. But I cannot just store the trimmed value, I have to store both the trimmed (for the purposes of the indexing) and the non-trimmed (for the purposes of analysis) values. This is the motivation behind this request, rather than being able to store arbitrarily long pieces of text on Neo4J (which would not be good practice anyway).</p> <h1 dir="auto">Actual behaviour</h1> <p dir="auto">The server is left in an unusable state which necessitates a restart (or sometimes, even a complete wipeout of the database directory).</p>
<p dir="auto">Add node.prop.indexOf('str') and rel.prop.indexOf('str') so that one could then use SUBSTRING to get to a value in the property. See:</p> <p dir="auto"><a href="http://stackoverflow.com/questions/19830600/neo4j-getting-data-out-of-and-ordering-on-node-properties-when-the-property-h" rel="nofollow">http://stackoverflow.com/questions/19830600/neo4j-getting-data-out-of-and-ordering-on-node-properties-when-the-property-h</a></p>
0
<ul dir="auto"> <li>Electron version: 0.37.2</li> <li>Operating system: Windows 10</li> </ul> <p dir="auto">Trying to access the id property of a window from the renderer side, I am getting this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'object' of undefined at ObjectsRegistry.get (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\objects-registry.js:44:28) at EventEmitter.&lt;anonymous&gt; (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\rpc-server.js:337:31) at emitThree (events.js:97:13) at EventEmitter.emit (events.js:175:7) at EventEmitter.&lt;anonymous&gt; (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\api\web-contents.js:144:25) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:172:7) at metaToValue (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\renderer\api\remote.js:170:13) at descriptor.get [as id] (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\renderer\api\remote.js:118:16) at new ElectronWindow (file:///C:/GitDevelopment/monaco/out/vs/workbench/electron-browser/window.js:25:32)"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'object' of undefined at ObjectsRegistry.get (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\objects-registry.js:44:28) at EventEmitter.&lt;anonymous&gt; (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\rpc-server.js:337:31) at emitThree (events.js:97:13) at EventEmitter.emit (events.js:175:7) at EventEmitter.&lt;anonymous&gt; (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\browser\api\web-contents.js:144:25) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:172:7) at metaToValue (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\renderer\api\remote.js:170:13) at descriptor.get [as id] (c:\GitDevelopment\monaco\.build\electron\resources\atom.asar\renderer\api\remote.js:118:16) at new ElectronWindow (file:///C:/GitDevelopment/monaco/out/vs/workbench/electron-browser/window.js:25:32) </code></pre></div>
<ul dir="auto"> <li>Electron version: 0.36.9</li> <li>Operating system: Mac</li> </ul> <p dir="auto">We're still trying to nail down repro steps in Slack, but it seems to happen on 0.36.9 when calling <code class="notranslate">remote</code> methods. Specifically, we build context menus using <code class="notranslate">remote</code> (very similar to the <a href="https://github.com/atom/electron/blob/master/docs/api/menu.md"><code class="notranslate">Menu</code></a> sample) and occasionally they stop working with this exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught Error: Cannot read property 'object' of undefined TypeError: Cannot read property 'object' of undefined at ObjectsRegistry.get (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\objects-registry.js:44:28) at metaToValue (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:155:32) at Array.map (native) at unwrapArgs (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:214:15) at EventEmitter.&lt;anonymous&gt; (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:317:12) at emitMany (events.js:108:13) at EventEmitter.emit (events.js:182:7) at EventEmitter.&lt;anonymous&gt; (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\api\lib\web-contents.js:133:25) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:172:7)"><pre class="notranslate"><code class="notranslate">Uncaught Error: Cannot read property 'object' of undefined TypeError: Cannot read property 'object' of undefined at ObjectsRegistry.get (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\objects-registry.js:44:28) at metaToValue (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:155:32) at Array.map (native) at unwrapArgs (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:214:15) at EventEmitter.&lt;anonymous&gt; (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\lib\rpc-server.js:317:12) at emitMany (events.js:108:13) at EventEmitter.emit (events.js:182:7) at EventEmitter.&lt;anonymous&gt; (C:\Users\paulb\AppData\Local\slack\app-2.0.2\resources\atom.asar\browser\api\lib\web-contents.js:133:25) at emitTwo (events.js:87:13) at EventEmitter.emit (events.js:172:7) </code></pre></div>
1
<p dir="auto">Currently if a historical tier has a replication factor of 1 (meaning only 1 copy of the data across the tier) then any particular node cannot be shut down for planned maintenance without temporarily loosing the ability to query data which was hosted there.</p> <p dir="auto">As a user of Druid, I would like my queries to always return all the data even during planned maintenance or planned node shutdowns provided there is enough overall tier capacity to hold the data.</p>
<p dir="auto">This ask is that historical nodes are able to be put into a maintenance mode such that their nodes do not count towards the replication threshold. This allows for scaling tiers down in a more controlled manner.</p> <p dir="auto">We occasionally have capacity issues as we scale our cluster such that a lower tier fills up, and upper tiers need to be expanded to accommodate the handoff of realtime indexing tasks while the lower tiers expand. Once this is completed and segments are flowing as expected through the tiers, the "more recent data" tiers need to be shrunk back to normal operating size.</p> <p dir="auto">Being able to put a historical node into a state where it doesn't count towards replication would help in this.</p>
1
<p dir="auto">I saw two common usage patterns of Timer.Reset:</p> <p dir="auto">First is ensuring that a sequence of events happens in a timely fashion:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="timeout := time.NewTimer(T) for { if !timeout.Reset(T) { &lt;-timeout.C } select { case &lt;- ...: ... case &lt;-timeout.C: ... } }"><pre class="notranslate"><span class="pl-s1">timeout</span> <span class="pl-c1">:=</span> <span class="pl-s1">time</span>.<span class="pl-en">NewTimer</span>(<span class="pl-s1">T</span>) <span class="pl-k">for</span> { <span class="pl-k">if</span> <span class="pl-c1">!</span><span class="pl-s1">timeout</span>.<span class="pl-en">Reset</span>(<span class="pl-s1">T</span>) { <span class="pl-c1">&lt;-</span><span class="pl-s1">timeout</span>.<span class="pl-c1">C</span> } <span class="pl-k">select</span> { <span class="pl-k">case</span> <span class="pl-c1">&lt;-</span> <span class="pl-c1">...</span>: <span class="pl-c1">...</span> <span class="pl-k">case</span> <span class="pl-c1">&lt;-</span><span class="pl-s1">timeout</span>.<span class="pl-c1">C</span>: <span class="pl-c1">...</span> } }</pre></div> <p dir="auto">Second is connection timeout with an ability to change the timeout:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="timeout := time.NewTimer(T) // goroutine 1 for { select { case &lt;- ...: ... case &lt;-timeout.C: ... } } // goroutine 2 if !timeout.Reset(T2) { &lt;-timeout.C }"><pre class="notranslate"><span class="pl-s1">timeout</span> <span class="pl-c1">:=</span> <span class="pl-s1">time</span>.<span class="pl-en">NewTimer</span>(<span class="pl-s1">T</span>) <span class="pl-c">// goroutine 1</span> <span class="pl-k">for</span> { <span class="pl-k">select</span> { <span class="pl-k">case</span> <span class="pl-c1">&lt;-</span> <span class="pl-c1">...</span>: <span class="pl-c1">...</span> <span class="pl-k">case</span> <span class="pl-c1">&lt;-</span><span class="pl-s1">timeout</span>.<span class="pl-c1">C</span>: <span class="pl-c1">...</span> } } <span class="pl-c">// goroutine 2</span> <span class="pl-k">if</span> <span class="pl-c1">!</span><span class="pl-s1">timeout</span>.<span class="pl-en">Reset</span>(<span class="pl-s1">T2</span>) { <span class="pl-c1">&lt;-</span><span class="pl-s1">timeout</span>.<span class="pl-c1">C</span> }</pre></div> <p dir="auto">There are several things that can go wrong here depending on timings:</p> <ol dir="auto"> <li>Reset returns false; one element is already in the channel (the old one); timer goroutine sends another (corresponding to the new timeout), it is discarded since the channel is full; now we drain the channel to read out the old value; as the result timeout will never happen as the new value was discarded.</li> <li>Reset returns false; one element is already in the channel (the old one); timer goroutine sends another (corresponding to the new timeout), it is discarded since the channel is full; goroutine 1 reads out from the channel; goroutine 2 hangs forever trying to drain the channel.</li> </ol> <p dir="auto">I've found several cases of this bug in our internal codebase, one even with a TODO by <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> describing this race.</p> <p dir="auto">Timer.Reset does the following:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func (t *Timer) Reset(d Duration) bool { if t.r.f == nil { panic(&quot;time: Reset called on uninitialized Timer&quot;) } w := when(d) active := stopTimer(&amp;t.r) t.r.when = w startTimer(&amp;t.r) return active }"><pre class="notranslate"><span class="pl-k">func</span> (<span class="pl-s1">t</span> <span class="pl-c1">*</span><span class="pl-smi">Timer</span>) <span class="pl-en">Reset</span>(<span class="pl-s1">d</span> <span class="pl-smi">Duration</span>) <span class="pl-smi">bool</span> { <span class="pl-k">if</span> <span class="pl-s1">t</span>.<span class="pl-c1">r</span>.<span class="pl-c1">f</span> <span class="pl-c1">==</span> <span class="pl-c1">nil</span> { <span class="pl-en">panic</span>(<span class="pl-s">"time: Reset called on uninitialized Timer"</span>) } <span class="pl-s1">w</span> <span class="pl-c1">:=</span> <span class="pl-en">when</span>(<span class="pl-s1">d</span>) <span class="pl-s1">active</span> <span class="pl-c1">:=</span> <span class="pl-en">stopTimer</span>(<span class="pl-c1">&amp;</span><span class="pl-s1">t</span>.<span class="pl-c1">r</span>) <span class="pl-s1">t</span>.<span class="pl-c1">r</span>.<span class="pl-c1">when</span> <span class="pl-c1">=</span> <span class="pl-s1">w</span> <span class="pl-en">startTimer</span>(<span class="pl-c1">&amp;</span><span class="pl-s1">t</span>.<span class="pl-c1">r</span>) <span class="pl-k">return</span> <span class="pl-s1">active</span> }</pre></div> <p dir="auto">What would be possible to use correctly is:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func (t *Timer) Reset2(d Duration) bool { if t.r.f == nil { panic(&quot;time: Reset called on uninitialized Timer&quot;) } w := when(d) active := stopTimer(&amp;t.r) if !active { &lt;-t.C } t.r.when = w startTimer(&amp;t.r) return active }"><pre class="notranslate"><span class="pl-k">func</span> (<span class="pl-s1">t</span> <span class="pl-c1">*</span><span class="pl-smi">Timer</span>) <span class="pl-en">Reset2</span>(<span class="pl-s1">d</span> <span class="pl-smi">Duration</span>) <span class="pl-smi">bool</span> { <span class="pl-k">if</span> <span class="pl-s1">t</span>.<span class="pl-c1">r</span>.<span class="pl-c1">f</span> <span class="pl-c1">==</span> <span class="pl-c1">nil</span> { <span class="pl-en">panic</span>(<span class="pl-s">"time: Reset called on uninitialized Timer"</span>) } <span class="pl-s1">w</span> <span class="pl-c1">:=</span> <span class="pl-en">when</span>(<span class="pl-s1">d</span>) <span class="pl-s1">active</span> <span class="pl-c1">:=</span> <span class="pl-en">stopTimer</span>(<span class="pl-c1">&amp;</span><span class="pl-s1">t</span>.<span class="pl-c1">r</span>) <span class="pl-k">if</span> <span class="pl-c1">!</span><span class="pl-s1">active</span> { <span class="pl-c1">&lt;-</span><span class="pl-s1">t</span>.<span class="pl-c1">C</span> } <span class="pl-s1">t</span>.<span class="pl-c1">r</span>.<span class="pl-c1">when</span> <span class="pl-c1">=</span> <span class="pl-s1">w</span> <span class="pl-en">startTimer</span>(<span class="pl-c1">&amp;</span><span class="pl-s1">t</span>.<span class="pl-c1">r</span>) <span class="pl-k">return</span> <span class="pl-s1">active</span> }</pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rsc">@rsc</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Sajmani/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Sajmani">@Sajmani</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aclements/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aclements">@aclements</a></p>
<p dir="auto">A common idiom is to keep a single timer and extend its<br> use by calling Timer.Reset.</p> <p dir="auto">From a naive reading of the documentation, these two<br> lines are equivalent except for saving some garbage:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t.Reset(x) t := time.NewTimer(x)"><pre class="notranslate"><code class="notranslate">t.Reset(x) t := time.NewTimer(x) </code></pre></div> <p dir="auto">Unfortunately t.C is buffered, so if the timer has just expired,<br> the newly reset timer can actually trigger immediately.</p> <p dir="auto">The safe way to do it might be someting like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t.Stop() select { case &lt;-t.C: default: } t.Reset(x)"><pre class="notranslate"><code class="notranslate">t.Stop() select { case &lt;-t.C: default: } t.Reset(x) </code></pre></div> <p dir="auto">but this is cumbersome. Perhaps we could change Reset to do this<br> as a matter of course.</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: 18363.657 PowerToys version: 0.15.2 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 18363.657 PowerToys version: 0.15.2 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">I just noticed that multi-monitor support has been removed in 0.15.2. Please add this back.</p> <h1 dir="auto">Expected behavior</h1> <h1 dir="auto">Actual behavior</h1> <h1 dir="auto">Screenshots</h1>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [Version 10.0.18362.387] PowerToys version: 0.12.0.0 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: [Version 10.0.18362.387] PowerToys version: 0.12.0.0 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">I have 2 custom layouts. One for the left monitor, one for the right.</p> <ol dir="auto"> <li> <p dir="auto">I move the mouse to the left monitor and press [WIN] ~</p> </li> <li> <p dir="auto">I choose Custom, and the left layout option.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5576809/67908977-bf706580-fb3a-11e9-9107-9550b2b43c24.png"><img src="https://user-images.githubusercontent.com/5576809/67908977-bf706580-fb3a-11e9-9107-9550b2b43c24.png" alt="left" style="max-width: 100%;"></a></p> </li> <li> <p dir="auto">I click Apply</p> </li> <li> <p dir="auto">I move the mouse to the right monitor and press [WIN] ~</p> </li> <li> <p dir="auto">I choose Custom, and the right layout option.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5576809/67908920-87692280-fb3a-11e9-9d02-3317015c5d4a.png"><img src="https://user-images.githubusercontent.com/5576809/67908920-87692280-fb3a-11e9-9d02-3317015c5d4a.png" alt="right" style="max-width: 100%;"></a></p> </li> </ol> <p dir="auto">I click Apply.<br> The right monitor layout is applied to all monitors. I have tried also just moving the settings window before hitting apply but that doesn't work either.</p> <p dir="auto">I can also use the main settings window, drag to the monitor, change the layout, and the same behavior happens, both monitors are updated.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Expected to be able to have a separate layout on different monitors.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Identical layout applied to all monitors.</p> <h1 dir="auto">Screenshots</h1>
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://github.com/celery/celery/discussions">discussions forum</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have read the relevant section in the<br> <a href="https://docs.celeryq.dev/en/master/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>:</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">@task_received.connect()<br> def pyfi_task_received(sender=None, request=None, **kwargs):</p> <p dir="auto">request.name should contain the name of the task, not "chord_unlock"</p> <h1 dir="auto">Actual Behavior</h1>
<h2 dir="auto">Checklist</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> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.5.2 billiard:3.5.0.2 py-amqp:2.1.4 platform -&gt; system:Darwin arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:redis://127.0.0.1/ result_backend: 'redis://127.0.0.1/' broker_url: 'amqp://guest:********@localhost:5672//'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.0.2 (latentcall) kombu:4.0.2 py:3.5.2 billiard:3.5.0.2 py-amqp:2.1.4 platform -&gt; system:Darwin arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:pyamqp results:redis://127.0.0.1/ result_backend: 'redis://127.0.0.1/' broker_url: 'amqp://guest:********@localhost:5672//' </code></pre></div> <h2 dir="auto">Steps to reproduce</h2> <ol dir="auto"> <li>Create chord on celery with eventlet on redis backend.</li> <li>Run chord</li> <li>Run <code class="notranslate">pubsub channels</code></li> <li>Run chord again</li> <li>Run <code class="notranslate">pubsub channels</code></li> </ol> <p dir="auto">Code example: <a href="https://gist.github.com/gugu/680452f754507ec6bea144a2b257c398">https://gist.github.com/gugu/680452f754507ec6bea144a2b257c398</a></p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">On step 3 and 5 we need to have 0 channels</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">On step 3 we have 4 open channels<br> On step 5 we have 8 open channels<br> On our live application in 2 hours (between restarts) we have 3 200 000 open channels, which generally slows everything and hell gates open with tenth of different issues.</p> <p dir="auto">PS: will try to return with pull request later</p>
0
<p dir="auto">Currently the ListItem supports a prop called <code class="notranslate">initiallyOpen</code> and an event <code class="notranslate">onNestedListToggle</code>. It would be great if it could simply accept <code class="notranslate">open</code> as a prop which overrides the internal state.</p>
<p dir="auto">I am using material-ui in a project with react router. And I want to control which ListItems show there nestedLists. This is unfortunately not possible because i can't control wether a listItem is "open" or not.<br> I know there is a Prop to control if its initially open. But I want to change it from my parent component after initial render, which currently does not seem to be possible. I would suggest an "open" props instead of a "initiallyOpen" one.</p>
1
<p dir="auto">At the moment, having this in a mapping throws a parsing error:</p> <p dir="auto">"topic_date" : { "type" : "date", "format": "date_optional_time||yyyy-MM-dd'T'HH:mm" }</p>
<p dir="auto">The following mapping:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="'index': { 'properties': { 'date_created': { 'type': 'date', 'index': 'not_analyzed', 'format: 'date_time||date_time_no_millis', }, }, }"><pre class="notranslate"><code class="notranslate">'index': { 'properties': { 'date_created': { 'type': 'date', 'index': 'not_analyzed', 'format: 'date_time||date_time_no_millis', }, }, } </code></pre></div> <p dir="auto">Gives an error:</p> <p dir="auto"><code class="notranslate">ElasticSearchException[Illegal pattern component: t]; nested: IllegalArgumentException[Illegal pattern component: t];</code></p> <p dir="auto">I tried patching as follows, however didn't manage to get it working since <code class="notranslate">forPattern</code> wasn't called as expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/src/main/java/org/elasticsearch/common/joda/Joda.java b/src/main/java/org/elasticsearch/common/joda/Joda.java index a4f3427..e8d6e53 100644 --- a/src/main/java/org/elasticsearch/common/joda/Joda.java +++ b/src/main/java/org/elasticsearch/common/joda/Joda.java @@ -31,11 +31,11 @@ import org.joda.time.format.*; */ public class Joda { - /** - * Parses a joda based pattern, including some named ones (similar to the built in Joda ISO ones). - */ - public static FormatDateTimeFormatter forPattern(String input) { + private static DateTimeFormatter formatterForPattern(String input) { DateTimeFormatter formatter; if (&quot;basicDate&quot;.equals(input) || &quot;basic_date&quot;.equals(input)) { formatter = ISODateTimeFormat.basicDate(); } else if (&quot;basicDateTime&quot;.equals(input) || &quot;basic_date_time&quot;.equals(input)) { @@ -76,9 +76,10 @@ public class Joda { formatter = ISODateTimeFormat.dateHourMinuteSecondMillis(); } else if (&quot;dateOptionalTime&quot;.equals(input) || &quot;date_optional_time&quot;.equals(input)) { // in this case, we have a separate parser and printer since the dataOptionalTimeParser can't print - return new FormatDateTimeFormatter(input, - ISODateTimeFormat.dateOptionalTimeParser().withZone(DateTimeZone.UTC), - ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC)); + DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() + .append(ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC).getPrinter(), + ISODateTimeFormat.dateOptionalTimeParser().withZone(DateTimeZone.UTC).getParser()); + formatter = builder.toFormatter(); } else if (&quot;dateTime&quot;.equals(input) || &quot;date_time&quot;.equals(input)) { formatter = ISODateTimeFormat.dateTime(); } else if (&quot;dateTimeNoMillis&quot;.equals(input) || &quot;date_time_no_millis&quot;.equals(input)) { @@ -125,14 +126,27 @@ public class Joda { formatter = DateTimeFormat.forPattern(input); } else { DateTimeParser[] parsers = new DateTimeParser[formats.length]; + DateTimePrinter printer = null; for (int i = 0; i &lt; formats.length; i++) { - parsers[i] = DateTimeFormat.forPattern(formats[i]).withZone(DateTimeZone.UTC).getParser(); + DateTimeFormatter f = formatterForPattern(formats[i]); + parsers[i] = f.getParser(); + if (i == 0) { + printer = f.getPrinter(); + } } DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() - .append(DateTimeFormat.forPattern(formats[0]).withZone(DateTimeZone.UTC).getPrinter(), parsers); + .append(printer, parsers); formatter = builder.toFormatter(); } } + return formatter; + } + + /** + * Parses a joda based pattern, including some named ones (similar to the built in Joda ISO ones). + */ + public static FormatDateTimeFormatter forPattern(String input) { + DateTimeFormatter formatter = formatterForPattern(input); return new FormatDateTimeFormatter(input, formatter.withZone(DateTimeZone.UTC)); }"><pre class="notranslate"><code class="notranslate">diff --git a/src/main/java/org/elasticsearch/common/joda/Joda.java b/src/main/java/org/elasticsearch/common/joda/Joda.java index a4f3427..e8d6e53 100644 --- a/src/main/java/org/elasticsearch/common/joda/Joda.java +++ b/src/main/java/org/elasticsearch/common/joda/Joda.java @@ -31,11 +31,11 @@ import org.joda.time.format.*; */ public class Joda { - /** - * Parses a joda based pattern, including some named ones (similar to the built in Joda ISO ones). - */ - public static FormatDateTimeFormatter forPattern(String input) { + private static DateTimeFormatter formatterForPattern(String input) { DateTimeFormatter formatter; if ("basicDate".equals(input) || "basic_date".equals(input)) { formatter = ISODateTimeFormat.basicDate(); } else if ("basicDateTime".equals(input) || "basic_date_time".equals(input)) { @@ -76,9 +76,10 @@ public class Joda { formatter = ISODateTimeFormat.dateHourMinuteSecondMillis(); } else if ("dateOptionalTime".equals(input) || "date_optional_time".equals(input)) { // in this case, we have a separate parser and printer since the dataOptionalTimeParser can't print - return new FormatDateTimeFormatter(input, - ISODateTimeFormat.dateOptionalTimeParser().withZone(DateTimeZone.UTC), - ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC)); + DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() + .append(ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC).getPrinter(), + ISODateTimeFormat.dateOptionalTimeParser().withZone(DateTimeZone.UTC).getParser()); + formatter = builder.toFormatter(); } else if ("dateTime".equals(input) || "date_time".equals(input)) { formatter = ISODateTimeFormat.dateTime(); } else if ("dateTimeNoMillis".equals(input) || "date_time_no_millis".equals(input)) { @@ -125,14 +126,27 @@ public class Joda { formatter = DateTimeFormat.forPattern(input); } else { DateTimeParser[] parsers = new DateTimeParser[formats.length]; + DateTimePrinter printer = null; for (int i = 0; i &lt; formats.length; i++) { - parsers[i] = DateTimeFormat.forPattern(formats[i]).withZone(DateTimeZone.UTC).getParser(); + DateTimeFormatter f = formatterForPattern(formats[i]); + parsers[i] = f.getParser(); + if (i == 0) { + printer = f.getPrinter(); + } } DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() - .append(DateTimeFormat.forPattern(formats[0]).withZone(DateTimeZone.UTC).getPrinter(), parsers); + .append(printer, parsers); formatter = builder.toFormatter(); } } + return formatter; + } + + /** + * Parses a joda based pattern, including some named ones (similar to the built in Joda ISO ones). + */ + public static FormatDateTimeFormatter forPattern(String input) { + DateTimeFormatter formatter = formatterForPattern(input); return new FormatDateTimeFormatter(input, formatter.withZone(DateTimeZone.UTC)); } </code></pre></div> <p dir="auto">I'm happy to submit a full patch to make it work, but need a hint on where this exception is actually triggered.</p>
1
<h3 dir="auto">Is there an existing issue for this?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li> </ul> <h3 dir="auto">Current Behavior</h3> <p dir="auto">Bundled dependencies do not export executables when packing.</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto"><code class="notranslate">npm pack</code> output should include scripts under <code class="notranslate">.bin</code> to launch any executables provided by the bundled depdency.</p> <h3 dir="auto">Steps To Reproduce</h3> <ol dir="auto"> <li>Install any dependency that exposes an executable, e.g. <code class="notranslate">lws</code>.</li> <li>Include this dependency in <code class="notranslate">bundledDependencies</code></li> <li><code class="notranslate">npm pack</code></li> </ol> <p dir="auto">The resulting artifact includes the <code class="notranslate">bundledDependency</code> under <code class="notranslate">node_modules</code>, but does not create a <code class="notranslate">.bin</code> directory at all, and so the depdency's executable(s) will not be available.</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Win10 20H2</li> <li>Node: 14.15.4</li> <li>npm: 7.4.0</li> </ul>
<h3 dir="auto">Current Behavior:</h3> <p dir="auto">Bundled dependencies do not export executables when packing.</p> <h3 dir="auto">Expected Behavior:</h3> <p dir="auto"><code class="notranslate">npm pack</code> output should include scripts under <code class="notranslate">.bin</code> to launch any executables provided by the bundled depdency.</p> <h3 dir="auto">Steps To Reproduce:</h3> <ol dir="auto"> <li>Install any dependency that exposes an executable, e.g. <code class="notranslate">lws</code>.</li> <li>Include this dependency in <code class="notranslate">bundledDependencies</code></li> <li><code class="notranslate">npm pack</code></li> <li>The resulting artifact includes the <code class="notranslate">bundledDependency</code> under <code class="notranslate">node_modules</code>, but does not create a <code class="notranslate">.bin</code> directory at all, and so the depdency's executable(s) will not be available.</li> </ol> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>WIn10 20H2</li> <li>Node: 14.15.4</li> <li>npm: 6.14.10</li> </ul> <h3 dir="auto">Notes</h3> <p dir="auto">I see from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="681265889" data-permission-text="Title is private" data-url="https://github.com/npm/cli/issues/1689" data-hovercard-type="issue" data-hovercard-url="/npm/cli/issues/1689/hovercard" href="https://github.com/npm/cli/issues/1689">#1689</a> that <code class="notranslate">bundledDependencies</code> does not currently do special handling of the dep's <code class="notranslate">package.json</code>, such as looking at the <code class="notranslate">files</code> field. It's probably impractical / undesirable to process the whole <code class="notranslate">bin</code> field from <code class="notranslate">package.json</code> during <code class="notranslate">pack</code>, but at least it would make sense to check the existing <code class="notranslate">node_modules/.bin</code> for scripts that exactly match the package name and include those in the output.</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">ec2_group</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0 config file = configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0 config file = configured module search path = Default w/o overrides </code></pre></div> <p dir="auto">install: sudo pip install -U git+<a href="https://github.com/ansible/[email protected]">https://github.com/ansible/[email protected]</a> --upgrade --ignore-installed six</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">default ansible.cfg</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">OS X El Capitan 10.11.6<br> Multi VPC AWS environment. Peers between VPC's w/appropriate routing between them</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">ec2_group does not allow group_name to use groups via group name from other peered VPC's. This worked in v1.9.6 and v2.0.2. It appears to be due to some additional conditions that were added on 7/27/16. If I revert this change, it works as expected.</p> <p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/04199140c5f089db8215aee4842d5987cf12e28d/hovercard" href="https://github.com/ansible/ansible/commit/04199140c5f089db8215aee4842d5987cf12e28d"><tt>0419914</tt></a></p> <p dir="auto">Using group_id with the name of the security group in a different VPC works but is not idempotent. It will create the rule if it's new but will fail if it already exists.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Attempt to use a AWS security group name from another VPC with required peering present using group_name:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Provision Security Groups ec2_group: name: MyGroup description: MyDesc region: us-east-1 vpc_id: vpc-xxxxxxxx rules: - proto: tcp from_port: 22 to_port: 22 group_name: &lt;Other_VPC_SG_NAME&gt;"><pre class="notranslate"><code class="notranslate">- name: Provision Security Groups ec2_group: name: MyGroup description: MyDesc region: us-east-1 vpc_id: vpc-xxxxxxxx rules: - proto: tcp from_port: 22 to_port: 22 group_name: &lt;Other_VPC_SG_NAME&gt; </code></pre></div> <p dir="auto">Attempt to use a AWS security group name from another VPC with required peering present using group_id:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Provision Security Groups ec2_group: name: MyGroup description: MyDesc region: us-east-1 vpc_id: vpc-xxxxxxxx rules: - proto: tcp from_port: 22 to_port: 22 group_id: &lt;Other_VPC_SG_NAME&gt;"><pre class="notranslate"><code class="notranslate">- name: Provision Security Groups ec2_group: name: MyGroup description: MyDesc region: us-east-1 vpc_id: vpc-xxxxxxxx rules: - proto: tcp from_port: 22 to_port: 22 group_id: &lt;Other_VPC_SG_NAME&gt; </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Translate group name to group ID (sg-xxxxxxxx) and update rule with the security group ID of the other VPC's security group.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">The group in the peered VPC is not found and an attempt to create a new group in the current VPC is executed. In my case, this fails due to "no description"</p> <p dir="auto">Message using group_name with security group name from a different VPC</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;msg&quot;: &quot;group &lt;PeeredVPCGroupName&gt; will be automatically created by rule {'to_port': 22, 'from_port': 22, 'group_name': '&lt;PeeredVPCGroupName&gt;', 'proto': 'tcp'} and no description was provided&quot;"><pre class="notranslate"><code class="notranslate">"msg": "group &lt;PeeredVPCGroupName&gt; will be automatically created by rule {'to_port': 22, 'from_port': 22, 'group_name': '&lt;PeeredVPCGroupName&gt;', 'proto': 'tcp'} and no description was provided" </code></pre></div> <p dir="auto">Message using group_id with security group name from a different VPC if the rule exists. If the rule does not exist, it is added as expected.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/var/folders/t8/vdrxm90s1ps41pghp7wxn8n80000gp/T/ansible_pJu0pZ/ansible_module_ec2_group.py\&quot;, line 479, in &lt;module&gt;\n main()\n File \&quot;/var/folders/t8/vdrxm90s1ps41pghp7wxn8n80000gp/T/ansible_pJu0pZ/ansible_module_ec2_group.py\&quot;, line 374, in main\n group.authorize(rule['proto'], rule['from_port'], rule['to_port'], thisip, grantGroup)\n File \&quot;/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/securitygroup.py\&quot;, line 203, in authorize\n dry_run=dry_run)\n File \&quot;/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/connection.py\&quot;, line 3191, in authorize_security_group\n params, verb='POST')\n File \&quot;/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py\&quot;, line 1227, in get_status\n raise self.ResponseError(response.status, response.reason, body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request\n&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule \&quot;peer: sg-xxxxxxxx, TCP, from port: 22, to port: 22, ALLOW\&quot; already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;b9ec5eee-4a86-49d7-90b8-86bfbf2ba21b&lt;/RequestID&gt;&lt;/Response&gt;\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;"><pre class="notranslate"><code class="notranslate"> "module_stderr": "Traceback (most recent call last):\n File \"/var/folders/t8/vdrxm90s1ps41pghp7wxn8n80000gp/T/ansible_pJu0pZ/ansible_module_ec2_group.py\", line 479, in &lt;module&gt;\n main()\n File \"/var/folders/t8/vdrxm90s1ps41pghp7wxn8n80000gp/T/ansible_pJu0pZ/ansible_module_ec2_group.py\", line 374, in main\n group.authorize(rule['proto'], rule['from_port'], rule['to_port'], thisip, grantGroup)\n File \"/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/securitygroup.py\", line 203, in authorize\n dry_run=dry_run)\n File \"/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ec2/connection.py\", line 3191, in authorize_security_group\n params, verb='POST')\n File \"/Library/Python/2.7/site-packages/boto-2.38.0-py2.7.egg/boto/connection.py\", line 1227, in get_status\n raise self.ResponseError(response.status, response.reason, body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule \"peer: sg-xxxxxxxx, TCP, from port: 22, to port: 22, ALLOW\" already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;b9ec5eee-4a86-49d7-90b8-86bfbf2ba21b&lt;/RequestID&gt;&lt;/Response&gt;\n", "module_stdout": "", "msg": "MODULE FAILURE" </code></pre></div>
<p dir="auto">Based on <a href="https://groups.google.com/d/topic/ansible-project/UGb8i7wU8Jk/discussion" rel="nofollow">https://groups.google.com/d/topic/ansible-project/UGb8i7wU8Jk/discussion</a>.<br> This feature will be awesome to have for continuous application deployments where build/deploy scripts (Ant, Maven) are the main players and produce a lot of information to trace in realtime (during Jenkins build for example).</p>
0
<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>
<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> <p dir="auto">kubeadm master join</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p> <p dir="auto">FEATURE REQUEST</p> <p dir="auto">A convenient command such as <code class="notranslate">kubeadm config</code> or <code class="notranslate">kubeadm show</code> to return the command for a node to join the cluster i.e. <code class="notranslate">kubeadm join --token &lt;token&gt; &lt;master-ip&gt;</code>.</p> <p dir="auto">(I am happy to work on this myself and contribute)</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I am reading the docs of the website. In this page : https://dubbo.incubator.apache.org/zh-cn/docs/user/preface/requirements.html There is a typo. &gt; “ 此时需要一个服务注册中心,动态的注册和发现服务,使服务的位置透明。” it should be(“的” ——&gt; &quot;地&quot;): &gt; “ 此时需要一个服务注册中心,动态地注册和发现服务,使服务的位置透明。” "><pre class="notranslate"><code class="notranslate">I am reading the docs of the website. In this page : https://dubbo.incubator.apache.org/zh-cn/docs/user/preface/requirements.html There is a typo. &gt; “ 此时需要一个服务注册中心,动态的注册和发现服务,使服务的位置透明。” it should be(“的” ——&gt; "地"): &gt; “ 此时需要一个服务注册中心,动态地注册和发现服务,使服务的位置透明。” </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.2</li> <li>Operating System version: win7</li> <li>Java version: Java1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">ExtensionLoader类中loadClass(Map&lt;String, Class&gt; extensionClasses, java.net.URL resourceURL, Class clazz, String name)方法</p> <p dir="auto">....<br> String[] names = NAME_SEPARATOR.split(name);<br> if (ArrayUtils.isNotEmpty(names)) {<br> cacheActivateClass(clazz, names[0]);<br> for (String n : names) {<br> cacheName(clazz, n);<br> saveInExtensionClass(extensionClasses, clazz, name);<br> }<br> }<br> ....</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">最后一行代码saveInExtensionClass(extensionClasses, clazz, name);中的name应该改成n?<br> 由于dubbo中的name都是一个(没有逗号分隔),所以不会发生问题<br> 例如:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12593175/60316014-844b0380-999b-11e9-95c3-7e51ff19fe3d.png"><img src="https://user-images.githubusercontent.com/12593175/60316014-844b0380-999b-11e9-95c3-7e51ff19fe3d.png" alt="image" style="max-width: 100%;"></a></p>
0