text:
[Multi-Database Support] Make table name case sensitivity

What's the purpose of this PR
I think if we want to support more databases, we should be more rigorous and pay closer attention to case sensitivity in more places.
Brief changelog
Quoted table name.
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Read the Contributing Guide before making this pull request.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit tests to verify the code.
[x] Run mvn clean test to make sure this pull request doesn't break anything.

I met an error when adding grayscale rule

2023-03-02 21:44:31.258  WARN 2600 --- [nio-8090-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1064, SQLState: 42000
2023-03-02 21:44:31.258 ERROR 2600 --- [nio-8090-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GrayReleaseRule" set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))' at line 1
2023-03-02 21:44:31.258  INFO 2600 --- [nio-8090-exec-9] o.h.e.j.b.internal.AbstractBatchImpl     : HHH000010: On release of batch it still contained JDBC statements
2023-03-02 21:44:31.260 ERROR 2600 --- [nio-8090-exec-9] .c.f.a.c.c.GlobalDefaultExceptionHandler : could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement

org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233)
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:566)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
	at com.ctrip.framework.apollo.adminservice.controller.NamespaceBranchController$$EnhancerBySpringCGLIB$$e2a0585c.updateBranchGrayRules(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:699)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at com.ctrip.framework.apollo.adminservice.filter.AdminServiceAuthenticationFilter.doFilter(AdminServiceAuthenticationFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:166)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200)
	at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
	at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3698)
	at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3987)
	at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:123)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
	at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
	at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489)
	at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3303)
	at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2438)
	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:562)
	... 108 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GrayReleaseRule" set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))' at line 1
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
	... 129 common frames omitted

And other error like
2023-03-02 21:45:10.208  WARN 2600 --- [nio-8090-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1064, SQLState: 42000
2023-03-02 21:45:10.208 ERROR 2600 --- [nio-8090-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper   : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"InstanceConfig" a inner join "Instance" b on b.Id = a.`InstanceId` where a.`Con' at line 1
2023-03-02 21:45:10.213 ERROR 2600 --- [nio-8090-exec-4] .c.f.a.c.c.GlobalDefaultExceptionHandler : could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet

org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:259)
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:233)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551)
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:145)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at jdk.proxy2/jdk.proxy2.$Proxy184.findInstanceIdsByNamespaceAndInstanceAppId(Unknown Source)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
	at com.ctrip.framework.apollo.common.aop.RepositoryAspect.invokeWithCatTransaction(RepositoryAspect.java:43)
	at jdk.internal.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at jdk.proxy2/jdk.proxy2.$Proxy184.findInstanceIdsByNamespaceAndInstanceAppId(Unknown Source)
	at com.ctrip.framework.apollo.biz.service.InstanceService.findInstancesByNamespaceAndInstanceAppId(InstanceService.java:107)
	at com.ctrip.framework.apollo.biz.service.InstanceService$$FastClassBySpringCGLIB$$3e6aaf30.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
	at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
	at com.ctrip.framework.apollo.biz.service.InstanceService$$EnhancerBySpringCGLIB$$72aa7093.findInstancesByNamespaceAndInstanceAppId(<generated>)
	at com.ctrip.framework.apollo.adminservice.controller.InstanceConfigController.getInstancesByNamespace(InstanceConfigController.java:189)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:670)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at com.ctrip.framework.apollo.adminservice.filter.AdminServiceAuthenticationFilter.doFilter(AdminServiceAuthenticationFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:166)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:67)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:2322)
	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2075)
	at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2037)
	at org.hibernate.loader.Loader.doQuery(Loader.java:956)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357)
	at org.hibernate.loader.Loader.doList(Loader.java:2868)
	at org.hibernate.loader.Loader.doList(Loader.java:2850)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682)
	at org.hibernate.loader.Loader.list(Loader.java:2677)
	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:338)
	at org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:2186)
	at org.hibernate.internal.AbstractSharedSessionContract.list(AbstractSharedSessionContract.java:1204)
	at org.hibernate.query.internal.NativeQueryImpl.doList(NativeQueryImpl.java:177)
	at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617)
	at org.hibernate.query.Query.getResultList(Query.java:165)
	at org.springframework.data.jpa.repository.query.JpaQueryExecution$PagedExecution.doExecute(JpaQueryExecution.java:179)
	at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:90)
	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:156)
	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:144)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:160)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
	... 134 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"InstanceConfig" a inner join "Instance" b on b.Id = a.`InstanceId` where a.`Con' at line 1
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
	... 163 common frames omitted

authors: Shoothzj nobodyiam

repo: apolloconfig/apollo


text:
Prevent incorrect caching of partial responses with errors.

Fixes https://github.com/apollographql/apollo-android/issues/2280 by preventing the response from being cached with errors are present in the response
Added unit tests for prevention of caching response behavior
Updated files so that ./gradlew check passes lint checks

@podarsmarty: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

I would recommend to add new cache header to ApolloCacheHeaders that will signal to no store partial response data.
By default we keep existing behaviour to avoid breaking changes.
Does this make sense?

@sav007 hmm im not sure why you would want to keep the existing behavior. we are incorrectly caching bad responses. if we were to cache the actual errors along with the data it would make more sense but then even then im not sure you want to cache errors.

Yeah, my bad you are right. We shouldn't cache partial response data at first place.

Could you please revert changes that not related to this PR

Not caching data that contains errors looks good to me, thanks 👍!
Regarding the style changes, we disabled the checkstyle task in CI 🙈: https://github.com/apollographql/apollo-android/blob/6504f05a16a9c090fa1b98eacf68e09d64752203/scripts/ci.sh#L8
./gradlew clean build -x checkstyleTest --stacktrace --max-workers=2

We might want to fine tune this.
@podarsmarty can you open a separate PR for this discussion?

@sav007 @martinbonnin ahh yea all the unrelated changes were just things to make the lint checks pass. if it has been updated in CI should be safe. i will revert all of those changes

I also agree that this behavior change is fine since it is considered as bugs. But it might accidentally affect people depending on this. We should make it clear on the changelog.

I'm actually ok with unrelated changes since this has been an issue with other contributors that running checkstyle would fail locally on these files. It is good to fix these small warnings.

@sav007 @martinbonnin updated with the short circuit to emptySet and based on @tasomaniac's comment left in the lint fixes

source: gharchive/pull-request

authors: apollo-cla martinbonnin podarsmarty sav007 tasomaniac

repo: apollographql/apollo-android

license: MIT

license_type: permissive

license_source: github-api


text:
Support for Apollo-Client 2

Hey!
what's the plans on supporting the new apollo client?
at the moment the only breaking change i've found was that apollo client changed to use default import instead of named import, but i cannot really confirm this is the only issue

Considering that one of the main features for the new 2.0 client is the decoupling of the store apis and being ngrx the main store platform for angular... Can we expect some built in integration inside this project?

@kamilkisiela @Urigo @jbaxleyiii @stubailo ?

I'll take a look at it soon,I'm just not yet familiar with all those new things, whole ecosystem of packages. Give me couple of days to come up with something. Maybe would it be a great chance to change the point of view on the current implementation. Will see.

Well since its observable based now there are alot of code that can be refactored and removed from here but i think first step is to compile it vs alpha (or beta already) version and have a working release (only requires compile and publish vs latest client)

I'm not sure but I think with the introduction of Apollo Link, this library can use angular's native http module (HttpClient).

I'm looking forward to trying apollo-client@beta with Angular, +1

Any updates on this? Looking forward to implement the 2.0 apollo client :)

it's already working (Angular-Client@beta + latest apolo-angular)
however, i think this library needs a huge refactor to really support it properly and not just "work".

@DxCx Yes and that's what I'm going to do in two weeks.

@kamilkisiela Do you mind writing a short plan on what is going to change, maybe the community can contribute ideas before implementing anything

Does anyone have a working example if Apollo Client 2.0 in Angular 4 yet? Preferably with ngrx...

@DxCx How did you get angular client @beta + latest apollo angular to work? I'm getting type errors...
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-client-rxjs/RxApolloClient.d.ts (2,45): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-client-rxjs/rxify.d.ts (5,51): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-angular/build/src/types.d.ts (3,21): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-angular/build/src/types.d.ts (5,43): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (2,100): Module '"/Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-client/index"' has no exported member 'ApolloExecutionResult'.
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (11,25): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/MyProject/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (16,18): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).

package.json:
    "apollo-angular": "^0.13.1",
    "apollo-cache-inmemory": "^0.2.0-beta.0",
    "apollo-client": "^2.0.0-beta.0",
    "apollo-link": "^0.6.1-beta.0",

client.ts:

import ApolloClient from 'apollo-client';
import { default as InMemoryCache, NormalizedCache } from 'apollo-cache-inmemory'
let client: ApolloClient<NormalizedCache>;

export function provideClient(): ApolloClient<NormalizedCache> {
  if ( !client ) {
    client = new ApolloClient<NormalizedCache>({
      link: // >>>>> (provide a link),
      cache: new InMemoryCache().restore(window['__APOLLO_STATE__'] || {}),
    });
  }

  return client;
}

app.module.ts:
import { provideClient } from './client';
import { ApolloModule } from 'apollo-angular';

@NgModule({
  imports: [
    ApolloModule.withClient(provideClient),
    ....
  ],
  ....
})
export class AppModule {}

@DxCx Still no go for me 😪
ERROR in /Users/[user]/Projects/Proj/Dev/proj/src/app/core/apollo/apollo.module.ts (32,31): Argument of type '{ link: ApolloLink; cache: InMemoryCache; }' is not assignable to parameter of type '{ link: ApolloLink; cache: ApolloCache<NormalizedCache>; ssrMode?: boolean; ssrForceFetchDelay?: ...'.
  Types of property 'link' are incompatible.
    Type 'ApolloLink' is not assignable to type 'ApolloLink'. Two different types with this name exist, but they are unrelated.
      Types of property 'split' are incompatible.
        Type '(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | Reques...' is not assignable to type '(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | Reques...'. Two different types with this name exist, but they are unrelated.
          Types of parameters 'left' and 'left' are incompatible.
            Type 'ApolloLink | RequestHandler' is not assignable to type 'ApolloLink | RequestHandler'. Two different types with this name exist, but they are unrelated.
              Type 'ApolloLink' is not assignable to type 'ApolloLink | RequestHandler'.
                Type 'ApolloLink' is not assignable to type 'RequestHandler'.
                  Type 'ApolloLink' provides no match for the signature '(operation: Operation, forward?: NextLink): Observable<any>'.
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-client-rxjs/RxApolloClient.d.ts (2,45): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-client-rxjs/rxify.d.ts (5,51): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-angular/build/src/types.d.ts (3,21): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-angular/build/src/types.d.ts (5,43): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (2,100): Module '"/Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-client/index"' has no exported member 'ApolloExecutionResult'.
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (11,25): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).
ERROR in /Users/[user]/Projects/Proj/Dev/proj/node_modules/apollo-angular/build/src/Apollo.d.ts (16,18): Generic type 'ApolloClient<TCacheShape>' requires 1 type argument(s).

hmm, i would first try downgrading packages to the one worked for me, i haven't tried with latest yet.
if not looks like some later change broke it again, @kamilkisiela how is it going with offical support?

@DxCx Fantastic news! Expect it to be done in next few days! :) :tada:
Supper pumped about the possibilities the next version will bring!!! :bomb:
Stay tuned!

@kamilkisiela Don't hype me up too much. I'm expecting this to be done by Sat then!
I look forward to the good new =)

Ok, we have it!
#377 - it's a preview of v1.0, looking forward to hear your thoughts about it

Thanks for mentioning me and informing me of this awesome project lol 😆

Hi, I'm using Apollo angular with ngrx and using ngrx effects for graphql queries. is this the right approach?

@akshath4u probably not the right place to ask this question. I put my apollo angular code in services, and call the services in the effects.

source: gharchive/issue

authors: DxCx abdulhaq-e akshath4u beta changalberto esistgut kamilkisiela mrbfrank patricknazar patriknil90

repo: apollographql/apollo-angular


text:
Support Ktor 2.x

Summary
When trying to build a Kotlin Multiplatform project with JS target, I got:
Module "com.apollographql.apollo3:apollo-runtime" has a reference to symbol io.ktor.client.features/HttpTimeout.Feature|null[0]. Neither the module itself nor its dependencies contain such declaration.
If a project uses Ktor 2.0.2 it causes a conflict with the Apollo one that's 1.6.7
Version
3.3.0
Description
In a Kotlin Multiplatform project I got declared:
        val ktor_version = "2.0.2"
        val apollo_version = "3.3.0"

        val commonMain by getting {

            dependencies {
                ...
                implementation("io.ktor:ktor-client-core:$ktor_version")
                implementation("io.ktor:ktor-client-content-negotiation:$ktor_version")
                implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")

                implementation("com.apollographql.apollo3:apollo-api:$apollo_version")
                implementation("com.apollographql.apollo3:apollo-runtime:$apollo_version")
                ...
            }
        }

        val jsMain by getting {

            dependencies {
                ...
                implementation("io.ktor:ktor-client-js:$ktor_version")
                implementation("io.ktor:ktor-http-cio-js:2.0.2")
                ...
            }
        }

Trying to build the module results in Module "com.apollographql.apollo3:apollo-runtime" has a reference to symbol io.ktor.client.features/HttpTimeout.Feature|null[0]. Neither the module itself nor its dependencies contain such declaration.

Thanks a lot for sending this!
Do you know how much change is needed to upgrade to Ktor 2? IIRC we only used Ktor for JS clients so hopefully there isn't a too big impact?

@maribelmai We've updated the dependency, this will be in the next release, in the meantime if you want to try it, you can use the snapshots!

I used the snapshot! looks good 👍
Thanks so much for prioritizing and fixing this one!

authors: BoD maribelmai martinbonnin

repo: apollographql/apollo-kotlin


text:
Add support for custom Enum values in schema

Hello,
Per the discussion here https://github.com/graphql/graphql-js/issues/525, I was wondering if there were any plans to implement custom Enum values.

From scanning the issues list, it looks like there was already a discussion to add support for custom enum values here https://github.com/apollographql/core-docs/issues/178. That issue has since been closed. @helfer If you could provide some guidance on the implementation, I could take a stab and open a PR.

Any updates?

repo: apollographql/graphql-tools


text:
makeRemoteExecutableSchema example from docs doesn't compile

From the docs:
import { createApolloFetch } from 'apollo-fetch';

const fetcher = createApolloFetch({ uri: 'http://api.githunt.com/graphql'});
const schema = makeRemoteExecutableSchema({
  schema: await introspectSchema(fetcher),
  fetcher,
});

Causes the TypeScript error:
Argument of type '{ schema: any; fetcher: ApolloFetch; }' is not assignable to parameter of type '{ schema: string | GraphQLSchema; link?: ApolloLink | undefined; fetcher?: Fetcher | undefined; }'.
  Types of property 'fetcher' are incompatible.
    Type 'ApolloFetch' is not assignable to type 'Fetcher | undefined'.
      Type 'ApolloFetch' is not assignable to type 'Fetcher'.
        Types of parameters 'operation' and 'operation' are incompatible.
          Type 'FetcherOperation' is not assignable to type 'GraphQLRequest'.
            Types of property 'query' are incompatible.
              Type 'DocumentNode' is not assignable to type 'string | undefined'.
                Type 'DocumentNode' is not assignable to type 'string'.

Using:
typescript@2.8.1
apollo-fetch@0.7.0
graphql-tools@2.23.1
graphql@0.11.7
@types/graphql@0.11.7

Same here.

same here

Same here.

This should be fixed in the latest version of graphql-tools. Thanks!

authors: AdelBachene Rioos ThomWright Type1J hwillson


text:
Fixed interfaces & unions when RenameTypes' renamer() returned undefined

According to your docs types should be left unchanged if renamer() returns undefined. However right now interfaces and unions won't be correctly resolved, because type information is missing during the transformResult() step. This PR fixes that.

Fixed by #1333

authors: ftatzky kamilkisiela


text:
MSVC Support

Вы бы написали что MSVC не поддерживается. А то я уж было обрадовался, что в кой веки шаблонная магия действительно приносит ощутимую пользу, но у меня это все не заработало.
И судя по всему вы написали код для MSVC, но ни разу не протестировали его, иначе не было бы #error и #warning, которые я вообще впервые вижу.
flat_tuple_size по сути закостылирован. Фиг его знает чё там, я в тонкостях метапрограммирования не разбираюсь, просто данный вариант лучше чем "Библиотека которая вообще не компилируется".
Структура сериализуется, проверил.
P.S. Данная штука - must-have для каждой сетевой или сериализующей либы, это уж точно. За проделанную работу (и статью на хабре) спасибо, но впредь не забываете про тестирование.

Coverage remained the same at 96.088% when pulling 3d8aa79603edc419eb42b87eb0862fc2849bf3af on Giperionn:develop into 250d5011f4ffdbed4ca57a61291fd708fe155aaf on apolukhin:develop.

MSVC поодерживается, покрыт авто тестами и CI, и можно убедиться что всё работает вот тут.  Нужна одна из последних версий.
Использовать _MSVC_LANG  хорошая идея,  с радостью приму pull request который только добавляет его проверку.
Патчи на поддержку более старых версий msvc так же приму с удовольствием.

MSVC поодерживается, покрыт авто тестами и CI, и можно убедиться что всё работает вот тут.
Эмм...
По вашей ссылке видно, как сборка свалилась. Все начинается на 1659 строчке. Appveyor как всегда тупит (Build Success, лол), впрочем ничего нового.
Я использовал студию 15.3.0 когда первоначально попытался собрать вашу библиотеку.
Сейчас я использую 15.5.1 (самая новая) с WinSDK: 10.0.15063 (не MinGW, полноценный SDK). Если откатить мой коммит для tuple_size.hpp то я все еще получаю ошибки:
1>f:\[eureka]\c++refl\include\boost\pfr\flat\tuple_size.hpp(36): error C2059: синтаксическая ошибка: size_v 1>f:\[eureka]\c++refl\include\boost\pfr\flat\tuple_size.hpp(36): error C2993: unknown-type: недопустимый тип для параметра шаблона "Index", не являющегося типом
Не могу поверить что мне приходится кого то еще уговаривать принять коммит с исправлениями >_\

Тест на строчке 1659 и должен проваливаться, тест благополучно проваливается и пишет об этом: (failed-as-expected)
Приведите пожалуйста минимальный пример, на  котором библиотека неверно отрабатывает на MSVC.

authors: Giperionn apolukhin coveralls


text:
How can i do the thing like PRO Version?

Hello, i wanna make sub page like pro (Image below)

How can i do it?

Hello, @Ryan0204 ! The accordion with sub paths is a PRO feature. If you want the feature, feel free to upgrade to the PRO version! Regards, Vlad.

repo: app-generator/react-horizon-ui-chakra


text:
spotify8.7.86歌手页无法加载

歌手页显示无法连接网络，搜索歌曲也是

脚本没有对歌手页面进行拦截修改。查看你的规则配置是否有影响。

搜索歌曲也没有进行拦截


text:
AMP Storage API/CLI commands

Closes #564
Added kv commands -put, get, del {rm}, ls
$ amp kv -h

Usage:	amp kv COMMAND

Storage operations

Options:
      --config string   Config file (default is $HOME/.amp.yaml)
  -h, --help            Print usage
      --server string   Server address
  -v, --verbose         Verbose output

Commands:
  del         Delete a storage object (alias: rm)
  get         Retrieve a storage object
  ls          List all storage objects
  put         Assign specified value with specified key

Run 'amp kv COMMAND --help' for more information on a command.

To test -
./shrink.sh local
amp pf start --local
amp kv put foo bar
amp kv get foo
amp kv put foo bar1
amp kv ls
amp kv del foo
amp pf stop --local

I found some issues while implementing the CompareAndSet function. The transaction to compare and set the updated value to the key-value pair was failing. For now, the above listed commands work for storage related operations.

What is the meaning of "storage" feature in amp context? until now ETCD was used as volatile data storager meaning that when we stop amp data doesn't persist. We forced etcd named volume remove at each start/stop.
Could you reference an issue explaining the need?

@neha-viswanathan I didn't see an issue for this PR, so I created one: https://github.com/appcelerator/amp/issues/564.
A few notes for you on the PR so far:

Rename storage to kv (kv is shorter)
create|update -> put
For key not found, ex: amp kv get foo, don't output an error like:  Error during: amp get, reason: rpc error: code = 2 desc = Storage key foo does not exist`
Instead, just display: "Key not found: foo"

To Do:
amp kv put foo bar to be fixed
CLI Tests for kv command is also included.

@neha-viswanathan The PR is looking good so far. Please try to complete by the end of the day today so it can part of this sprint's release. Thanks!

⚠  Please DO NOT Merge. I'll be making more changes.

@neha-viswanathan You can close the PR and reopen it later.

I tested the following:
$ amp kv put /amp/foo bar
bar
amp (storage-api-cli)$ amp kv get /amp/foo
bar
amp (storage-api-cli)$ amp kv ls /amp
too many arguments - check again!

There will be a few enhancements we'll be able to add, but we can do those with future tickets. This was a nice first PR, @neha-viswanathan 👍

authors: freignat91 neha-viswanathan subfuzion

repo: appcelerator/amp


text:
Add wall-clock and user time; Choose highest dist vertex with lowest id

ex6 initial (add wall-clock and user time to ex5)
ex5 update (choose highest dist vertex with lowest id)

ex5.java contains ex5-ex7

repo: appfs/appfs

license: mit

license_source: bigquery


text:
fixed appirio-tech/topcoder-app/issues/1175 changed winner lists in l…

fixed appirio-tech/topcoder-app/issues/1175 changed winner lists in links

@shubhendusaurabh this is a hard link to prod, this should use props to get the current environment

authors: shubhendusaurabh tladendo

repo: appirio-tech/react-components


text:
Run flutter App On Browserstack Remotely

I have been able to run my flutter app locally but trying to look for a way to run it remotly on browserstack, most articles are for running apps that are not flutter
var capabilities = {
'bstack:options' : {
"osVersion" : "10.0",
"deviceName" : "Samsung Galaxy S20",
"projectName" : "AppName",
"buildName" : "V1",
"sessionName" : "b",
"local" : "false",
"userName" : "USERNAME",
"accessKey" : "ACCESS_KEY",
},
"browserName" : "chrome",
}
Got this Capabilities from browserstack and this was the error i was getting
2023-01-27T07:26:08.409Z INFO devtools:puppeteer: Initiate new session using the DevTools protocol
2023-01-27T07:26:08.412Z INFO devtools: Launch Google Chrome (undefined) with flags: --enable-automation --disable-popup-blocking --disable-extensions --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --no-default-browser-check --disable-hang-monitor --disable-prompt-on-repost --disable-client-side-phishing-detection --password-store=basic --use-mock-keychain --disable-component-extensions-with-background-pages --disable-breakpad --disable-dev-shm-usage --disable-ipc-flooding-protection --disable-renderer-backgrounding --force-fieldtrials=BackgroundTracing/default/ --enable-features=NetworkService,NetworkServiceInProcess --disable-features=site-per-process,TranslateUI,BlinkGenPropertyTrees --window-position=0,0 --window-size=1200,900
2023-01-27T07:26:08.953Z INFO devtools: Connect Puppeteer with browser on port 65076
Hello
2023-01-27T07:26:09.110Z INFO devtools: COMMAND executeScript("flutter:checkHealth", )
node:internal/process/promises:289
triggerUncaughtException(err, true / fromPromise */);
^
Evaluation failed: ReferenceError: checkHealth is not defined
at eval (eval at  (:3:20), :1:9)
at pptr://puppeteer_evaluation_script:3:20
Error: Evaluation failed: ReferenceError: checkHealth is not defined
at eval (eval at  (:3:20), :1:9)
at pptr://puppeteer_evaluation_script:3:20
at ExecutionContext._ExecutionContext_evaluate (file:///C:/Users/iamso/Desktop/bbbf/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:225:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ElementHandle.$eval (file:///C:/Users/iamso/Desktop/bbbf/node_modules/puppeteer-core/lib/esm/puppeteer/common/ElementHandle.js:138:24)
at async DevToolsDriver.executeScript (file:///C:/Users/iamso/Desktop/bbbf/node_modules/devtools/build/commands/executeScript.js:34:20)
at async Browser.wrappedCommand (file:///C:/Users/iamso/Desktop/bbbf/node_modules/devtools/build/devtoolsdriver.js:127:26)
at async Browser.wrapCommandFn (file:///C:/Users/iamso/Desktop/bbbf/node_modules/@wdio/utils/build/shim.js:72:29)
at async Browser.wrapCommandFn (file:///C:/Users/iamso/Desktop/bbbf/node_modules/@wdio/utils/build/shim.js:72:29)
at async main (C:\Users\iamso\Desktop\bbbf\test.js:47:24)
Node.js v19.4.0

Please ask their customer support. This driver's availability depends on cloud vendors.

authors: KazuCocoa iamsobowale

repo: appium-userland/appium-flutter-driver


text:
feat: Categorize AppMaps

AppMaps are organized according to the way they are recorded:

"Requests" are sorted by timestamp, other groups are sorted alphabetically. Maybe they should all be sorted by timestamp? But it makes AppMaps of test cases hard to find. I guess it should be configurable.
Full functionality is dependent on the agent conforming to AppMap 1.9.0 - https://github.com/applandinc/appmap/pull/32

:tada: This PR is included in version 0.42.0 :tada:
The release is available on:

v0.42.0
GitHub release

Your semantic-release bot :package::rocket:

authors: appland-release kgilpin

repo: applandinc/vscode-appland


text:
Add new identity to the database without needing to restart the server

Hello! I am reaching out to request a feature enhancement for this example: the ability to add new identities to the database without needing to restart the server. This update should not necessitate the use of refreshPIRParameters on the client side.
Implementing this feature would greatly benefit the community by providing a clearer understanding of how the service can effectively operate in a production environment.

#47 added support for reloading the dataset.
See Reusing PIR Parameters on how to preprocess the dataset in a way that the client configuration does not need to be changed, i.e refreshPIRParameters does not need to be called on the client side.

authors: glebfann karulont

repo: apple/live-caller-id-lookup-example


text:
Web demo link is broken

The web demo link(https://github.com/apple/ml-mdm?tab=readme-ov-file#web-demo) is broken in the readme file.
I've created a PR to fix it: https://github.com/apple/ml-mdm/pull/1

Thank you again, closing the issue as it has been addressed!

authors: jlukecarlson rupeshs

repo: apple/ml-mdm


text:
"Provided shape is not compatible with the model's feature description" for custom model after conversion, Swift API

Hello,
I tried to use the following command to convert a stable diffusion model rinna/japanese-stable-diffusion to Apple Core ML package:
python -m python_coreml_stable_diffusion.torch2coreml --convert-unet --convert-text-encoder --convert-vae-decoder --convert-safety-checker -o /Users/<username>/Downloads/japanese-stable-diffusion-converted --model-version rinna/japanese-stable-diffusion --bundle-resources-for-swift-cli

The command successfully generates a folder of ml packages and a resources folder.
I then proceed to use the Swift API for the processing resources（tried .all and CPU and NE) on MacOS. But the image generation failed with the following error:
TestingApp[3087:59450] [espresso] [Espresso::handle_ex_plan] exception=ANECF error: failed to load ANE model. Error=createProgramInstanceForModel:modelToken:qos:isPreCompiled:enablePowerSaving:statsMask:memoryPoolID:enableLateLatch:modelIdentityStr:error:: Program load failure (0x20004)

TestingApp[3087:59450] [coreml] Error plan build: -1.

TestingApp[3087:59450] [client] doUnloadModel:options:qos:error:: nil _ANEModel

TestingApp[3087:59450] [espresso] ANECF error:

TestingApp[3087:59158] [coreml] Error Domain=com.apple.CoreML Code=1 "For input feature 'images', the provided shape 1 × 512 × 512 × 3 is not compatible with the model's feature description." UserInfo={NSLocalizedDescription=For input feature 'images', the provided shape 1 × 512 × 512 × 3 is not compatible with the model's feature description., NSUnderlyingError=0x600002c20f60 {Error Domain=com.apple.CoreML Code=0 "MultiArray shape (1 x 512 x 512 x 3) does not match the shape (1 x 256 x 256 x 3) specified in the model description" UserInfo={NSLocalizedDescription=MultiArray shape (1 x 512 x 512 x 3) does not match the shape (1 x 256 x 256 x 3) specified in the model description}}}

I added debug logs in Python to print the size parameters (pipe unet), but found it to be the same as the Apple/StableDiffusion1-4
Replies are greatly appreciated!
Best,

@NekoNeko66 Line 78 at swift/StableDiffusionCLI/main.swift.
Change disableSafety: disableSafety, to disableSafety: true,

that's for the Swift tool. If you have to use Python, try to disable safety in the Python script.

@NekoNeko66 Line 78 at swift/StableDiffusionCLI/main.swift.
Change disableSafety: disableSafety, to disableSafety: true,

Thank you for your reply. I didn’t think it was the issue with the safety checker.
Upon further inspection, I saw the input parameter of the safety checker ml package was indeed 256, which was not matching the output 512.
I never checked that file because I thought it was related to unet
Closing this issue now

repo: apple/ml-stable-diffusion


text:
Add Sequence.uniqued(on:) which uses Key Paths

Description
This PR adds a new method to Sequence, uniqued(on:). The method uses a key path to determine the uniqueness of elements in the array.
Detailed Design
The change adds the following API:
public func uniqued<Subject: Hashable>(
    on keyPath: KeyPath<Element, Subject>
) -> [Element]

Documentation Plan
Documentation was added to the code and to the guide (Guides/Unique.md).
Test Plan
The method was tested using the same example used by
public func uniqued<Subject: Hashable>(
    on projection: (Element) throws -> Subject
) rethrows -> [Element]

let a = ["Albemarle", "Abeforth", "Astrology", "Brandywine", "Beatrice", "Axiom"]
let b = a.uniqued(on: { $0.first })
XCTAssertEqual(["Albemarle", "Brandywine"], b)

let c = a.uniqued(on: \.first)
XCTAssertEqual(["Albemarle", "Brandywine"], d)

Source Impact
Since it's a new method, there's no impact on existing users.
Checklist

[x] I've added at least one test that validates that my change is working, if appropriate
[x] I've followed the code style of the rest of the project
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary

let b = a.uniqued(on: { $0.first })

let c = a.uniqued(on: \.first)

Unless I'm mistaken, this should already work without any additional overloads; that was the purpose of SE-0249. If it doesn't work, then we should look into what it would take to make it work without requiring a manually created overload.

authors: otaviocc xwu

repo: apple/swift-algorithms


text:
Set isOptional flag for options of Optional type

Documentation for Option.init(... transform:) says: "If the property has an Optional type, or you provide a non-nil value for the initial parameter, specifying this option is not required."
Initializer works exactly this way but provides wrong synopsis for Optional type properties.
Checklist

[x] I've added at least one test that validates that my change is working, if appropriate
[x] I've followed the code style of the rest of the project
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary

Thanks for the catch and the fix, @aleksey-mashanov! 👏

@swift-ci Please test

repo: apple/swift-argument-parser


text:
[Modules] Change private modules rules and warnings

We used to advertise private modules to be declared as submodules
(Foo.Private). This has proven to not scale well since private headers
might carry several dependencies, introducing unwanted content into the
main module and often causing dep cycles.
Change the canonical way to name it to Foo_Private, forcing private
modules as top level ones, and provide warnings under -Wprivate-module
to suggest fixes for other private naming. Update documentation to
reflect that.
-Wprivate-module is now ignored by default (allowing time for transition
from Foo.Private without breaking all users) and is checked for before
emitting the diagnostics.
rdar://problem/31173501

@swift-ci please test

@jrose-apple updates with the requested additional tests

Ah, specifically we wanted @import A.Private to be able to find A_Private, right? I don't see a test for that.

@jrose-apple right, but this isn't implemented in this PR, this is "remove old warning behavior and enforce new policy" part of the work.
Remaping A.private to A_Private in case the former doesn't match anything should come next.

authors: bcardosolopes jrose-apple

repo: apple/swift-clang


text:
[SR-1608] NSStream, NSInputStream and NSOutputStream need implementations

Previous ID
SR-1608

Radar
None

Original Reporter
@phausler

Type
Bug

Status
In Progress

Resolution

Additional Detail from JIRA

Votes
0

Component/s
Foundation

Labels
Bug, StarterBug

Assignee
None

Priority
Medium

md5: 3488657a0f28ddf9753d7b1d2c73ef44

Issue Description:
These classes are missing most of their implementations and can be backed by CFStream. Ideally they should follow the same pattern as other bridged (is-a) types like NSData or NSString however they could probably be implemented with a has-a implementation with little effort.

These are implemented.

authors: parkera phausler

repo: apple/swift-corelibs-foundation


text:
[CF] Define DECLARE_STATIC_CLASS_REF macro.

If !DEPLOYMENT_RUNTIME_SWIFT, just defining STATIC_CLASS_REF is
insufficient, since CFBase refers to DECLARE_STATIC_CLASS_REF.

@swift-ci test and merge


text:
Test fixes for Darwin

lastPathComponent is a NSString method so bridge appropiately.

JSONEncoder.OutputFormatting.sortedKeys requires macOS 10.13, add an
#available around it.

@swift-ci please test and merge


text:
[5.7] Fix column layout in Relationships section when API Change is on

Rationale: Fixes a UI regression where column layout is broken in the Relationships section when API Change is turned on.
Risk: Low
Risk Detail: only CSS changes affecting the Relationship section when API Change is on.
Reward: High
Reward Details: Fixes a bad UI regression introduced by the content style changes.
Original PR: https://github.com/apple/swift-docc-render/pull/246
Issue: rdar://92325863
Code Reviewed By: @marinaaisa @dobromir-hristov
Testing Details: Navigate to a page that has API Changes turned on in the Relationships section; Verify that the content in Relationships section is displayed vertically in a column form, instead of horizontally.

@swift-ci test

repo: apple/swift-docc-render


text:
Rename _MatchingEngine to _RegexParser and fix CMake.

The _MatchingEngine module no longer contains the matching engine. It has the regex AST and parser. This patch renames it to _RegexParserSupport.
Also fix the CMake build which has been broken for a while.

@swift-ci please test

@swift-ci please test


text:
Add bounds check for CommandLine.arguments since it could be empty

ProcessInfo.arguments assumed CommandLine.arguments is always non-empty, and that turns out not to be the case 100%. Added bounds check to avoid crashing.

@swift-ci please test

repo: apple/swift-foundation


text:
Should Gauge gain add in addition to record?

Expected behavior
I'd like to use gauges to easily implement a metric of how many things I have alive in my system -- examples could be threads or connections.
// ==== ----------------------------------------------------------------------------------------------------------------
// goal: easily implement gauges which measure "amount of alive things"

class Heavy {

    init() {
        // this is hard to express when we only have "record":
        let gauge = Gauge(label: "heavy-1")
        gauge.add(1)
    }

    deinit {
        // this is hard to express when we only have "record":
        gauge.add(-1)
    }

    // or start() / stop(), same story

}

Actual behavior
Can't implement this like that since we do not offer add, we only offer record, so I have to implement my own thing which keep the total number and then use that to record into the actual metrics gauge:
Implementation idea 1, which fails since Gauge is not open:

// ==== ----------------------------------------------------------------------------------------------------------------
// wishful thinking workaround impl, though heavy...

///
/// error: cannot inherit from non-open class 'Gauge' outside of its defining module
/// internal class AddGauge: Gauge {
///                ^
@usableFromInline
internal class AddGauge: Gauge {

    @usableFromInline
    internal let _storage: Atomic<Int>
    internal let underlying: Gauge

    public convenience init(label: String, dimensions: [(String, String)] = []) {
        self.underlying = Gauge(label: label, dimensions: dimensions)
    }

    override func record<DataType: BinaryFloatingPoint>(_ value: DataType) {
        self.underlying.record(value)
    }

    @inlinable
    func add<DataType: BinaryFloatingPoint>(_ value: DataType) {
        let value = self._storage.add(value)
        self.underlying.record(value)
    }
}

So what I end up is something like:

// ==== ----------------------------------------------------------------------------------------------------------------
// current workaround

@usableFromInline
internal class AddGauge {

    @usableFromInline
    internal let _storage: Atomic<Int>
    @usableFromInline
    internal let underlying: Gauge

    public init(label: String, dimensions: [(String, String)] = []) {
        self._storage = .init(value: 0)
        self.underlying = Gauge(label: label, dimensions: dimensions)
    }

    @inlinable
    func record(_ value: Int) {
        self.underlying.record(value)
    }

    @inlinable
    func add<DataType: BinaryFloatingPoint>(_ value: DataType) {
        let v = Int(value)
        self.underlying.record(self._storage.add_load(v))
    }
}

Main question:

Should we add add() to Gauge as it enables this popular use case?

if yes, this needs a major bump, better now than later I guess though
if no, what's the pattern people should adopt for this use case?

alternatively making the types open would allow for implementing such things nicer...

that's likely a BAD idea though, so let's not

we could tell people to implement a special weird handler, and add an extension to Counter.add which has to pattern match on the handler if it supports an add operation or not... it seems a bit weird though and would come at a cost.

Other points:

OpenTelemetry seems to not have it in Go https://github.com/open-telemetry/opentelemetry-go/blob/master/api/metric/gauge.go
but does have it in Java https://github.com/open-telemetry/opentelemetry-java/blob/master/api/src/main/java/io/opentelemetry/metrics/GaugeLong.java#L75-L81
so that's a bit weird...  the main reference impl though is Java AFAIK.

@ktoso if you feel strongly about this, it would be good time since we are working on 1.200

Thanks for reminder! I’ll give it a look on Monday if my workaround is a good general approach or it built in api would be much better :)

Looking into it 💭

Spent some time with this expressing some metrics I wanted to capture with "add" and thanks to some great discussion with @yim-lee was able to figure out we can express everything we need by using a positive + negative counter pair;
This is actually quite good, as one can track all those events separately and also get their independent progress as well as post process them nicely (sum(positive, -negative) == current count) in aggregation systems like graphite, prometheus etc.
For curious people who'd bump into the same issue:
@usableFromInline
internal struct MetricsPNCounter {
    @usableFromInline
    let positive: Counter
    @usableFromInline
    let negative: Counter

    init(label: String, positive positiveDimensions: [(String, String)] = [], negative negativeDimensions: [(String, String)] = []) {
        self.positive = Counter(label: label, dimensions: positiveDimensions)
        self.negative = Counter(label: label, dimensions: negativeDimensions)
    }

    @inlinable
    func increment(by value: Int64 = 1) {
        self.positive.increment(by: value)
    }

    @inlinable
    func decrement(by value: Int64 = 1) {
        self.negative.increment(by: value)
    }
}

So in prometheus one could see those as
resource{label="bananas", event="start"} 16
resource{label="bananas", event="stop"} 10

meaning that right now we have 6 active bananas; this is to be calculated in post processing though.

authors: ktoso tomerd

repo: apple/swift-metrics


text:
Reinstate Async Channel API

Motivation:
We previously removed Async Channel SPI to allow a clean release without
adding dependency on NIO code which was subject to change, however that
code is now ready to be promoted to API.
Modifications:

Revert the commit which removed the Async Channel code
Remove AsyncChannel SPI guards from imports and code which uses it

Result:

Async API is exposed as public

https://github.com/apple/swift-nio-http2/pull/424


text:
re-investigate speeding up the ChannelPipeline with findings from SR-10683

@gottesmm did amazing work in https://bugs.swift.org/browse/SR-10683 and it seems like with the latest master snapshots we might have a way to substantially speed up the ChannelPipeline. There's a remaining risk that this only worked in the reduced example but we should definitely have a look if this translates to "real NIO".

@weissi which specific benchmark produces the 6x speedup from NIO to Netty?  Just a simple HTTP client request?

@realdoug it's this benchmark which we'll need to look at: https://github.com/apple/swift-nio/blob/master/Sources/NIOPerformanceTester/ChannelPipelineBenchmark.swift
However, before that we'll need to incorporate some pretty subtle changes to the ChannelPipeline.

authors: realdoug weissi

repo: apple/swift-nio


text:
Add API for whether BB operations may CoW.

Motivation:
From time to time a NIO application holds a ByteBuffer that it may want
to edit. Whether it wants to do that may potentially be contingent on
whether having to do so will cause an allocation, as it may be
preferable to prefer a different operation.
Modifications:

Added API for asking BB if it thinks it'll CoW.

Result:
People can ask the question.

Closing because @douggregor would feel better if we did something else.


text:
Add binder.tryFill to allow catching the errors up the chain

The custom body functions that binder accepts has to be non-throwing. This is not very handy if we want to do things like validating parameters, checking URLs well-formedness, etc.
This patch offers a backward-compatible way to catch errors in the throwing body functions: we introduce tryFill in addition to the default non-throwing fill.
Does it make sense to do it this way? Feedback welcome!

Changed as discussed.

test this please

@swift-ci test this please

@swift-ci please test

@swift-ci please smoke test

SwiftPM only requires smoke test because it doesn't affect anything else in the toolchain.

authors: aciidb0mb3r vlm xedin

repo: apple/swift-package-manager


text:
Package command plugins should have the same initial working directory as the invocation

Motivation
This allows relative paths passed as parameters to work.  For build tool plugins we pass in the package directory so that relative paths in configuration files work there as well.  This also matches the behavior of many build systems.  The proposal didn't specify the initial working directory and usually all paths are absolute, but having predictable initial working directories follows the principle of least surprise.
Changes

pass through the working directory as a parameter to the plugin invocation
for build tool invocations, make it the package directory
for command invocations, keep the original working directory

rdar://86831942

@swift-ci please smoke test


text:
Mark plugin Command input parameters as CustomStringConvertible instead of String

Mark the Command input parameters as CustomStringConvertible instead of String so that Path and others work without explicit wrapping.
Motivation:
This allows build tool plugins to pass Path and other types that conform to CustomStringConvertible when creating the Commands.  This doesn't break any existing plugins since String trivially conforms to CustomStringConvertible.
Modifications:

change the arguments and values of the environment parameters in the Command type in PackagePlugin from String to CustomStringConvertible
adjust a unit test

Result:
Plugins can pass Path and other types that conform to CustomStringConvertible without having to manually convert to a string.

@swift-ci please smoke test


text:
DNM: On ELF platforms, look for the runtime libraries in an architecture-specific directory.

This is needed for apple/swift#63782, which changes the Unix toolchain to look for libraries in architecture-specific directories.

cc @MaxDesiatov @etcwilde @compnerd

@swift-ci smoke test

Could we use this as an opportunity to encode more triple components in that path, such as ABI/environment, which would help with Musl support, or this is meant to be a purely incremental change?

@MaxDesiatov, we could do it together, what scheme do you have in mind? Alternatively, if we simply name the platform linux-musl instead, ie store the libraries in lib/swift/linux-musl/aarch64/, it would require no changes to where the compiler looks for these libraries.

Alternatively, if we simply name the platform linux-musl instead, ie store the libraries in lib/swift/linux-musl/aarch64/, it would require no changes to where the compiler looks for these libraries.

I already tried that route and it doesn't seem to be practical. There is enough code in the build system that identifies Musl-based distros as plain linux, and that gets propagated into multiple places that reconstitute these paths from scratch, specifically ClangImporter, but I'm pretty sure there are more. I hope we can just stick to using LLVM/Clang triples instead of coming up with our own directory layout and naming.

There is enough code in the build system that identifies Musl-based distros as plain linux, and that gets propagated into multiple places that reconstitute these paths from scratch, specifically ClangImporter, but I'm pretty sure there are more.

Well, we will have to change the build system either way, but it would be easier to make these changes you list here than move the Swift resource directory to a whole new triple-based naming scheme.

I hope we can just stick to using LLVM/Clang triples instead of coming up with our own directory layout and naming.

As in we move to a whole new scheme like lib/swift/aarch64-linux-musl/ or change the current layout to handle lib/swift/linux/aarch64-musl too? Any of these alternatives to the simpler change I suggested will require much more changes to the build system and changes to the compiler too, the latter of which my suggestion wouldn't require.
I think you raise an important point that Swift should start supporting alternate C libraries and ABIs, particularly for linux, but the question is how best to do so.

@MaxDesiatov @buttaface is this still pending, or the discussion impact this PR?

@tomerd, this is under active testing with the linked compiler pull apple/swift#63782 still: once it passes the CI, I will ask for all 8 pulls to be merged simultaneously.

Alright, the CI passed and the Swift compiler pull was approved, the draft/WIP tags can be removed, @tomerd.
Please don't merge yet though, as all 11 pulls should be merged together.

Closing since the Swift devs want to take a different approach.

authors: MaxDesiatov buttaface tomerd


text:
Add "Creating a Macro Package" to Usage.md

Add a section containing and describing swift package init --type macro.
Motivation:
I was looking for the documentation and it wasn't there.
Modifications:
Added the section by copying the Library Package and Executable Package sections' format, showing the command line input and output, describing the output of InitPackage.swift and linking to documentation for the sample macro.
Result:
Only one file is changed, which is documentation, so no change in behaviour of Swift Package Manager.

Thanks, this looks good!
Could you also add a link to https://docs.swift.org/swift-book/documentation/the-swift-programming-language/macros in there?

@swift-ci please test

@swift-ci please test

Looks like we're failing to build the compiler on the Linux job (obviously unrelated to this PR):
/home/build-user/swift/SwiftCompilerSources/Sources/Basic/SourceLoc.swift:73:49: error: value of type 'swift.CharSourceRange' has no member 'getByteLength'
    self.init(start: start, byteLength: bridged.getByteLength())
                                        ~~~~~~~ ^~~~~~~~~~~~~

@swift-ci test

@swift-ci test windows

authors: BrianHenryIE MaxDesiatov neonichu


text:
Cannot pass immutable value as inout argument

I try to compile a simple Protocol Buffer:
message ProtoMessage {
    required uint32 payloadType = 1;
    ...
}

The protoc compiler generates the Swift files but when I try to build the project I get the following error:
/.../Sources/Messages.pb.swift:93:93: error: cannot pass immutable value of type 'inout UInt32?' (aka 'inout Optional<UInt32>') as inout argument
    case 1: handled = try setter.decodeSingularField(fieldType: ProtobufUInt32.self, value: &_payloadType)
```

Any ideas?

Are you using master or are you using a labeled tag?  There was a recent change around how fields are modeled in general that might have made this go away if you were on a tag.

I just followed the instructions here:
https://github.com/apple/swift-protobuf/
So, I guess, I am using master. Any other ideas?

I am using:
$ protoc-gen-swift --version
protoc-gen-swift 0.9.24

There's a few directions there; swift build (using a tag), CocoaPods (uses master), a clone a build (uses master).

Re:

dependencies: [
    .Package(url: "https://github.com/apple/swift-protobuf.git", majorVersion:0)
]

I believe that just says use the newest 0.x, so you are using an older tag where things might not have been working.

There also is a testing file that covers this:
https://github.com/apple/swift-protobuf/blob/master/Protos/unittest_swift_all_required_types.proto#L57
  required   uint32 required_uint32   =  3;

Generated:
https://github.com/apple/swift-protobuf/blob/master/Tests/SwiftProtobufTests/unittest_swift_all_required_types.pb.swift
So it is built into the tests.

Actually, I think what is happening is you are mixing versions.
protoc-gen-swift is likely from trunk, so it is generating for the current version of the runtime, but the Package file is pulling a tagged version.  So the sources you are generating don't work with it.
You need to build protoc-gen-swift from the same 0.9.24 tag that the package manager is including in your app.

Indeed, I built from the 0.9.24 tag and it worked.
Maybe the documentation should be updated to make this point more explicit.
In any case, thanks for your help :)

np.  Yea, the docs have a small nod to it, but the problem is our master reports the same things as our last branch.  ☹

yeah, the version on the master should be updated or something.
On Thu, Oct 27, 2016 at 12:23 AM Thomas Van Lenten notifications@github.com
wrote:

np. Yea, the docs have a small nod
https://github.com/apple/swift-protobuf#building-your-project-with-swift-build
to it, but the problem is our master reports the same things as our last
branch. ☹
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apple/swift-protobuf/issues/120#issuecomment-256481176,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACR3nDxGR6vAWylF62MSWMuAMQkgA4mks5q38S2gaJpZM4Kg2KH
.

yeah, the version on the master should be updated or something.

Yup, bumped it in PR #122 right after closing this yesterday.

authors: gmosx thomasvl

repo: apple/swift-protobuf


text:
Explore different binary encoding/decoding designs

At the time of this writing, binary encoding/decoding of test messages with different numbers/types of fields is quite a bit slower than bridging to messages generated in Objective-C—about 10–25x slower under some tests.
The use of the visitor pattern in binary coding may be a significant bottleneck here; the Swift compiler may have difficulty optimizing it due to the large amount of indirection through various protocols.
Since binary coding ought to be as fast as possible, it would be prudent to explore other techniques that perhaps use more imperative/sequential operations with less generality, even if it means generating larger methods to read from/write to binary data. The visitor pattern could still be used for things like text/JSON serialization, where the string processing is likely to dominate the cost of the visitor indirection anyway.

I wonder if making the specific visitor type in ProtobufTraversable a generic would led the compiler to generate specializations of the traversal for that specific visitor. That would be the ideal solution in C++, but I'm not so familiar with Swift generics to tell for sure.
I do notice that ProtobufVisitor already defines the specific visited message as a generic (in visitSingularMessageField<M: ProtobufMessage>(value: M, ...), which would be the other half of the solution.

@allevato do you happen to have automated benchmarks against ObjC protos that could be added to this repo? They would make for a good test of changes in the codec.

@jcanizales I'm hoping to port the harness that I merged in here to Objective-C so that we have a way to easily get comparative metrics, and check it into a personal fork of google/protobuf (so that it doesn't clutter up the official repo, but it's still publicly accessible).
On the broader topic, #43 adds some significant performance improvements that should bring the Swift implementation a lot closer to Objective-C. How much closer still hasn't been measured yet, but it makes me a bit more hopeful than I was originally that we could keep the visitor pattern for binary serialization too. This would be nice because it's less code to generate, and has some nice benefits w.r.t. keeping runtime implementation details internal.

@tbkka are you taking this as part of your perf work?
@allevato was there more we're wanting to do here?
Just wondering if we're close to closing this out and doing more detailed issues for future work.

This is probably obsolete now. It was borne out of my fear that the indirection of the visitor pattern would be a performance bottleneck for the binary case, but it sounds like @tbkka has been getting some good numbers out of his recent PRs.

Ok, closing out.

Actually... this is the perfect explanation for my current WIP, which is exploring a couple of (conceptually) small tweaks to the decoder design.

PR #243 should cover this for the decoder side.
I plan to start digging into the encoder/visitor performance next.

Recent PRs overhauled the encoder/visitor architecture to address API-level performance issues.

authors: allevato jcanizales tbkka thomasvl


text:
Macro generated by other macro doesn't expand fully

Description
The CoreDataManaged (memberAttribute and a few others that aren't relevant here) macro

Expands to following, where CoreDataArray is now attached to the property entities

Then, CoreDataArray (peer, accessor) macro expands but not fully, the peer expansion is missing from the viewer but I can confirm that the property has been in fact generated and and can be accessed.

This is what happens when I attach the CoreDataArray myself:

This looks like a bug to me when the macro expansions are interfering with each other somehow.
This was noted on both Swift 6.0 snapshot and Swift 5.10 release version running Xcode 15.3

Synced to Apple’s issue tracker as rdar://127156691

This is an issue in Xcode, not with swift-syntax or the compiler. I just verified that sourcekitd (which provides semantic that raw expansion information to Xcode and lives in the compiler repo) does return the nested expansions, so I’m closing the issue.
I did pass the issue on to the Xcode team. If you are interested in seeing the status of that issue, I suggest that you file a feedback at https://feedbackassistant.apple.com.

authors: ahoppen jmgawecki

repo: apple/swift-syntax


text:
Don't fail LoopProgressCondition when consuming zero-length string segment

The loop has made progress if either

The parser is now pointing at a different location in the source file
The parser is still pointing at the same position in the source file but now has a different token kind (and thus consumed a zero-length token like an empty string interpolation

The second condition is new.
Fixes #1247
rdar://104413423

@swift-ci Please test

@swift-ci Please test


text:
Deprecate manipulation functions on  SyntaxCollection

Instead of re-inventing the wheel and providing hand-written appending etc. functions on SyntaxCollection, clients should use the methods on Array to manipulate the elements of a SyntaxCollection and create a new collection node once the manipulation is done.

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test Windows


text:
Restore Xcode 13 Build

The use of inferrable default parameters like this is a 5.7-only
feature. Divide AssertParse into an overload that defaults to
SourceFileSyntax parsing and a generic entrypoint that accepts
a closure.
This restores the ability to build with Xcode 13.

@swift-ci test


text:
Count issues recorded without known tests.

This PR ensures that the total issue count presented at the end of a test run includes issues that aren't attributable to specific tests.
Refines #592.
Checklist:

[ ] Code and documentation should follow the style of the Style Guide.
[ ] If public symbols are renamed or modified, DocC references should be updated.

@swift-ci please test

repo: apple/swift-testing


text:
build: depend on the architecture variant on non-MachO

For the non-MachO targets, which do not have the concept of fat
binaries, depend explicitly on the architecture variant.  This is
particularly useful for Windows which permits cross-compilation and
cross-targeting of all the variants even though it does not support fat
binaries.  This allows us to build a single variant of the windows
standard library at a time in the case that we would like to build a
subset of the targets.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 825864411b7712db40323ff6332444400fb6167d

Build failed
Swift Test Linux Platform
Git Sha - 825864411b7712db40323ff6332444400fb6167d

@swift-ci please test linux platform

Build failed
Swift Test Linux Platform
Git Sha - 53122666bb0b6661f2586056ff48b206d2ea3ce6

Please test with following pull request:
https://github.com/apple/swift-corelibs-foundation/pull/1354
@swift-ci Please test Linux platform

Build failed
Swift Test Linux Platform
Git Sha - 53122666bb0b6661f2586056ff48b206d2ea3ce6

Please test with following pull request:
@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - 53122666bb0b6661f2586056ff48b206d2ea3ce6

authors: compnerd swift-ci

repo: apple/swift


text:
LoadableByAddress: Only replace yielded values with a load if required by users

rdar://46372278

@swift-ci Please test and merge

@swift-ci Please test linux


text:
[CMake] Remove LINK_LIBRARIES option from _add_swift_executable_single

This option has been unused since commit
dd85d79105b1311bb2d1e5cfedc699ee231b5f00. We now use
target_link_libraries instead of this option.
cc @gottesmm @compnerd

@Rostepher Friendly ping. Could you please look when you have a moment? Thanks!

@Rostepher ping!


text:
[ownership] Fix up some parse/serialization tests for ownership.

Since I am enabling ownership verification by default, rather than disabling it
on these tests I just fixed them to follow ownership invariants.

@swift-ci smoke test and merge


text:
[os_log][stdlib-private] Refactor new os log APIs based on string interpolation for enabling optimizations.

Refactor and add inlining and @_semantics attributes to the new os log APIs  so that it can be optimized by the new OSLogOptimization compiler pass. The implementation now clearly marks out code that will be evaluated at compile time from the code that will be executed at runtime.

@swift-ci Please smoke test

The PR for the optimizer is available here: https://github.com/apple/swift/pull/24336

@moiseev Based on discussions with @eeckstein, I have removed -Onone requirement from the module and instead marked functions that will be constant evaluated with @_optimize(none).  I have pushed a commit with these changes.

@swift-ci Please test

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - e8651a0af71eb55ccbdbf19f84ac7a5c07e01e9b

Build failed
Swift Test OS X Platform
Git Sha - e8651a0af71eb55ccbdbf19f84ac7a5c07e01e9b

Removed @frozen from public enums.

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - eb3c5e1eaaba60150e0805524c0d032299a20b9a

Build failed
Swift Test OS X Platform
Git Sha - eb3c5e1eaaba60150e0805524c0d032299a20b9a

authors: ravikandhadai swift-ci