text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto"><code class="notranslate">import.meta.url</code> is replaced by the current file location at the build time.<br> <a href="https://github.com/webpack/webpack/blob/main/lib/dependencies/ImportMetaPlugin.js#L99">https://github.com/webpack/webpack/blob/main/lib/dependencies/ImportMetaPlugin.js#L99</a></p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">If you build</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="console.log(import.meta.url)"><pre class="notranslate"><code class="notranslate">console.log(import.meta.url) </code></pre></div> <p dir="auto">it will ouput a constant string (le location of the file on the current system).</p> <p dir="auto">This is problematic to build a project using yargs (<a href="https://github.com/yargs/yargs">https://github.com/yargs/yargs</a>), as it uses <code class="notranslate">meta.import.url</code> (<a href="https://github.com/yargs/yargs/blob/main/lib/platform-shims/esm.mjs#L18">https://github.com/yargs/yargs/blob/main/lib/platform-shims/esm.mjs#L18</a>).</p> <p dir="auto">When building under an Unix file system, <code class="notranslate">meta.import.url</code> is replaced by something like <code class="notranslate">file:///path/to/your/project/src/index.js</code>. When trying to run the built code under a Windows filesystem, a <code class="notranslate">TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute</code> is thrown, as the filename doesn't contain <code class="notranslate">file://C:/...</code>.</p> <p dir="auto">Making the <code class="notranslate">meta.import.url</code> variable dynamic (based on __dirname) should solve the problem.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto"><code class="notranslate">import.meta.url</code> should be based on <code class="notranslate">__dirname</code> for cjs build, to keep the original intended behavior of the application developer.</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.58.1<br> Node.js version: 16.10.0<br> Operating System: Ubuntu Linux 20.04<br> Additional tools: yargs</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">When configuring an entry point like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = { entry: './path/to/my/entry/file.js', };"><pre class="notranslate"><code class="notranslate">module.exports = { entry: './path/to/my/entry/file.js', }; </code></pre></div> <p dir="auto">The source map in dev mode will have urls like this:<br> <code class="notranslate">webpack://project-server/./resources/js/MyPage.js</code></p> <p dir="auto">But <code class="notranslate">vue</code> files in the same project have urls like this:<br> <code class="notranslate">webpack://project-server/resources/js/AnotherPage.vue</code></p> <p dir="auto">Notice that the <code class="notranslate">vue</code> paths are not prefixed with <code class="notranslate">./</code>.</p> <p dir="auto">This splits the sources in the dev tool to two separate folder, which makes it hard to find while debugging.</p> <p dir="auto">I have tried multiple <code class="notranslate">entry</code> combinations, but could not get this to behave.</p> <p dir="auto">For those interested in a workaround, here it is:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" output.devtoolModuleFilenameTemplate = opts =&gt; { return `webpack://${opts.namespace}/${opts.resourcePath.startsWith('./') ? opts.resourcePath.substr(2) : opts.resourcePath}`; }; output.devtoolFallbackModuleFilenameTemplate = opts =&gt; { return `webpack://${opts.namespace}/${opts.resourcePath.startsWith('./') ? opts.resourcePath.substr(2) : opts.resourcePath}?${hash}`; };"><pre class="notranslate"> <span class="pl-s1">output</span><span class="pl-kos">.</span><span class="pl-en">devtoolModuleFilenameTemplate</span> <span class="pl-c1">=</span> <span class="pl-s1">opts</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">`webpack://<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">namespace</span><span class="pl-kos">}</span></span>/<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">.</span><span class="pl-en">startsWith</span><span class="pl-kos">(</span><span class="pl-s">'./'</span><span class="pl-kos">)</span> ? <span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">.</span><span class="pl-en">substr</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> : <span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-s1">output</span><span class="pl-kos">.</span><span class="pl-en">devtoolFallbackModuleFilenameTemplate</span> <span class="pl-c1">=</span> <span class="pl-s1">opts</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">`webpack://<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">namespace</span><span class="pl-kos">}</span></span>/<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">.</span><span class="pl-en">startsWith</span><span class="pl-kos">(</span><span class="pl-s">'./'</span><span class="pl-kos">)</span> ? <span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">.</span><span class="pl-en">substr</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> : <span class="pl-s1">opts</span><span class="pl-kos">.</span><span class="pl-c1">resourcePath</span><span class="pl-kos">}</span></span>?<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">hash</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">Any simple project with both js and vue will demonstrate the issue.<br> Although just a simple js project will also demonstrate it, as the paths should not contain <code class="notranslate">./</code> in them anyway.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Paths should be normalized (no <code class="notranslate">./</code> or <code class="notranslate">../</code> in the path), or at least behave in a consistent way across all modules.</p> <p dir="auto">I am not entirely sure if paths are not normalized, or if they are actually normalized and this line <code class="notranslate">options.moduleFilenameTemplate || "webpack://[namespace]/[resourcePath]";</code> in <code class="notranslate">SourceMapDevToolPlugin.js</code> is just too simple.</p> <p dir="auto">Even though there is a workaround, I think that this should be fixed for everyone from the ground up.</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: <code class="notranslate">5.38.1</code><br> Node.js version: <code class="notranslate">14.5.4</code><br> Operating System: <code class="notranslate">Windows 10</code><br> Additional tools: <code class="notranslate">webpack-dev-server v4.0.0-beta.3</code>, <code class="notranslate">webpack-cli v4.6.0</code></p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Return Status Code: 400 - Bad request</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9091881/35304784-3efa09d4-006d-11e8-964b-e3baabfc7ad6.png"><img src="https://user-images.githubusercontent.com/9091881/35304784-3efa09d4-006d-11e8-964b-e3baabfc7ad6.png" alt="captura de pantalla 2018-01-23 a las 14 12 48" style="max-width: 100%;"></a></p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Return Status Code: 500 and Internal Server Error<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9091881/35304184-fd502132-006a-11e8-8486-b54969bbbec7.png"><img src="https://user-images.githubusercontent.com/9091881/35304184-fd502132-006a-11e8-8486-b54969bbbec7.png" alt="captura de pantalla 2018-01-23 a las 13 52 25" style="max-width: 100%;"></a></p> <p dir="auto">CLI</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9091881/35304208-14b29184-006b-11e8-99fc-79a700376d99.png"><img src="https://user-images.githubusercontent.com/9091881/35304208-14b29184-006b-11e8-99fc-79a700376d99.png" alt="captura de pantalla 2018-01-23 a las 13 52 17" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Init.</li> <li>npm run build</li> <li>npm start</li> <li>go to <a href="http://127.0.0.1:3000/..%f3/" rel="nofollow">http://127.0.0.1:3000/..%f3/</a></li> </ol> <h2 dir="auto">Context</h2> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>canary &amp; latest</td> </tr> <tr> <td>node</td> <td>9.3.0</td> </tr> <tr> <td>OS</td> <td>Mac OS X 10.10.1</td> </tr> <tr> <td>browser</td> <td>Chrome 63</td> </tr> </tbody> </table>
<p dir="auto">I have been using this piece of code to asynchronously load one of heavy component on my client side. It was working like a charm:</p> <p dir="auto"><code class="notranslate">const DynamicChart = dynamic( import('../components/LineChart/LineChart'), { loading: () =&gt; &lt;SectionPlaceholder&gt;&lt;Loader /&gt;&lt;/SectionPlaceholder&gt;, ssr: false, }, );</code></p> <p dir="auto">Since update to v5.0.0 I get webpack error, but only when I open the parent page from frontend route. When I directly load from server, it get's loaded. When I get it once (from first load) and go back to this page on frontend, it works too.</p> <p dir="auto">This is the error I get:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9268745/36093000-8e62f87e-0fe9-11e8-9023-cc8f1f391b59.png"><img src="https://user-images.githubusercontent.com/9268745/36093000-8e62f87e-0fe9-11e8-9023-cc8f1f391b59.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I tried <code class="notranslate">import(...).then(...).catch(...)</code> but none of chains were triggered.</p> <p dir="auto">The problem is that I can't reproduce it always.</p> <p dir="auto">I'm also using <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-routes">next-routes</a> if that matters</p> <p dir="auto">I assume that problem occurs because of <code class="notranslate">undefined</code> part in webpack. Any ideas how to debug the cause?</p> <p dir="auto">My package dependencies:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;dependencies&quot;: { &quot;babel-plugin-styled-components&quot;: &quot;^1.5.0&quot;, &quot;dotenv&quot;: &quot;^5.0.0&quot;, &quot;dotenv-webpack&quot;: &quot;^1.5.4&quot;, &quot;enzyme&quot;: &quot;^3.3.0&quot;, &quot;eslint-plugin-jest&quot;: &quot;^21.7.0&quot;, &quot;express&quot;: &quot;^4.16.2&quot;, &quot;glamor&quot;: &quot;^2.20.40&quot;, &quot;glamorous&quot;: &quot;^4.11.4&quot;, &quot;htmlescape&quot;: &quot;^1.1.1&quot;, &quot;isomorphic-fetch&quot;: &quot;^2.2.1&quot;, &quot;lodash&quot;: &quot;^4.17.5&quot;, &quot;next&quot;: &quot;^5.0.0&quot;, &quot;next-redux-wrapper&quot;: &quot;^1.3.5&quot;, &quot;next-routes&quot;: &quot;^1.3.0&quot;, &quot;polished&quot;: &quot;^1.9.2&quot;, &quot;react&quot;: &quot;^16.2.0&quot;, &quot;react-dom&quot;: &quot;^16.2.0&quot;, &quot;react-extras&quot;: &quot;^0.5.0&quot;, &quot;react-icons&quot;: &quot;^2.2.7&quot;, &quot;react-markdown&quot;: &quot;^3.2.0&quot;, &quot;react-modal&quot;: &quot;^3.1.12&quot;, &quot;react-no-ssr&quot;: &quot;^1.1.0&quot;, &quot;react-redux&quot;: &quot;^5.0.6&quot;, &quot;react-sizeme&quot;: &quot;^2.3.6&quot;, &quot;recharts&quot;: &quot;^1.0.0-beta.10&quot;, &quot;redux&quot;: &quot;^3.7.2&quot;, &quot;redux-logger&quot;: &quot;^3.0.6&quot;, &quot;redux-thunk&quot;: &quot;^2.2.0&quot;, &quot;reselect&quot;: &quot;^3.0.1&quot;, &quot;socket.io&quot;: &quot;^2.0.4&quot;, &quot;socket.io-client&quot;: &quot;^2.0.4&quot;, &quot;yargs&quot;: &quot;^11.0.0&quot; }, &quot;devDependencies&quot;: { &quot;@storybook/addon-actions&quot;: &quot;^3.3.12&quot;, &quot;@storybook/addon-info&quot;: &quot;^3.3.12&quot;, &quot;@storybook/addon-links&quot;: &quot;^3.3.12&quot;, &quot;@storybook/addons&quot;: &quot;^3.3.12&quot;, &quot;@storybook/react&quot;: &quot;^3.3.12&quot;, &quot;@types/enzyme&quot;: &quot;^3.1.8&quot;, &quot;@types/jest&quot;: &quot;^22.1.1&quot;, &quot;@types/next&quot;: &quot;^2.4.7&quot;, &quot;@types/node&quot;: &quot;^9.4.1&quot;, &quot;@types/react&quot;: &quot;^16.0.36&quot;, &quot;@types/recharts&quot;: &quot;^1.0.13&quot;, &quot;@types/reselect&quot;: &quot;^2.2.0&quot;, &quot;@types/socket.io&quot;: &quot;^1.4.31&quot;, &quot;@types/storybook__react&quot;: &quot;^3.0.6&quot;, &quot;babel-core&quot;: &quot;^6.26.0&quot;, &quot;babel-eslint&quot;: &quot;^7.2.3&quot;, &quot;babel-plugin-recharts&quot;: &quot;^1.1.1&quot;, &quot;babel-plugin-transform-decorators-legacy&quot;: &quot;^1.3.4&quot;, &quot;babel-preset-env&quot;: &quot;^1.6.1&quot;, &quot;babel-preset-es2015&quot;: &quot;^6.24.1&quot;, &quot;babel-preset-stage-0&quot;: &quot;^6.24.1&quot;, &quot;babili-webpack-plugin&quot;: &quot;^0.1.2&quot;, &quot;console-probe&quot;: &quot;^2.0.4&quot;, &quot;create-component-app&quot;: &quot;^1.6.2&quot;, &quot;eslint&quot;: &quot;^4.17.0&quot;, &quot;eslint-config-airbnb&quot;: &quot;^16.1.0&quot;, &quot;eslint-plugin-babel&quot;: &quot;^4.1.2&quot;, &quot;eslint-plugin-import&quot;: &quot;^2.8.0&quot;, &quot;eslint-plugin-jsx-a11y&quot;: &quot;^6.0.3&quot;, &quot;eslint-plugin-react&quot;: &quot;^7.6.1&quot;, &quot;eslint-plugin-styled-components-config&quot;: &quot;0.0.2&quot;, &quot;jest&quot;: &quot;^22.1.4&quot;, &quot;prop-types&quot;: &quot;^15.6.0&quot;, &quot;redux-devtools-extension&quot;: &quot;^2.13.2&quot;, &quot;webpack-bundle-analyzer&quot;: &quot;^2.10.0&quot; }"><pre class="notranslate"><code class="notranslate"> "dependencies": { "babel-plugin-styled-components": "^1.5.0", "dotenv": "^5.0.0", "dotenv-webpack": "^1.5.4", "enzyme": "^3.3.0", "eslint-plugin-jest": "^21.7.0", "express": "^4.16.2", "glamor": "^2.20.40", "glamorous": "^4.11.4", "htmlescape": "^1.1.1", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.5", "next": "^5.0.0", "next-redux-wrapper": "^1.3.5", "next-routes": "^1.3.0", "polished": "^1.9.2", "react": "^16.2.0", "react-dom": "^16.2.0", "react-extras": "^0.5.0", "react-icons": "^2.2.7", "react-markdown": "^3.2.0", "react-modal": "^3.1.12", "react-no-ssr": "^1.1.0", "react-redux": "^5.0.6", "react-sizeme": "^2.3.6", "recharts": "^1.0.0-beta.10", "redux": "^3.7.2", "redux-logger": "^3.0.6", "redux-thunk": "^2.2.0", "reselect": "^3.0.1", "socket.io": "^2.0.4", "socket.io-client": "^2.0.4", "yargs": "^11.0.0" }, "devDependencies": { "@storybook/addon-actions": "^3.3.12", "@storybook/addon-info": "^3.3.12", "@storybook/addon-links": "^3.3.12", "@storybook/addons": "^3.3.12", "@storybook/react": "^3.3.12", "@types/enzyme": "^3.1.8", "@types/jest": "^22.1.1", "@types/next": "^2.4.7", "@types/node": "^9.4.1", "@types/react": "^16.0.36", "@types/recharts": "^1.0.13", "@types/reselect": "^2.2.0", "@types/socket.io": "^1.4.31", "@types/storybook__react": "^3.0.6", "babel-core": "^6.26.0", "babel-eslint": "^7.2.3", "babel-plugin-recharts": "^1.1.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-preset-env": "^1.6.1", "babel-preset-es2015": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "babili-webpack-plugin": "^0.1.2", "console-probe": "^2.0.4", "create-component-app": "^1.6.2", "eslint": "^4.17.0", "eslint-config-airbnb": "^16.1.0", "eslint-plugin-babel": "^4.1.2", "eslint-plugin-import": "^2.8.0", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-react": "^7.6.1", "eslint-plugin-styled-components-config": "0.0.2", "jest": "^22.1.4", "prop-types": "^15.6.0", "redux-devtools-extension": "^2.13.2", "webpack-bundle-analyzer": "^2.10.0" } </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Component gets loaded every time</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Sometimes component is not loaded and webpack tries to load something with <code class="notranslate">undefined</code> in name</p>
0
<h3 dir="auto">Describe the bug</h3> <p dir="auto"><code class="notranslate">custom_op</code> usage leads to duplicated entries in query cache.</p> <p dir="auto">I have found this issue by discovering a memory leak in my application. We have big queries with size <code class="notranslate">~1 Mb</code> and with default <code class="notranslate">query_cache_size=500</code> it leads to cases when application consumes <code class="notranslate">500+ Mb</code> after some time.</p> <h3 dir="auto">Optional link from <a href="https://docs.sqlalchemy.org" rel="nofollow">https://docs.sqlalchemy.org</a> which documents the behavior that is expected</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">SQLAlchemy Version in Use</h3> <p dir="auto">2.0.6</p> <h3 dir="auto">DBAPI (i.e. the database driver)</h3> <p dir="auto">any</p> <h3 dir="auto">Database Vendor and Major Version</h3> <p dir="auto">any</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.11</p> <h3 dir="auto">Operating system</h3> <p dir="auto">any</p> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sqlalchemy import select, literal, create_engine engine = create_engine(&quot;postgresql://postgres:postgres@localhost:5432/postgres&quot;) def main() -&gt; None: with engine.connect() as conn: for _ in range(10): query = select(literal(1).op(&quot;+&quot;)(literal(1))) conn.execute(query) print(len(engine._compiled_cache)) for entry in engine._compiled_cache.items(): print(entry) if __name__ == &quot;__main__&quot;: main()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sqlalchemy</span> <span class="pl-k">import</span> <span class="pl-s1">select</span>, <span class="pl-s1">literal</span>, <span class="pl-s1">create_engine</span> <span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_engine</span>(<span class="pl-s">"postgresql://postgres:postgres@localhost:5432/postgres"</span>) <span class="pl-k">def</span> <span class="pl-en">main</span>() <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>: <span class="pl-k">with</span> <span class="pl-s1">engine</span>.<span class="pl-en">connect</span>() <span class="pl-k">as</span> <span class="pl-s1">conn</span>: <span class="pl-k">for</span> <span class="pl-s1">_</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">10</span>): <span class="pl-s1">query</span> <span class="pl-c1">=</span> <span class="pl-en">select</span>(<span class="pl-en">literal</span>(<span class="pl-c1">1</span>).<span class="pl-en">op</span>(<span class="pl-s">"+"</span>)(<span class="pl-en">literal</span>(<span class="pl-c1">1</span>))) <span class="pl-s1">conn</span>.<span class="pl-en">execute</span>(<span class="pl-s1">query</span>) <span class="pl-en">print</span>(<span class="pl-en">len</span>(<span class="pl-s1">engine</span>.<span class="pl-s1">_compiled_cache</span>)) <span class="pl-k">for</span> <span class="pl-s1">entry</span> <span class="pl-c1">in</span> <span class="pl-s1">engine</span>.<span class="pl-s1">_compiled_cache</span>.<span class="pl-en">items</span>(): <span class="pl-en">print</span>(<span class="pl-s1">entry</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-en">main</span>()</pre></div> <h3 dir="auto">Error</h3> <p dir="auto">Will print 10 instead of 1:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="10 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c730e20&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c731360&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c7320e0&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c732bc0&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c733040&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c733220&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c733400&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c7335e0&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c7337c0&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 (&lt;sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x10c5a9250&gt;, ('0', &lt;class 'sqlalchemy.sql.selectable.Select'&gt;, '_raw_columns', (('1', &lt;class 'sqlalchemy.sql.elements.BinaryExpression'&gt;, 'left', ('2', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '3', False), 'right', ('4', &lt;class 'sqlalchemy.sql.elements.BindParameter'&gt;, (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,), '5', False), 'operator', &lt;sqlalchemy.sql.operators.custom_op object at 0x10c7339a0&gt;, 'type', (&lt;class 'sqlalchemy.sql.sqltypes.Integer'&gt;,)),), '_label_style', &lt;SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY: 2&gt;, '_compile_options', (&lt;class 'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'&gt;, ())), (), False, False) SELECT %(param_1)s + %(param_2)s AS anon_1 "><pre class="notranslate"><span class="pl-c1">10</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c730e20</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c731360</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c7320e0</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c732bc0</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c733040</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c733220</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c733400</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c7335e0</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c7337c0</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span> (<span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">dialects</span>.<span class="pl-s1">postgresql</span>.<span class="pl-s1">psycopg2</span>.<span class="pl-v">PGDialect_psycopg2</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c5a9250</span><span class="pl-c1">&gt;</span>, (<span class="pl-s">'0'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.Select'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_raw_columns'</span>, ((<span class="pl-s">'1'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BinaryExpression'</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'left'</span>, (<span class="pl-s">'2'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'3'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'right'</span>, (<span class="pl-s">'4'</span>,<span class="pl-s1"></span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.elements.BindParameter'</span><span class="pl-c1">&gt;</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,), <span class="pl-s">'5'</span>, <span class="pl-c1">False</span>), <span class="pl-s">'operator'</span>, <span class="pl-c1">&lt;</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">sql</span>.<span class="pl-s1">operators</span>.<span class="pl-s1">custom_op</span> <span class="pl-s1">object</span> <span class="pl-s1">at</span> <span class="pl-c1">0x10c7339a0</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'type'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.sqltypes.Integer'</span><span class="pl-c1">&gt;</span>,)),), <span class="pl-s">'_label_style'</span>, <span class="pl-c1">&lt;</span><span class="pl-v">SelectLabelStyle</span>.<span class="pl-v">LABEL_STYLE_DISAMBIGUATE_ONLY</span>: <span class="pl-c1">2</span><span class="pl-c1">&gt;</span>, <span class="pl-s">'_compile_options'</span>, (<span class="pl-s1"></span><span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'sqlalchemy.sql.selectable.SelectState.default_select_compile_options'</span><span class="pl-c1">&gt;</span>, ())), (), <span class="pl-c1">False</span>, <span class="pl-c1">False</span>) <span class="pl-v">SELECT</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_1</span>)<span class="pl-s1">s</span> <span class="pl-c1">+</span> <span class="pl-c1">%</span>(<span class="pl-s1">param_2</span>)<span class="pl-s1">s</span> <span class="pl-v">AS</span> <span class="pl-s1">anon_1</span></pre></div> <h3 dir="auto">Additional context</h3> <p dir="auto"><em>No response</em></p>
<p dir="auto"><strong>Migrated issue, originally created by Marcin Lulek (<a href="https://github.com/ergo">@ergo</a>)</strong></p> <p dir="auto">Hello,</p> <p dir="auto">I'm not sure if I was always using SA in wrong way or there is a bug in 1.2 version.</p> <p dir="auto">Setters need to be named same way as hybrid property - this test case works in 1.x and breaks in 1.2. I did notice that in the examples in docs the property name is same in both places, though.</p> <p dir="auto">Error I'm getting is:</p> <p dir="auto">File "/home/ergo/workspace/ziggurat_cms/.venv/lib/python3.6/site-packages/sqlalchemy/ext/hybrid.py", line 873, in <strong>set</strong><br> raise AttributeError("can't set attribute")<br> AttributeError: can't set attribute</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/4149/test_hybrid.py">test_hybrid.py</a></p>
0
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto"><a href="https://github.com/zeit/next.js/tree/canary/examples/with-firebase-hosting-and-typescript">https://github.com/zeit/next.js/tree/canary/examples/with-firebase-hosting-and-typescript</a></p> <p dir="auto">Next.js cannot find pages folder after building and deploy to firebase functions.<br> Next.js v9.0.6 seems fine. It works well. but since v9.0.7 Next.js is not.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; [email protected] postinstall C:\test\test-web\your-app\dist\functions\node_modules\protobufjs &gt; node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN [email protected] No repository field. npm WARN [email protected] No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;win32&quot;,&quot;arch&quot;:&quot;x64&quot;}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\firebase-tools\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;win32&quot;,&quot;arch&quot;:&quot;x64&quot;}) added 1323 packages from 618 contributors and audited 13608 packages in 25.735s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details + functions: Finished running predeploy script. Running command: npm run build-public &gt; [email protected] build-public C:\test\test-web\your-app &gt; cpx &quot;sources/public/**/*.*&quot; &quot;dist/public&quot; -C + hosting: Finished running predeploy script. i functions: ensuring necessary APIs are enabled... + functions: all necessary APIs are enabled i functions: preparing dist/functions directory for uploading... Error: Error occurred while parsing your function triggers. Error: &gt; Couldn't find a `pages` directory. Please create one under the project root at findPagesDir (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\lib\find-pages-dir.js:3:170) at new DevServer (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\server\next-dev-server.js:1:2679) at Object.createServer [as default] (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\server\next.js:2:105) at Object.&lt;anonymous&gt; (C:\test\test-web\your-app\dist\functions\index.js:16:27) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) Having trouble? Try firebase deploy --help error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command."><pre class="notranslate"><code class="notranslate">&gt; [email protected] postinstall C:\test\test-web\your-app\dist\functions\node_modules\protobufjs &gt; node scripts/postinstall npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN [email protected] No repository field. npm WARN [email protected] No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\firebase-tools\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) added 1323 packages from 618 contributors and audited 13608 packages in 25.735s found 1 low severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details + functions: Finished running predeploy script. Running command: npm run build-public &gt; [email protected] build-public C:\test\test-web\your-app &gt; cpx "sources/public/**/*.*" "dist/public" -C + hosting: Finished running predeploy script. i functions: ensuring necessary APIs are enabled... + functions: all necessary APIs are enabled i functions: preparing dist/functions directory for uploading... Error: Error occurred while parsing your function triggers. Error: &gt; Couldn't find a `pages` directory. Please create one under the project root at findPagesDir (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\lib\find-pages-dir.js:3:170) at new DevServer (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\server\next-dev-server.js:1:2679) at Object.createServer [as default] (C:\test\test-web\your-app\dist\functions\node_modules\next\dist\server\next.js:2:105) at Object.&lt;anonymous&gt; (C:\test\test-web\your-app\dist\functions\index.js:16:27) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) Having trouble? Try firebase deploy --help error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. </code></pre></div> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p> <p dir="auto">npx create-<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-app">next-app</a> --example with-firebase-hosting-and-typescript your-app<br> -&gt; edit .firebaserc<br> { "projects" : { "default" : "YOUR_PROJECT" } }</p> <p dir="auto">firebase use default<br> npm run deploy</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Next.js App should be deployed to Firebase function.</p> <h2 dir="auto">System information</h2> <p dir="auto">Google Firebase Functions</p>
<h1 dir="auto">Bug report</h1> <p dir="auto">My project has a custom structure but so far it worked pretty well. Since I updated to v9.0.7 I get this error:</p> <p dir="auto"><code class="notranslate">Error: &gt; Couldn't find a </code>pages<code class="notranslate">directory. Please create one under the project root at Object.findPagesDir [...]</code></p> <p dir="auto">So far running <code class="notranslate">next src/app</code> worked just fine. Is there anything different I should do now?</p> <h2 dir="auto">Screenshot</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/28128/65817775-8d9e7300-e20b-11e9-9438-870d10cdb810.png"><img src="https://user-images.githubusercontent.com/28128/65817775-8d9e7300-e20b-11e9-9438-870d10cdb810.png" alt="image" style="max-width: 100%;"></a></p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: [macOS]</li> <li>Version of Next.js: [9.0.7]</li> </ul>
1
<p dir="auto">Hi guys, my settings shows up and then goes back. I really don't know where does the program start from, please would someone provide the drawing to get an idea so that i could fix the issue. Even while debugging i can't see the settings show up. Someone please help me.</p>
<h1 dir="auto">Environment</h1> <p dir="auto">W10 Pro V1903 Build 18362.295<br> PowerToys: 0.11.0<br> Settings Screen</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run &quot;ver&quot; at a command prompt] PowerToys version: PowerToy module for which you are reporting the bug (if applicable):"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] PowerToys version: PowerToy module for which you are reporting the bug (if applicable): </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Just installed and attempted to open settings. Screen is totally blank/empty.<br> I 'repaired - same issue.<br> Uninstalled, reboot and reinstall - same issue.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Expect to see config options</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Blank window.</p> <h1 dir="auto">Screenshots</h1> <p dir="auto"><a href="https://i.imgur.com/a7oWKgp.png" rel="nofollow">https://i.imgur.com/a7oWKgp.png</a></p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cronoschris" rel="nofollow">Kerboriou christophe</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4533?redirect=false" rel="nofollow">SPR-4533</a></strong> and commented</p> <p dir="auto">We can't deserialize or serialize an array with AxisBeanMappingServicePostProcessor.</p> <p dir="auto">the AxisBeanMappingServicePostProcessor use only the BeanSerializerFactory and BeanDeserializerFactory.</p> <p dir="auto">please, add an arrayMapping using ArrayDeserializerFactory and ArraySerializerFactory to add array support to this post processor.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0 M5, 2.0 RC1, 2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 final, 2.0.1, 2.0.2, 1.2.9, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.1 M1, 2.1 M2, 2.1 M3, 2.1 M4, 2.5 RC1, 2.5 RC2, 2.5 final, 2.5.1, 2.5.2</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/13739/AxisBeanMappingServicePostProcessor.java" rel="nofollow">AxisBeanMappingServicePostProcessor.java</a> (<em>10.78 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086056" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9211" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9211/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9211">#9211</a> add Array support to AxisBeanMappingServicePostProcessor (<em><strong>"is duplicated by"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=rajeev1982" rel="nofollow">Rajeev Sharma</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7637?redirect=false" rel="nofollow">SPR-7637</a></strong> and commented</p> <p dir="auto">I am new to Spring Framework. I am using <code class="notranslate">@ExceptionHandler</code> to handle exceptions in my controller. I thought the process of returning result from exception handler would be similar to a request handler but that is not the case. Below is my code.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@RequestMapping(value = &quot;/{userid}&quot;, method = RequestMethod.GET) public @ResponseBody User getUser(@PathVariable(value = &quot;userid&quot;) int userId) throws SpringTestException { logger.trace(&quot;Getting user: &quot; + userId); User user = getUserDAO().getUser(userId); if (user == null) { throw new SpringTestException(1000, &quot;User does not exists&quot;); } logger.trace(&quot;Userid: &quot; + user.getId() + &quot;, Name: &quot; + user.getName() + &quot;, Email: &quot; + user.getEmailId()); return user; }"><pre class="notranslate"><code class="notranslate">@RequestMapping(value = "/{userid}", method = RequestMethod.GET) public @ResponseBody User getUser(@PathVariable(value = "userid") int userId) throws SpringTestException { logger.trace("Getting user: " + userId); User user = getUserDAO().getUser(userId); if (user == null) { throw new SpringTestException(1000, "User does not exists"); } logger.trace("Userid: " + user.getId() + ", Name: " + user.getName() + ", Email: " + user.getEmailId()); return user; } </code></pre></div> <p dir="auto">This code fetches user from the database and returns it to the user in json. But when the user is not found in db I through an exception which is handled by an exception class and supposed to return error message in json format ("code": 10000, "message": "user does not exists"}). Below is my exception handler version 1.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ExceptionHandler(SpringTestException.class) public @ResponseBody HttpResponse handleSpringTestException(SpringTestException e) { logger.trace(&quot;Exception caught&quot;); return new HttpResponse(e.getCode(), e.getMessage()); }"><pre class="notranslate"><code class="notranslate">@ExceptionHandler(SpringTestException.class) public @ResponseBody HttpResponse handleSpringTestException(SpringTestException e) { logger.trace("Exception caught"); return new HttpResponse(e.getCode(), e.getMessage()); } </code></pre></div> <p dir="auto">HttpResponse has two members "code" and "message".</p> <p dir="auto">When I make a curl call, I didn't get the response, instead got an exception with http-status 500.</p> <p dir="auto">&lt; HTTP/1.1 500 Internal Server Error<br> &lt; Server: Apache-Coyote/1.1<br> &lt; Content-Type: text/html;charset=utf-8<br> &lt; Content-Length: 2960<br> &lt; Date: Sun, 10 Oct 2010 12:35:33 GMT<br> &lt; Connection: close<br> &lt;</p> <p dir="auto">&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/6.0.20 - Error report&lt;/title&gt;&lt;style&gt;&lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status 500 - &lt;/h1&gt;&lt;HR size="1" noshade="noshade"&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Exception report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt; &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt; &lt;u&gt;The server encountered an internal error () that prevented it from fulfilling this request.&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;exception&lt;/b&gt; &lt;pre&gt;org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.ivasoft.springtest.common.SpringTestException: User does not exists<br> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)<br> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)<br> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)<br> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br> &lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;root cause&lt;/b&gt; &lt;pre&gt;com.ivasoft.springtest.common.SpringTestException: User does not exists<br> com.ivasoft.springtest.controllers.UserControllerIoC.getUser(UserControllerIoC.java:43)<br> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br> java.lang.reflect.Method.invoke(Method.java:616)<br> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)<br> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:427)<br> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:415)<br> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:788)<br> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717)<br> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)<br> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)<br> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)<br> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</p> <ul dir="auto"> <li>Closing connection #0<br> &lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;note&lt;/b&gt; &lt;u&gt;The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.&lt;/u&gt;&lt;/p&gt;&lt;HR size="1" noshade="noshade"&gt;&lt;h3&gt;Apache Tomcat/6.0.20&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;</li> </ul> <p dir="auto">I googled around for hours and found that ExceptionHandlers are handled by different Adaptor than that of request handlers so I need to configure something in my xml file. I did this in my xml config file.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;stringHttpMessageConverter&quot; class=&quot;org.springframework.http.converter.StringHttpMessageConverter&quot; /&gt; &lt;bean id=&quot;jsonHttpMessageConverter&quot; class=&quot;org.springframework.http.converter.json.MappingJacksonHttpMessageConverter&quot; /&gt; &lt;bean id=&quot;methodHandlerExceptionResolver&quot; class=&quot;org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver&quot;&gt; &lt;property name=&quot;messageConverters&quot;&gt; &lt;list&gt; &lt;ref bean=&quot;stringHttpMessageConverter&quot; /&gt; &lt;ref bean=&quot;jsonHttpMessageConverter&quot; /&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="stringHttpMessageConverter" class="org.springframework.http.converter.StringHttpMessageConverter" /&gt; &lt;bean id="jsonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" /&gt; &lt;bean id="methodHandlerExceptionResolver" class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver"&gt; &lt;property name="messageConverters"&gt; &lt;list&gt; &lt;ref bean="stringHttpMessageConverter" /&gt; &lt;ref bean="jsonHttpMessageConverter" /&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre></div> <p dir="auto">I got this response after configurations change (This is what I expected):</p> <p dir="auto">&lt; HTTP/1.1 200 OK<br> &lt; Server: Apache-Coyote/1.1<br> &lt; Content-Type: application/json<br> &lt; Transfer-Encoding: chunked<br> &lt; Date: Sun, 10 Oct 2010 12:37:43 GMT<br> &lt;</p> <ul dir="auto"> <li>Connection #0 to host localhost left intact</li> <li>Closing connection #0<br> {"message":"User does not exists","code":1000}</li> </ul> <p dir="auto">I don't know if the above configuration is correct (This is working but could be a hack found by some developer) as I found it in some forum.</p> <p dir="auto">Second level problem came when I used ResposeEntity as return value for my exception handler. I changed the exception handler to this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ExceptionHandler(SpringTestException.class) public @ResponseBody ResponseEntity&lt;HttpResponse&gt; handleSpringTestException(SpringTestException e) { return new ResponseEntity&lt;HttpResponse&gt;(new HttpResponse(e.getCode(), e.getMessage()), HttpStatus.NOT_FOUND); }"><pre class="notranslate"><code class="notranslate">@ExceptionHandler(SpringTestException.class) public @ResponseBody ResponseEntity&lt;HttpResponse&gt; handleSpringTestException(SpringTestException e) { return new ResponseEntity&lt;HttpResponse&gt;(new HttpResponse(e.getCode(), e.getMessage()), HttpStatus.NOT_FOUND); } </code></pre></div> <p dir="auto">And I was exception the same response with status code 404, but got this response.</p> <p dir="auto">&lt; HTTP/1.1 200 OK<br> &lt; Server: Apache-Coyote/1.1<br> &lt; Content-Type: application/json<br> &lt; Transfer-Encoding: chunked<br> &lt; Date: Sun, 10 Oct 2010 12:39:13 GMT<br> &lt;</p> <ul dir="auto"> <li>Connection #0 to host localhost left intact</li> <li>Closing connection #0<br> {"statusCode":"NOT_FOUND","headers":{},"body":{"message":"User does not exists","code":1000}}</li> </ul> <p dir="auto">Looks like the exception handlers behave differently that request handlers. I fail to understand why is it that way. I used following code to get required results.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ExceptionHandler(SpringTestException.class) public @ResponseBody HttpResponse handleSpringTestException(SpringTestException e, HttpServletResponse response) { logger.trace(&quot;Exception caught&quot;); response.setStatus(HttpServletResponse.SC_NOT_FOUND); return new HttpResponse(e.getCode(), e.getMessage()); }"><pre class="notranslate"><code class="notranslate">@ExceptionHandler(SpringTestException.class) public @ResponseBody HttpResponse handleSpringTestException(SpringTestException e, HttpServletResponse response) { logger.trace("Exception caught"); response.setStatus(HttpServletResponse.SC_NOT_FOUND); return new HttpResponse(e.getCode(), e.getMessage()); } </code></pre></div> <p dir="auto">This makes my code dependent on HttpServletResponse object and this is not the same as what I would do in a request handler. I could use <code class="notranslate">@ResponseBody</code> ResponseEntity as return value to get the same result and that seems correct to me. If exception handlers and request handlers behave the same way it would be much easier and consistent for the framework to work with.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.4</p> <p dir="auto">2 votes, 2 watchers</p>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> Bug</p> <p dir="auto"><strong>What is the current behavior?</strong><br> When rendering with a suspense config, time spent before rendering appears to be subtracted from the timeout of the suspense config. If I spend 1 second before triggering an update with a suspense config with a timeout of 2 seconds, it takes only 1 second before the tree suspends.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong></p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Open PR with failing test (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="502547950" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/17015" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/17015/hovercard" href="https://github.com/facebook/react/pull/17015">#17015</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create CodeSandbox with example (<a href="https://codesandbox.io/s/suspense-config-test-sw3fn" rel="nofollow">https://codesandbox.io/s/suspense-config-test-sw3fn</a>)<br> In the sandbox, any time spent before click "Next page", reduces the time the pending state is shown before suspending. If you wait longer than 2 seconds, it immediately suspends.</li> </ul> <p dir="auto"><strong>What is the expected behavior?</strong><br> I would expect the timeout of the suspense config to count from when the update is triggered.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong><br> Any version that allows rendering with a suspense config</p>
<p dir="auto">I was playing around with some unstable Suspense APIs and noticed this strange behaviour when using <code class="notranslate">React.unstable_withSuspenseConfig</code>.</p> <p dir="auto">If I understood correctly, the purpose of <code class="notranslate">timeoutMs</code> field is to tell React: "I'm okay with this update to not happen within this time. <em>Then</em> you can show fallback."</p> <p dir="auto">What it actually says is: "I'm okay with this update to not happen within this time <em>since previous update</em>." Meaning if nothing happened for some time, fallback will show up immediately.</p> <p dir="auto">Here's this case reproduced in sandbox: <a href="https://codesandbox.io/s/romantic-chebyshev-n59dk" rel="nofollow">https://codesandbox.io/s/romantic-chebyshev-n59dk</a></p> <p dir="auto">Fun thing I noticed: it works as expected if I repeatedly perform updates anywhere in my App. So it may be hard to catch in real world.</p> <p dir="auto">My (unfamiliar with codebase) theory is that expiration time for my update is based on last update (commit?) time, but should've been based on the time it was triggered??</p> <p dir="auto">I know that this is unstable API and I might be misunderstanding something. Hope my case helps!</p> <hr> <p dir="auto">React 16.10.1<br> Tested on MacOS 10.4: Safari 13.0.1, Chrome 77</p>
1
<h2 dir="auto">Add support to FancyZones editor for pixel coordinates to allow for fine-grained FancyZones setups</h2> <p dir="auto">The idea is to describe/configure the FancyZone rectangles as origin + dimensions in pixels in the UI.</p> <p dir="auto">This would help for video streaming and screen sharing setups, that just want to share parts of the screen, but have accurate window place. An example usage is in conjunction with <a href="https://obsproject.com/" rel="nofollow">OBS Studio</a> and the crop screen feature (I am already using it like, but configuring the zones visually is prone to a lot of try and error).</p> <p dir="auto">If the amount of work for this is reasonable, I'd also love to help contributing this feature.</p> <hr> <p dir="auto">If you'd like to see this feature implemented, add a <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji> reaction to this post.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Sizing of custom zones in editor by dragging mouse is a little bit coarse (hit and miss) in terms of getting close to edges of screen symmetrically and allowing window edges of multiple zones to line up neatly. Some possible solutions are suggested for consideration.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <ol dir="auto"> <li> <p dir="auto">Perhaps have an option for the editor to snap to a grid of user specified n pixels.</p> </li> <li> <p dir="auto">Perhaps have optional ability to input window dimension and position directly in both absolute terms (n x n pixels) and in terms of percentage of screen width and height.</p> </li> </ol>
1
<p dir="auto">This has long been missing from JS/TS environments: the ability to easily serialize and reify a function, along with its contextual dependencies. I see this being useful to enable colocation of code intended for execution in different environments. This will be useful to the creation of experiences that blend build time, server side, and frontend code.</p> <p dir="auto">Take the NextJS 9.3 experience, for instance:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {getDynamicValue} from &quot;./somewhere&quot;; // we DO NOT want this import to appear in the frontend code import {sensitiveFn} from &quot;./sensitive-module&quot;; // gather some values, on which our fns will depend const GREETING_ENDING = await getDynamicValue(); const USED_IN_BOTH_ENVIRONMENTS = await getDynamicValue(); // export fn for the serverless environment export const getServerSideProps = () =&gt; { sensitiveFn(); console.log(USED_IN_BOTH_ENVIRONMENTS); return { name: &quot;Deno&quot;, } } // export the front-end component export default (props: {name: string}) =&gt; { console.log(USED_IN_BOTH_ENVIRONMENTS); return ( &lt;div&gt; Hello {props.name}{GREETING_ENDING} &lt;/div&gt; ) }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">getDynamicValue</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"./somewhere"</span><span class="pl-kos">;</span> <span class="pl-c">// we DO NOT want this import to appear in the frontend code</span> <span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-s1">sensitiveFn</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"./sensitive-module"</span><span class="pl-kos">;</span> <span class="pl-c">// gather some values, on which our fns will depend</span> <span class="pl-k">const</span> <span class="pl-smi">GREETING_ENDING</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">getDynamicValue</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-smi">USED_IN_BOTH_ENVIRONMENTS</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">getDynamicValue</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// export fn for the serverless environment</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-en">getServerSideProps</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">sensitiveFn</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">USED_IN_BOTH_ENVIRONMENTS</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Deno"</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c">// export the front-end component</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-kos">{</span><span class="pl-c1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-smi">USED_IN_BOTH_ENVIRONMENTS</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> Hello <span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">}</span><span class="pl-kos">{</span><span class="pl-smi">GREETING_ENDING</span><span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">While this example doesn't perfectly-illustrate NextJS constraints (the top-level awaiting of dynamic values), it conveys the use case nonetheless: the build process is responsible for extracting the page component (<code class="notranslate">default</code>), along with a serverless pre-rendering handler (<code class="notranslate">getServerSideProps</code>). These functions make use of in-scope variables, some of which cannot be statically analyzed. I believe it will become increasingly important to have a standard approach to capturing any given function. Let's also take a look at the serverless use case:</p> <p dir="auto">In the <a href="https://github.com/aws/aws-cdk">aws-cdk</a>, users describe their infrastructure separately from the runtime code that executes on that infrastructure:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const getOneLambda = new lambda.Function(this, 'getOneItemFunction', { code: new lambda.AssetCode('src'), handler: 'get-one.handler', runtime: lambda.Runtime.NODEJS_10_X, environment: { TABLE_NAME: dynamoTable.tableName, PRIMARY_KEY: 'itemId' } });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">getOneLambda</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">lambda</span><span class="pl-kos">.</span><span class="pl-c1">Function</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s">'getOneItemFunction'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">code</span>: <span class="pl-k">new</span> <span class="pl-s1">lambda</span><span class="pl-kos">.</span><span class="pl-c1">AssetCode</span><span class="pl-kos">(</span><span class="pl-s">'src'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">handler</span>: <span class="pl-s">'get-one.handler'</span><span class="pl-kos">,</span> <span class="pl-c1">runtime</span>: <span class="pl-s1">lambda</span><span class="pl-kos">.</span><span class="pl-c1">Runtime</span><span class="pl-kos">.</span><span class="pl-c1">NODEJS_10_X</span><span class="pl-kos">,</span> <span class="pl-c1">environment</span>: <span class="pl-kos">{</span> <span class="pl-c1">TABLE_NAME</span>: <span class="pl-s1">dynamoTable</span><span class="pl-kos">.</span><span class="pl-c1">tableName</span><span class="pl-kos">,</span> <span class="pl-c1">PRIMARY_KEY</span>: <span class="pl-s">'itemId'</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">If there were a seamless mechanism to serialize a function, one could enable the following DX:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as getOne from &quot;./src/get-one&quot;; const getOneLambda = new lambda.Function(this, 'getOneItemFunction', getOne.handler);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">getOne</span> <span class="pl-k">from</span> <span class="pl-s">"./src/get-one"</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">getOneLambda</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">lambda</span><span class="pl-kos">.</span><span class="pl-c1">Function</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s">'getOneItemFunction'</span><span class="pl-kos">,</span> <span class="pl-s1">getOne</span><span class="pl-kos">.</span><span class="pl-c1">handler</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">The location of the code and handler are no longer necessary, the runtime is inferred as the currently-executing runtime, and the environment variables can be directly referenced from within the Lamdba handler.</p> <p dir="auto"><a href="https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/runtime/closure/createClosure.ts">Here's Pulumi's approach</a> to this problem. They're using V8 stack tracing and the TypeScript compiler at runtime.</p> <p dir="auto">Apologies that I cannot offer any suggestions as to how the ideal implementation looks. Not sure if it lays in Rusty V8 and Deno core, or if this would better-exist as a 3rd-party library. Nevertheless, I hope you'll consider this feature request, as I do believe it paves the way for much better experiences in many domains.</p> <p dir="auto">Thank you for your consideration.</p>
<p dir="auto">Hi, I'm trying out the unstable <code class="notranslate">Deno.upgradeWebSocket</code> and encountered an issue accepting a WebSocket from Firefox.</p> <p dir="auto">Firefox is sending this <code class="notranslate">connection: "keep-alive, Upgrade"</code> header when connecting to a websocket. That causes throw <a href="https://github.com/denoland/deno/blob/8b34f07bb000a16b60b119ee24f5c0b4a5f7f937/extensions/http/01_http.js#L324">here</a></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" function upgradeWebSocket(request, options = {}) { // ... if (request.headers.get(&quot;connection&quot;)?.toLowerCase() !== &quot;upgrade&quot;) { throw new TypeError( &quot;Invalid Header: 'connection' header must be 'Upgrade'&quot;, ); } // ... "><pre class="notranslate"> <span class="pl-k">function</span> <span class="pl-en">upgradeWebSocket</span><span class="pl-kos">(</span><span class="pl-s1">request</span><span class="pl-kos">,</span> <span class="pl-s1">options</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">request</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"connection"</span><span class="pl-kos">)</span><span class="pl-kos">?.</span><span class="pl-en">toLowerCase</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">!==</span> <span class="pl-s">"upgrade"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">TypeError</span><span class="pl-kos">(</span> <span class="pl-s">"Invalid Header: 'connection' header must be 'Upgrade'"</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// ...</span><span class="pl-kos"></span></pre></div> <p dir="auto">while the <a href="https://github.com/denoland/deno_std/blob/bf73521428ce724d31dba0d403d14acc929f39ab/ws/mod.ts#L396">current std logic for accepting sockets</a> doesn't care about the <code class="notranslate">connection</code> header at all.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function acceptable(req: { headers: Headers }): boolean { const upgrade = req.headers.get(&quot;upgrade&quot;); if (!upgrade || upgrade.toLowerCase() !== &quot;websocket&quot;) { return false; } const secKey = req.headers.get(&quot;sec-websocket-key&quot;); return ( req.headers.has(&quot;sec-websocket-key&quot;) &amp;&amp; typeof secKey === &quot;string&quot; &amp;&amp; secKey.length &gt; 0 ); }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">acceptable</span><span class="pl-kos">(</span><span class="pl-s1">req</span>: <span class="pl-kos">{</span> <span class="pl-c1">headers</span>: <span class="pl-smi">Headers</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">upgrade</span> <span class="pl-c1">=</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"upgrade"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">upgrade</span> <span class="pl-c1">||</span> <span class="pl-s1">upgrade</span><span class="pl-kos">.</span><span class="pl-en">toLowerCase</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">!==</span> <span class="pl-s">"websocket"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">secKey</span> <span class="pl-c1">=</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"sec-websocket-key"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">headers</span><span class="pl-kos">.</span><span class="pl-en">has</span><span class="pl-kos">(</span><span class="pl-s">"sec-websocket-key"</span><span class="pl-kos">)</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-k">typeof</span> <span class="pl-s1">secKey</span> <span class="pl-c1">===</span> <span class="pl-s">"string"</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">secKey</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">0</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
0
<p dir="auto">Using function shorthand in Object literals:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var store = { save() { }, load() { }, delete() { }, }"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">store</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-en">save</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">delete</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Generates this JavaScript</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; var store = { save: function save() {}, load: function load() {}, &quot;delete&quot;: function delete() {} };"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">store</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-en">save</span>: <span class="pl-k">function</span> <span class="pl-en">save</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">load</span>: <span class="pl-k">function</span> <span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"delete"</span>: <span class="pl-k">function</span> <span class="pl-en">delete</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">The problem is here — delete is a reserved word and cannot be used as an identifier name in function declarations:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;delete&quot;: function delete() {} }; ^^^^^^"><pre class="notranslate"><code class="notranslate"> "delete": function delete() {} }; ^^^^^^ </code></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var foo = { try() {}, throw() {}, catch() {}, switch() {}, // etc. }"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">throw</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">switch</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">// etc.</span> <span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SyntaxError: Unexpected token catch at Function (native) at compile (https://6to5.org/repl.html:200:33)"><pre class="notranslate">SyntaxError: <span class="pl-v">Unexpected</span> <span class="pl-s1">token</span> <span class="pl-k">catch</span> <span class="pl-s1">at</span> <span class="pl-v">Function</span> <span class="pl-kos">(</span><span class="pl-s1">native</span><span class="pl-kos">)</span> <span class="pl-s1">at</span> <span class="pl-s1">compile</span> <span class="pl-kos">(</span><span class="pl-s1">https</span>:<span class="pl-c">//6to5.org/repl.html:200:33)</span></pre></div> <p dir="auto">This was working in 1.x.</p>
1
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RLH/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RLH">@RLH</a> and I have been discussing this problem for the past week. This issue is to track our thoughts.</p> <p dir="auto">The current GC pacer is conservative about scheduling mutator assists and this leads to a cycle where we over-assist (use too much CPU for GC) and under-shoot the heap goal.</p> <p dir="auto">Specifically, GC currently assumes it may have to scan the entire live heap before the live heap size reaches the heap goal. It sets the assist ratio accordingly. If the reachable heap is growing, this conservative assumption is necessary to prevent the mutator from outpacing the garbage collector and spiraling the heap size up. However, in steady state (where the reachable heap size is roughly the same as it was the last GC cycle), this means we'll finish garbage collection when we're less than 100/(GOGC+100) of the way from the trigger to the goal (1/2 way for GOGC=100; 1/4 way for GOGC=300; etc).</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2688315/14031881/762a8fd4-f1e5-11e5-990f-b35e165ec558.png"><img src="https://cloud.githubusercontent.com/assets/2688315/14031881/762a8fd4-f1e5-11e5-990f-b35e165ec558.png" alt="overassist" style="max-width: 100%;"></a></p> <p dir="auto">You might think the trigger controller would adapt by setting the GC trigger lower in response to the over-utilization, but in fact, this drives the trigger controller into a state of persistent CPU over-utilization and heap under-shoot. Currently, the trigger controller will leave the trigger where it is if we're anywhere on the white edge between CPU utilization and heap over-shoot shown below:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2688315/14031986/229bc756-f1e6-11e5-832e-76109cbe5f04.png"><img src="https://cloud.githubusercontent.com/assets/2688315/14031986/229bc756-f1e6-11e5-832e-76109cbe5f04.png" alt="trigger" style="max-width: 100%;"></a></p> <p dir="auto">The under-shoot caused by the over-assist forces the trigger controller to the left of the ideal point on this curve. Since this persists, we eventually settle well to the left of the ideal, repeatedly setting the trigger too close to the goal, which leads to the next cycle setting a high assist ratio and again finishing early.</p> <p dir="auto">This is particularly visible in applications with a high allocation rate and/or high GOGC.</p>
<p dir="auto">by <strong>dop251</strong>:</p> <pre class="notranslate">What steps will reproduce the problem? 1. Create a package with the following code: package bug type S struct {} func (s *S) test() { goto end end: return } 2. Create another package that imports the first one: package importbug import ( _ "bug" ) 3. Run 'go install' on that package What is the expected output? none What do you see instead? ./bug.go:4: syntax error: unexpected &lt; Which compiler are you using (5g, 6g, 8g, gccgo)? Which operating system are you using? Linux/amd64 Which version are you using? (run 'go version') 1.2 Please provide any additional information below.</pre>
0
<h3 dir="auto">Is there an existing issue for this?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li> </ul> <h3 dir="auto">Current Behavior</h3> <p dir="auto">I have <code class="notranslate">prettier-plugin-packagejson</code> installed (which has <code class="notranslate">[email protected]</code> as a dependency)</p> <p dir="auto">And trying to run <code class="notranslate">npx [email protected]</code> because I want to use version 1.48, before <a href="https://github.com/keithamus/sort-package-json/pull/206" data-hovercard-type="pull_request" data-hovercard-url="/keithamus/sort-package-json/pull/206/hovercard">this tragic PR was merged</a></p> <p dir="auto">But npx picks up version 1.51.0 which is in my local deps, and in PATH. But it's the wrong version.</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">npx should make sure that it's running version <code class="notranslate">1.48</code>, as requested.</p> <h3 dir="auto">Steps To Reproduce</h3> <ol dir="auto"> <li>Make sure <code class="notranslate">sort-package-json</code> is not installed globally (<code class="notranslate">npm rm sort-package-json</code>)</li> <li>Make sure it's not in PATH: <code class="notranslate">which sort-package-json</code> should not return anything</li> <li>Do <code class="notranslate">npm init</code></li> <li>Add these two scripts in <code class="notranslate">package.json</code>: <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;z&quot;: &quot;should be last&quot;, &quot;a&quot;: &quot;should be first&quot;"><pre class="notranslate"><code class="notranslate">"z": "should be last", "a": "should be first" </code></pre></div> </li> <li>Do <code class="notranslate">npm i prettier-plugin-packagejson</code></li> <li>Run <code class="notranslate">npx [email protected]</code></li> <li>Observe scripts still not sorted, because 1.51 was used (<code class="notranslate">cat package.json</code>, see "z" will be still before "a")</li> </ol> <p dir="auto">Optional:</p> <ol start="8" dir="auto"> <li>Remove local deps: <code class="notranslate">rm -rf ./node_modules/</code></li> <li>Run <code class="notranslate">npx [email protected]</code> again</li> <li>Observe scripts are now sorted because 1.48 was used (<code class="notranslate">cat package.json</code>, see "a" will be before "z")</li> </ol> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Ubuntu 20 (WSL)</li> <li>Node: 16.7.0</li> <li>npm: 7.19.0</li> </ul>
<h3 dir="auto">Current Behavior:</h3> <p dir="auto">running <code class="notranslate">npx @package@version</code> generate it with the current install version</p> <h3 dir="auto">Expected Behavior:</h3> <p dir="auto">it should be generated with the given version</p> <h3 dir="auto">Steps To Reproduce:</h3> <p dir="auto">ex. steps to reproduce the behavior:</p> <ol dir="auto"> <li>run <code class="notranslate">npm i -g npm@latest</code> to install npm 7</li> <li>run <code class="notranslate">npx @angular/cli@next new</code></li> <li>answer all questions of the angular cli, it doesn't matter what the answers are</li> <li>it will install angular 11 (while next is 12)</li> </ol> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>OS: Windows 10</li> <li>Node: 14.16.1</li> <li>npm: 7.12.0 (working fine with 6.14.13)</li> </ul>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: xxx</li> <li>Operating System version: xxx</li> <li>Java version: xxx</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.2</li> <li>Operating System version: x86_64 GNU/Linux</li> <li>Java version: 1.7.0_80</li> </ul> <h3 dir="auto">Step to reproduce this issue</h3> <ol dir="auto"> <li>IPV6-zookeeper 连接地址:修改provide端连接zookeeper-IPV6的地址<br> 2.启动错误信息:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.NumberFormatException: For input string: &quot;:d243:1eff:fefa:8a47]:12189&quot; at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.7.0_80] at java.lang.Integer.parseInt(Integer.java:492) ~[?:1.7.0_80] at java.lang.Integer.parseInt(Integer.java:527) ~[?:1.7.0_80] at com.alibaba.dubbo.common.URL.valueOf(URL.java:239) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.common.utils.UrlUtils.parseURL(UrlUtils.java:68) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.common.utils.UrlUtils.parseURLs(UrlUtils.java:137) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:190) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:356) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:317) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49) ~[dubbo-2.6.2.jar:2.6.2]"><pre class="notranslate"><code class="notranslate">java.lang.NumberFormatException: For input string: ":d243:1eff:fefa:8a47]:12189" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.7.0_80] at java.lang.Integer.parseInt(Integer.java:492) ~[?:1.7.0_80] at java.lang.Integer.parseInt(Integer.java:527) ~[?:1.7.0_80] at com.alibaba.dubbo.common.URL.valueOf(URL.java:239) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.common.utils.UrlUtils.parseURL(UrlUtils.java:68) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.common.utils.UrlUtils.parseURLs(UrlUtils.java:137) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:190) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:356) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:317) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123) ~[dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49) ~[dubbo-2.6.2.jar:2.6.2] </code></pre></div>
0
<blockquote> <p dir="auto">Issue originally reported by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/babel-bot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/babel-bot">@babel-bot</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="201397492" data-permission-text="Title is private" data-url="https://github.com/babel/babylon/issues/306" data-hovercard-type="issue" data-hovercard-url="/babel/babylon/issues/306/hovercard" href="https://github.com/babel/babylon/issues/306">babel/babylon#306</a></p> </blockquote> <p dir="auto">Original issue submitted by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gsathya/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gsathya">@gsathya</a> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="201167564" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/5145" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/5145/hovercard" href="https://github.com/babel/babel/issues/5145">#5145</a></p> <h3 dir="auto">Input Code</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="result = { __proto__: x, __proto__: y } = value;"><pre class="notranslate"><span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">__proto__</span>: <span class="pl-s1">x</span><span class="pl-kos">,</span> <span class="pl-c1">__proto__</span>: <span class="pl-s1">y</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span></pre></div> <h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3> <p dir="auto">presets - latest</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">No error</p> <h3 dir="auto">Current Behavior</h3> <p dir="auto">Error: <code class="notranslate">Redefinition of __proto__ property</code></p> <h3 dir="auto">Possible Solution</h3> <h3 dir="auto">Context</h3> <h3 dir="auto">Your Environment</h3> <table role="table"> <thead> <tr> <th>software</th> <th>version</th> </tr> </thead> <tbody> <tr> <td>Babel</td> <td></td> </tr> <tr> <td>node</td> <td></td> </tr> <tr> <td>npm</td> <td></td> </tr> <tr> <td>Operating System</td> <td></td> </tr> </tbody> </table>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Property types[0] of UnionTypeAnnotation expected node to be of a type [&quot;FlowType&quot;] but instead got &quot;TSTypeAnnotation&quot; at validate (/work/node_modules/@babel/types/lib/definitions/utils.js:128:13) at validator (/work/node_modules/@babel/types/lib/definitions/utils.js:97:7) at Object.validate (/work/node_modules/@babel/types/lib/definitions/utils.js:172:7) at validate (/work/node_modules/@babel/types/lib/validators/validate.js:17:9) at builder (/work/node_modules/@babel/types/lib/builders/builder.js:46:27) at UnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/generated/index.js:733:31) at Object.createUnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js:20:47) at NodePath.ConditionalExpression (/work/node_modules/@babel/traverse/lib/path/inference/inferers.js:124:14) at NodePath._getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:63:20) at NodePath.getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:29:19)"><pre class="notranslate"><code class="notranslate">TypeError: Property types[0] of UnionTypeAnnotation expected node to be of a type ["FlowType"] but instead got "TSTypeAnnotation" at validate (/work/node_modules/@babel/types/lib/definitions/utils.js:128:13) at validator (/work/node_modules/@babel/types/lib/definitions/utils.js:97:7) at Object.validate (/work/node_modules/@babel/types/lib/definitions/utils.js:172:7) at validate (/work/node_modules/@babel/types/lib/validators/validate.js:17:9) at builder (/work/node_modules/@babel/types/lib/builders/builder.js:46:27) at UnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/generated/index.js:733:31) at Object.createUnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js:20:47) at NodePath.ConditionalExpression (/work/node_modules/@babel/traverse/lib/path/inference/inferers.js:124:14) at NodePath._getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:63:20) at NodePath.getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:29:19) </code></pre></div> <p dir="auto"><strong>Input Code</strong></p> <p dir="auto"><a href="https://github.com/azz/babel-typescript-union-bug">https://github.com/azz/babel-typescript-union-bug</a></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function bug() { const x = 1 ? a() : b(); return [...x]; } function a(): number[] { return []; } function b(): number[] { return []; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">bug</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> ? <span class="pl-en">a</span><span class="pl-kos">(</span><span class="pl-kos">)</span> : <span class="pl-en">b</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">[</span>...<span class="pl-s1">x</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">a</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">b</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Expected behavior/code</strong></p> <p dir="auto"><em>Not like this</em></p> <p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;plugins&quot;: [&quot;@babel/plugin-transform-spread&quot;], &quot;presets&quot;: [&quot;@babel/preset-typescript&quot;] }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/plugin-transform-spread"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-typescript"</span><span class="pl-kos">]</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Environment</strong></p> <ul dir="auto"> <li>Babel version(s): 7.3.3</li> <li>Node/npm version: 6.5.0</li> <li>OS: macOS 10.14.2</li> <li>Monorepo: no</li> <li>How you are using Babel: cli</li> </ul> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">The builder code for <code class="notranslate">plugin-transform-spread</code> is expecting a <code class="notranslate">UnionTypeAnnotation</code> instead of a <code class="notranslate">TSUnionType</code> in order to determine the type of <code class="notranslate">x</code> above, specifically in <code class="notranslate">scope.toArray</code>:</p> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/babel/babel/blob/5bb1bb080f2cb1ff942c940bdb9595a70e6f4706/packages/babel-traverse/src/scope/index.js#L408-L413">babel/packages/babel-traverse/src/scope/index.js</a> </p> <p class="mb-0 color-fg-muted"> Lines 408 to 413 in <a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/5bb1bb080f2cb1ff942c940bdb9595a70e6f4706">5bb1bb0</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L408" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="408"></td> <td id="LC408" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">isIdentifier</span><span class="pl-kos">(</span><span class="pl-s1">node</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L409" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="409"></td> <td id="LC409" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">const</span> <span class="pl-s1">binding</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">getBinding</span><span class="pl-kos">(</span><span class="pl-s1">node</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L410" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="410"></td> <td id="LC410" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">binding</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">binding</span><span class="pl-kos">.</span><span class="pl-c1">constant</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">binding</span><span class="pl-kos">.</span><span class="pl-c1">path</span><span class="pl-kos">.</span><span class="pl-en">isGenericType</span><span class="pl-kos">(</span><span class="pl-s">"Array"</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L411" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="411"></td> <td id="LC411" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1">node</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L412" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="412"></td> <td id="LC412" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> <tr class="border-0"> <td id="L413" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="413"></td> <td id="LC413" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto"><code class="notranslate">isGenericType</code> ends up calling <code class="notranslate">createUnionTypeAnnotation</code>:</p> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/babel/babel/blob/5bb1bb080f2cb1ff942c940bdb9595a70e6f4706/packages/babel-traverse/src/path/inference/inferers.js#L92-L97">babel/packages/babel-traverse/src/path/inference/inferers.js</a> </p> <p class="mb-0 color-fg-muted"> Lines 92 to 97 in <a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/5bb1bb080f2cb1ff942c940bdb9595a70e6f4706">5bb1bb0</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L92" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="92"></td> <td id="LC92" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-v">ConditionalExpression</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td> </tr> <tr class="border-0"> <td id="L93" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="93"></td> <td id="LC93" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">createUnionTypeAnnotation</span><span class="pl-kos">(</span><span class="pl-kos">[</span> </td> </tr> <tr class="border-0"> <td id="L94" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="94"></td> <td id="LC94" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"consequent"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">getTypeAnnotation</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L95" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="95"></td> <td id="LC95" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">"alternate"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">getTypeAnnotation</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> </td> </tr> <tr class="border-0"> <td id="L96" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="96"></td> <td id="LC96" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td> </tr> <tr class="border-0"> <td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td> <td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Which creates a <code class="notranslate">UnionTypeAnnotation</code>, which works for Flow, but not TypeScript.</p>
0
<p dir="auto">Tab-completing a name prefixed with <code class="notranslate">@</code>, like <code class="notranslate">@undefined.&lt;tab&gt;</code> shows an error, when i think ideally it would just do nothing. I ran into this when trying to type <code class="notranslate">@Meta.dump</code> and save myself those 4 extra keystrokes.</p> <p dir="auto">Here's a longer story, with example (using Julia v1.6.2):</p> <p dir="auto">In the REPL, you can tab-complete to get a list of accessible name e.g.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Meta. # &lt;tab&gt; @dump is_meta_expr_head parse @lower isbinaryoperator parseall ParseError isexpr parseatom _instantiate_type_in_env isidentifier partially_inline! _parse_string isoperator quot _partially_inline! ispostfixoperator replace_sourceloc! eval isunaryoperator sexpr_indent_width include lower show_sexpr julia&gt; Meta."><pre class="notranslate">julia<span class="pl-k">&gt;</span> Meta. <span class="pl-c"><span class="pl-c">#</span> &lt;tab&gt; </span> <span class="pl-c1">@dump</span> is_meta_expr_head parse <span class="pl-c1">@lower</span> isbinaryoperator parseall ParseError isexpr parseatom _instantiate_type_in_env isidentifier partially_inline! _parse_string isoperator quot _partially_inline! ispostfixoperator replace_sourceloc! eval isunaryoperator sexpr_indent_width include lower show_sexpr julia<span class="pl-k">&gt;</span> Meta.</pre></div> <p dir="auto">And if you try to tab-complete after an undefined name, then nothing happens (well, the little <code class="notranslate">julia&gt;</code> prompt will flash, which is cute and helpful, but there'l be no output)</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Nonexistant. # &lt;tab&gt; ...nothing happens"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Nonexistant. <span class="pl-c"><span class="pl-c">#</span> &lt;tab&gt; ...nothing happens</span></pre></div> <p dir="auto">You can (unfortunately, in my view) spell macros like <code class="notranslate">Meta.@dump</code> as <code class="notranslate">@Meta.dump</code></p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Meta.@dump 1 + 2 Expr head: Symbol call args: Array{Any}((3,)) 1: Symbol + 2: Int64 1 3: Int64 2 julia&gt; @Meta.dump 1 + 2 Expr head: Symbol call args: Array{Any}((3,)) 1: Symbol + 2: Int64 1 3: Int64 2"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Meta<span class="pl-k">.</span><span class="pl-c1">@dump</span> <span class="pl-c1">1</span> <span class="pl-k">+</span> <span class="pl-c1">2</span> Expr head<span class="pl-k">:</span> Symbol call args<span class="pl-k">:</span> <span class="pl-c1">Array</span><span class="pl-c1">{Any}</span>((<span class="pl-c1">3</span>,)) <span class="pl-c1">1</span><span class="pl-k">:</span> Symbol <span class="pl-k">+</span> <span class="pl-c1">2</span><span class="pl-k">:</span> Int64 <span class="pl-c1">1</span> <span class="pl-c1">3</span><span class="pl-k">:</span> Int64 <span class="pl-c1">2</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">@Meta</span><span class="pl-k">.</span>dump <span class="pl-c1">1</span> <span class="pl-k">+</span> <span class="pl-c1">2</span> Expr head<span class="pl-k">:</span> Symbol call args<span class="pl-k">:</span> <span class="pl-c1">Array</span><span class="pl-c1">{Any}</span>((<span class="pl-c1">3</span>,)) <span class="pl-c1">1</span><span class="pl-k">:</span> Symbol <span class="pl-k">+</span> <span class="pl-c1">2</span><span class="pl-k">:</span> Int64 <span class="pl-c1">1</span> <span class="pl-c1">3</span><span class="pl-k">:</span> Int64 <span class="pl-c1">2</span></pre></div> <p dir="auto">But if you combine these two things and try to tab-complete <code class="notranslate">@Meta.&lt;tab&gt;</code>, then a big ugly error message is shown:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @Meta.┌ Error: Error in the keymap │ exception = │ LoadError: UndefVarError: @Meta not defined │ Stacktrace: │ [1] top-level scope │ @ :0 │ [2] lower │ @ ./meta.jl:165 [inlined] │ [3] get_type(sym::Expr, fn::Module) │ @ REPL.REPLCompletions /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:459 │ [4] complete_symbol(sym::String, ffunc::REPL.REPLCompletions.var&quot;#34#37&quot;, context_module::Module) │ @ REPL.REPLCompletions /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:153 │ [5] completions(string::String, pos::Int64, context_module::Module) │ @ REPL.REPLCompletions /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:774 │ [6] completions │ @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:638 [inlined] │ [7] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState) │ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:439 │ [8] complete_line(s::REPL.LineEdit.PromptState, repeats::Int64) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:348 │ [9] complete_line(s::REPL.LineEdit.MIState) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:339 │ [10] edit_tab(s::REPL.LineEdit.MIState, jump_spaces::Bool, delete_trailing::Bool) (repeats 2 times) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2118 │ [11] (::REPL.LineEdit.var&quot;#109#162&quot;)(::REPL.LineEdit.MIState, ::Any, ::Vararg{Any, N} where N) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2159 │ [12] #invokelatest#2 │ @ ./essentials.jl:708 [inlined] │ [13] invokelatest │ @ ./essentials.jl:706 [inlined] │ [14] (::REPL.LineEdit.var&quot;#22#23&quot;{REPL.LineEdit.var&quot;#109#162&quot;, String})(s::Any, p::Any) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:1414 │ [15] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2534 │ [16] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState) │ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2436 │ [17] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef) │ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126 │ [18] (::REPL.var&quot;#44#49&quot;{REPL.LineEditREPL, REPL.REPLBackendRef})() │ @ REPL ./task.jl:411 │ in expression starting at none:1 └ @ REPL.LineEdit /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2536 julia&gt; julia&gt;"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@Meta</span>.┌ Error<span class="pl-k">:</span> Error <span class="pl-k">in</span> the keymap │ exception <span class="pl-k">=</span> │ LoadError<span class="pl-k">:</span> UndefVarError<span class="pl-k">:</span> <span class="pl-c1">@Meta</span> not defined │ Stacktrace<span class="pl-k">:</span> │ [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope │ @ :<span class="pl-c1">0</span> │ [<span class="pl-c1">2</span>] lower │ @ <span class="pl-k">./</span>meta<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">165</span> [inlined] │ [<span class="pl-c1">3</span>] <span class="pl-c1">get_type</span>(sym<span class="pl-k">::</span><span class="pl-c1">Expr</span>, fn<span class="pl-k">::</span><span class="pl-c1">Module</span>) │ @ REPL<span class="pl-k">.</span>REPLCompletions <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPLCompletions<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">459</span> │ [<span class="pl-c1">4</span>] <span class="pl-c1">complete_symbol</span>(sym<span class="pl-k">::</span><span class="pl-c1">String</span>, ffunc<span class="pl-k">::</span><span class="pl-c1">REPL.REPLCompletions.var"#34#37"</span>, context_module<span class="pl-k">::</span><span class="pl-c1">Module</span>) │ @ REPL<span class="pl-k">.</span>REPLCompletions <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPLCompletions<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">153</span> │ [<span class="pl-c1">5</span>] <span class="pl-c1">completions</span>(string<span class="pl-k">::</span><span class="pl-c1">String</span>, pos<span class="pl-k">::</span><span class="pl-c1">Int64</span>, context_module<span class="pl-k">::</span><span class="pl-c1">Module</span>) │ @ REPL<span class="pl-k">.</span>REPLCompletions <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPLCompletions<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">774</span> │ [<span class="pl-c1">6</span>] completions │ @ <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPLCompletions<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">638</span> [inlined] │ [<span class="pl-c1">7</span>] <span class="pl-c1">complete_line</span>(c<span class="pl-k">::</span><span class="pl-c1">REPL.REPLCompletionProvider</span>, s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.PromptState</span>) │ @ REPL <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">439</span> │ [<span class="pl-c1">8</span>] <span class="pl-c1">complete_line</span>(s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.PromptState</span>, repeats<span class="pl-k">::</span><span class="pl-c1">Int64</span>) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">348</span> │ [<span class="pl-c1">9</span>] <span class="pl-c1">complete_line</span>(s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.MIState</span>) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">339</span> │ [<span class="pl-c1">10</span>] <span class="pl-c1">edit_tab</span>(s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.MIState</span>, jump_spaces<span class="pl-k">::</span><span class="pl-c1">Bool</span>, delete_trailing<span class="pl-k">::</span><span class="pl-c1">Bool</span>) (repeats <span class="pl-c1">2</span> times) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">2118</span> │ [<span class="pl-c1">11</span>] (<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.var"#109#162"</span>)(<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.MIState</span>, <span class="pl-k">::</span><span class="pl-c1">Any</span>, <span class="pl-k">::</span><span class="pl-c1">Vararg{Any, N}</span> <span class="pl-k">where</span> N) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">2159</span> │ [<span class="pl-c1">12</span>] <span class="pl-c"><span class="pl-c">#</span>invokelatest#2</span> │ @ <span class="pl-k">./</span>essentials<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">708</span> [inlined] │ [<span class="pl-c1">13</span>] invokelatest │ @ <span class="pl-k">./</span>essentials<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">706</span> [inlined] │ [<span class="pl-c1">14</span>] (<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.var"#22#23"</span>{REPL<span class="pl-k">.</span>LineEdit<span class="pl-k">.</span><span class="pl-c1">var"#109#162"</span>, String})(s<span class="pl-k">::</span><span class="pl-c1">Any</span>, p<span class="pl-k">::</span><span class="pl-c1">Any</span>) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1414</span> │ [<span class="pl-c1">15</span>] <span class="pl-c1">prompt!</span>(term<span class="pl-k">::</span><span class="pl-c1">REPL.Terminals.TextTerminal</span>, prompt<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.ModalInterface</span>, s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.MIState</span>) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">2534</span> │ [<span class="pl-c1">16</span>] <span class="pl-c1">run_interface</span>(terminal<span class="pl-k">::</span><span class="pl-c1">REPL.Terminals.TextTerminal</span>, m<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.ModalInterface</span>, s<span class="pl-k">::</span><span class="pl-c1">REPL.LineEdit.MIState</span>) │ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">2436</span> │ [<span class="pl-c1">17</span>] <span class="pl-c1">run_frontend</span>(repl<span class="pl-k">::</span><span class="pl-c1">REPL.LineEditREPL</span>, backend<span class="pl-k">::</span><span class="pl-c1">REPL.REPLBackendRef</span>) │ @ REPL <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">1126</span> │ [<span class="pl-c1">18</span>] (<span class="pl-k">::</span><span class="pl-c1">REPL.var"#44#49"</span>{REPL<span class="pl-k">.</span>LineEditREPL, REPL<span class="pl-k">.</span>REPLBackendRef})() │ @ REPL <span class="pl-k">./</span>task<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">411</span> │ <span class="pl-k">in</span> expression starting at none<span class="pl-k">:</span><span class="pl-c1">1</span> └ @ REPL<span class="pl-k">.</span>LineEdit <span class="pl-k">/</span>Users<span class="pl-k">/</span>julia<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>worker<span class="pl-k">/</span>package_macos64<span class="pl-k">/</span>build<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">6</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>LineEdit<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">2536</span> julia<span class="pl-k">&gt;</span> julia<span class="pl-k">&gt;</span></pre></div> <p dir="auto">(as this shows, even in the case where these is a valid name available e.g. <code class="notranslate">@Meta.dump</code>)</p> <p dir="auto">I think the appropriate behaviour here would be either (i) do nothing (treat <code class="notranslate">@Meta.&lt;tab&gt;</code> or <code class="notranslate">@undefined.&lt;tab&gt;</code> same as <code class="notranslate">Nonexistant.&lt;tab&gt;</code>), or possibly (ii) show the <em>macro</em> names that are valid e.g. <code class="notranslate">@Meta.&lt;tab&gt;</code> would show</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @Meta. # &lt;tab&gt; dump lower"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@Meta</span>. <span class="pl-c"><span class="pl-c">#</span> &lt;tab&gt;</span> dump lower</pre></div> <p dir="auto">But really i'd be happy with the first option (i) do nothing.</p>
<p dir="auto">Open julia with REPL, type <code class="notranslate">@nonexist.</code> and hit Tab:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: https://docs.julialang.org _ _ _| |_ __ _ | Type &quot;?help&quot; for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.7.0-DEV.5138 (2018-05-19 22:52 UTC) _/ |\__'_|_|_|\__'_| | Commit a465d33f6 (1 day old master) |__/ | x86_64-redhat-linux julia&gt; @nonexist.┌ Error: Error in the keymap │ exception = │ LoadError: UndefVarError: @nonexist not defined │ Stacktrace: │ [1] top-level scope │ [2] lower at ./meta.jl:68 [inlined] │ [3] get_type(::Expr, ::Module) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:362 │ [4] complete_symbol(::String, ::getfield(REPL.REPLCompletions, Symbol(&quot;##15#17&quot;))) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:63 │ [5] completions(::String, ::Int64) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:648 ... "><pre class="notranslate"><code class="notranslate"> _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: https://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.7.0-DEV.5138 (2018-05-19 22:52 UTC) _/ |\__'_|_|_|\__'_| | Commit a465d33f6 (1 day old master) |__/ | x86_64-redhat-linux julia&gt; @nonexist.┌ Error: Error in the keymap │ exception = │ LoadError: UndefVarError: @nonexist not defined │ Stacktrace: │ [1] top-level scope │ [2] lower at ./meta.jl:68 [inlined] │ [3] get_type(::Expr, ::Module) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:362 │ [4] complete_symbol(::String, ::getfield(REPL.REPLCompletions, Symbol("##15#17"))) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:63 │ [5] completions(::String, ::Int64) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:648 ... </code></pre></div>
1
<h3 dir="auto">Problem description</h3> <p dir="auto"><code class="notranslate">DatePicker</code> <code class="notranslate">onDismiss</code> function called, when select date.<br> Here's working <a href="https://www.webpackbin.com/bins/-KlPNcoGu2kPB4zDUmwz" rel="nofollow">bin</a> that reproduces the problem.<br> Materi UI version: 0.18.1</p> <p dir="auto">Actually, it worked fine on 0.18.0 version.</p>
<h2 dir="auto">Feature request</h2> <h3 dir="auto">Description</h3> <p dir="auto">I think it's ok to call <code class="notranslate">dismiss</code> function when date is changed. My case:<br> I have two DatePickers, when I select date from first one, it closes (<code class="notranslate">autoOk</code> prop) and then I open second picker automatically with prefilled date (based on value in first picker). If user doesn't change value in second picker, and just close it, it will trigger <code class="notranslate">dismiss</code> function. If user change date, it will trigger only <code class="notranslate">handleTouchTapOk</code> function. I think it's more logical to trigger <code class="notranslate">dismiss</code> always when <code class="notranslate">open</code> changes to <code class="notranslate">false</code>.<br> For now I must use same handler for <code class="notranslate">onDismiss</code> and <code class="notranslate">onChange</code> to catch this case, and I really don't like this solution.</p> <h3 dir="auto">Possible solution</h3> <p dir="auto">before</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" handleTouchTapOk = () =&gt; { if (this.props.onAccept &amp;&amp; !this.refs.calendar.isSelectedDateDisabled()) { this.props.onAccept(this.refs.calendar.getSelectedDate()); } this.setState({ open: false, }); };"><pre class="notranslate"> <span class="pl-en">handleTouchTapOk</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">onAccept</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">isSelectedDateDisabled</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-en">onAccept</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">getSelectedDate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">open</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">after</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" handleTouchTapOk = () =&gt; { if (this.props.onAccept &amp;&amp; !this.refs.calendar.isSelectedDateDisabled()) { this.props.onAccept(this.refs.calendar.getSelectedDate()); } this.dismiss(); };"><pre class="notranslate"> <span class="pl-en">handleTouchTapOk</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-c1">onAccept</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">isSelectedDateDisabled</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">.</span><span class="pl-en">onAccept</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">refs</span><span class="pl-kos">.</span><span class="pl-c1">calendar</span><span class="pl-kos">.</span><span class="pl-en">getSelectedDate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">dismiss</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I can create PR for this.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.2</li> <li>Operating System version: centos 6.8</li> <li>Java version: java 8</li> </ul> <p dir="auto">服务在发布后,请求开始打到我们的api应用,api应用再去调后面的rpc应用,刚开始会产生大量超时,通过日志分析,时间消耗在消费者自身,并非提供者服务慢。请问消费者消费的238ms大概是什么原因导致的,请协助提供一下思路</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <p dir="auto">client elapsed: 238 ms, server elapsed: 65 ms, timeout: 300 ms</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.7</li> <li>Operating System version: macOS</li> <li>Java version: 1.8u251</li> </ul> <p dir="auto">as I use dubbo spring boot , just wonder how to specify the serialization type like kryo or protobuff in <code class="notranslate">@DubboService</code> annotation ?</p>
0
<div class="highlight highlight-source-groovy-gradle notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" //glide compile 'com.github.bumptech.glide:glide:3.7.0' compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'"><pre class="notranslate"> <span class="pl-c"><span class="pl-c">//</span>glide</span> compile <span class="pl-s"><span class="pl-pds">'</span>com.github.bumptech.glide:glide:3.7.0<span class="pl-pds">'</span></span> compile <span class="pl-s"><span class="pl-pds">'</span>com.github.bumptech.glide:okhttp3-integration:1.4.0@aar<span class="pl-pds">'</span></span></pre></div> <p dir="auto">Device/Android Version:<br> Samsung Galaxy7 edge, android 6.0<br> meizu mx5, android 5.0</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" Glide.with(context) .load(url) .asGif() .dontAnimate() .placeholder(R.drawable.ic_stub) .error(R.drawable.ic_error) .into(imageView);"><pre class="notranslate"> <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">context</span>) .<span class="pl-en">load</span>(<span class="pl-s1">url</span>) .<span class="pl-en">asGif</span>() .<span class="pl-en">dontAnimate</span>() .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">ic_stub</span>) .<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">drawable</span>.<span class="pl-s1">ic_error</span>) .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">GIF will show some GIF frame is incomplete, but these GIF in the computer and other applications show no problem, so the GIF itself should be no problem.<br> ps:I try to use fresco no problem</p>
<p dir="auto">Hi! I'm using Glide in a Listview that loads preview images</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(activity) .load(stringUrl) .centerCrop() .crossFade() .into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>) .<span class="pl-en">load</span>(<span class="pl-s1">stringUrl</span>) .<span class="pl-en">centerCrop</span>() .<span class="pl-en">crossFade</span>() .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">How can I fetch this loaded image file from cache?<br> Or better, can I set a name to a file when is saved in cache?</p> <p dir="auto">I know how to get cache directory that uses Glide<br> <code class="notranslate">File cacheFile = Glide.getPhotoCacheDir();</code></p> <p dir="auto">but when I list files I see this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/image_manager_disk_cache/ed35732ad0c7351708bd024cb2b423a055dbe79f592d48f4241940f344f2e75f.0"><pre class="notranslate"><code class="notranslate">/image_manager_disk_cache/ed35732ad0c7351708bd024cb2b423a055dbe79f592d48f4241940f344f2e75f.0 </code></pre></div>
0
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="https://docs.celeryq.dev/en/master/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>:</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.3.0b1 (dawn-chorus) kombu:5.3.0b1 py:3.10.5 billiard:4.0.2 redis:4.3.4 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.15.60-1-MANJARO imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled broker_url: 'redis://localhost:6379//' task_acks_late: True deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.3.0b1 (dawn-chorus) kombu:5.3.0b1 py:3.10.5 billiard:4.0.2 redis:4.3.4 platform -&gt; system:Linux arch:64bit, ELF kernel version:5.15.60-1-MANJARO imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:redis results:disabled broker_url: 'redis://localhost:6379//' task_acks_late: True deprecated_settings: None </code></pre></div> <p dir="auto">The actual commit of <code class="notranslate">celery</code> is <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/ebdf9e53d4b5edd9aa66cb7faf413776dd5d74a5/hovercard" href="https://github.com/celery/celery/commit/ebdf9e53d4b5edd9aa66cb7faf413776dd5d74a5"><tt>ebdf9e5</tt></a> (see PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1368896907" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/7755" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/7755/hovercard" href="https://github.com/celery/celery/pull/7755">#7755</a>).</p> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: 3.8</li> <li><strong>Minimal Celery Version</strong>: master, 5.3.0b1</li> <li><strong>Minimal Kombu Version</strong>: 5.3.0b1</li> <li><strong>Minimal Broker Version</strong>: Redis 5, 6</li> <li><strong>Minimal Result Backend Version</strong>: N/A</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li> <li><strong>Minimal Broker Client Version</strong>: redis==4.3, hiredis==2.0</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==5.1.1 asttokens==2.0.8 async-timeout==4.0.2 backcall==0.2.0 billiard==4.0.2 -e git+https://gitlab.merchise.org/merchise/celery.git@ebdf9e53d4b5edd9aa66cb7faf413776dd5d74a5#egg=celery click==8.1.3 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.2.0 decorator==5.1.1 Deprecated==1.2.13 executing==1.0.0 hiredis==2.0.0 ipython==8.5.0 jedi==0.18.1 kombu==5.3.0b1 matplotlib-inline==0.1.6 packaging==21.3 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 prompt-toolkit==3.0.31 ptyprocess==0.7.0 pure-eval==0.2.2 Pygments==2.13.0 pyparsing==3.0.9 pytz==2022.2.1 redis==4.3.4 six==1.16.0 stack-data==0.5.0 traitlets==5.3.0 vine==5.0.0 wcwidth==0.2.5 wrapt==1.14.1"><pre class="notranslate"><code class="notranslate">amqp==5.1.1 asttokens==2.0.8 async-timeout==4.0.2 backcall==0.2.0 billiard==4.0.2 -e git+https://gitlab.merchise.org/merchise/celery.git@ebdf9e53d4b5edd9aa66cb7faf413776dd5d74a5#egg=celery click==8.1.3 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.2.0 decorator==5.1.1 Deprecated==1.2.13 executing==1.0.0 hiredis==2.0.0 ipython==8.5.0 jedi==0.18.1 kombu==5.3.0b1 matplotlib-inline==0.1.6 packaging==21.3 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 prompt-toolkit==3.0.31 ptyprocess==0.7.0 pure-eval==0.2.2 Pygments==2.13.0 pyparsing==3.0.9 pytz==2022.2.1 redis==4.3.4 six==1.16.0 stack-data==0.5.0 traitlets==5.3.0 vine==5.0.0 wcwidth==0.2.5 wrapt==1.14.1 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto">The client sends an argument of type `datetime.date`, but the task receives an instance of `datetime.datetime`. </p><p dir="auto">I have updated the <code class="notranslate">app/myapp.py</code> example with a simple <code class="notranslate">echo</code> task (see<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1368896907" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/7755" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/7755/hovercard" href="https://github.com/celery/celery/pull/7755">#7755</a>) like this:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@app.task def echo(d): print(repr(d))"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">echo</span>(<span class="pl-s1">d</span>): <span class="pl-en">print</span>(<span class="pl-en">repr</span>(<span class="pl-s1">d</span>))</pre></div> <p dir="auto">I'm running the worker like this:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ celery_broker_url=&quot;redis://localhost/&quot; python myapp.py worker -l INFO"><pre class="notranslate">$ celery_broker_url=<span class="pl-s"><span class="pl-pds">"</span>redis://localhost/<span class="pl-pds">"</span></span> python myapp.py worker -l INFO</pre></div> <p dir="auto">And the client like this:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ celery_broker_url=&quot;redis://localhost/&quot; python -c &quot;import myapp, datetime; myapp.echo.delay(datetime.date.today())&quot;"><pre class="notranslate">$ celery_broker_url=<span class="pl-s"><span class="pl-pds">"</span>redis://localhost/<span class="pl-pds">"</span></span> python -c <span class="pl-s"><span class="pl-pds">"</span>import myapp, datetime; myapp.echo.delay(datetime.date.today())<span class="pl-pds">"</span></span></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">The worker should receive a <code class="notranslate">datetime.date</code>. Expected log:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-09-11 12:16:52,824: WARNING/ForkPoolWorker-8] datetime.date(2022, 9, 11)"><pre class="notranslate"><code class="notranslate">[2022-09-11 12:16:52,824: WARNING/ForkPoolWorker-8] datetime.date(2022, 9, 11) </code></pre></div> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">The worker receives a <code class="notranslate">datetime.datetime</code>. Actual log:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-09-11 12:16:52,823: INFO/MainProcess] Task myapp.echo[6e6eabbf-b4ad-4a21-aee9-69b27d6767dd] received [2022-09-11 12:16:52,824: WARNING/ForkPoolWorker-8] datetime.datetime(2022, 9, 11, 0, 0) [2022-09-11 12:16:52,824: INFO/ForkPoolWorker-8] Task myapp.echo[6e6eabbf-b4ad-4a21-aee9-69b27d6767dd] succeeded in 0.00020399800268933177s: None"><pre class="notranslate"><code class="notranslate">[2022-09-11 12:16:52,823: INFO/MainProcess] Task myapp.echo[6e6eabbf-b4ad-4a21-aee9-69b27d6767dd] received [2022-09-11 12:16:52,824: WARNING/ForkPoolWorker-8] datetime.datetime(2022, 9, 11, 0, 0) [2022-09-11 12:16:52,824: INFO/ForkPoolWorker-8] Task myapp.echo[6e6eabbf-b4ad-4a21-aee9-69b27d6767dd] succeeded in 0.00020399800268933177s: None </code></pre></div>
<p dir="auto">Uhh I don't know if this whole checklist is useful.. Just run <code class="notranslate">celery &lt;anything&gt; --help</code> and instead of printing help it would attempt to run the command instead. E.g. <code class="notranslate">celery worker --help</code> will start worker.</p> <p dir="auto">Tried 4.4.6, works fine.</p> <h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.4.7</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.4.7 (cliffs) kombu:4.6.11 py:3.7.8 billiard:3.6.3.0 py-amqp:2.6.1 platform -&gt; system:Linux arch:64bit kernel version:4.15.0-112-generic imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.7 (cliffs) kombu:4.6.11 py:3.7.8 billiard:3.6.3.0 py-amqp:2.6.1 platform -&gt; system:Linux arch:64bit kernel version:4.15.0-112-generic imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp==2.6.1 billiard==3.6.3.0 celery==4.4.7 importlib-metadata==1.7.0 kombu==4.6.11 pytz==2020.1 vine==1.3.0 zipp==3.1.0"><pre class="notranslate"><code class="notranslate">amqp==2.6.1 billiard==3.6.3.0 celery==4.4.7 importlib-metadata==1.7.0 kombu==4.6.11 pytz==2020.1 vine==1.3.0 zipp==3.1.0 </code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery worker --help"><pre class="notranslate"><code class="notranslate">celery worker --help </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Print help.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Started worker.</p>
0
<p dir="auto">The <code class="notranslate">shared_preferences</code> plugin only works for the app itself, not when running unit tests. To my mind this means that the</p> <p dir="auto">Exception report</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance This test failed after it had already completed. Make sure to use [expectAsync] or the [completes] matcher when testing async code. package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper test/model/Model_test.dart main.&lt;fn&gt;.&lt;fn&gt; MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)"><pre class="notranslate"><code class="notranslate">package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance This test failed after it had already completed. Make sure to use [expectAsync] or the [completes] matcher when testing async code. package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) package:flutter/src/services/platform_channel.dart 278:7 MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _AsyncAwaitCompleter.completeError package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper package:flutter/src/services/platform_channel.dart MethodChannel.invokeMethod package:shared_preferences/shared_preferences.dart 25:27 SharedPreferences.getInstance ===== asynchronous gap =========================== dart:async _asyncThenWrapperHelper test/model/Model_test.dart main.&lt;fn&gt;.&lt;fn&gt; MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) </code></pre></div> <p dir="auto">Flutter doctor -v</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="✓] Flutter (Channel master, v0.10.3-pre.65, on Mac OS X 10.14.1 18B75, locale en-NL) • Flutter version 0.10.3-pre.65 at /Users/sandervanderwal/Developer/flutter • Framework revision 01c7081565 (7 days ago), 2018-10-31 21:12:51 -0700 • Engine revision c79faed71c • Dart version 2.1.0 (build 2.1.0-dev.8.0 bf26f760b1) [✓] Android toolchain - develop for Android devices (Android SDK 28.0.2) • Android SDK at /Users/sandervanderwal/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.1, Build version 10B61 • ios-deploy 1.9.2 • CocoaPods version 1.5.3 [✓] Android Studio (version 3.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 30.0.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [✓] Connected device (2 available) • Turminder Xuss • ca4f8a0ddd55132ab42c253d7496b90a38b6b53c • ios • iOS 12.1 • iPhone 6 • F1C23CB3-7C89-416E-87D0-5CCDC2C89254 • ios • iOS 12.1 (simulator) • No issues found!"><pre class="notranslate"><code class="notranslate">✓] Flutter (Channel master, v0.10.3-pre.65, on Mac OS X 10.14.1 18B75, locale en-NL) • Flutter version 0.10.3-pre.65 at /Users/sandervanderwal/Developer/flutter • Framework revision 01c7081565 (7 days ago), 2018-10-31 21:12:51 -0700 • Engine revision c79faed71c • Dart version 2.1.0 (build 2.1.0-dev.8.0 bf26f760b1) [✓] Android toolchain - develop for Android devices (Android SDK 28.0.2) • Android SDK at /Users/sandervanderwal/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.1, Build version 10B61 • ios-deploy 1.9.2 • CocoaPods version 1.5.3 [✓] Android Studio (version 3.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 30.0.1 • Dart plugin version 181.5656 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) [✓] Connected device (2 available) • Turminder Xuss • ca4f8a0ddd55132ab42c253d7496b90a38b6b53c • ios • iOS 12.1 • iPhone 6 • F1C23CB3-7C89-416E-87D0-5CCDC2C89254 • ios • iOS 12.1 (simulator) • No issues found! </code></pre></div> <p dir="auto">-- Pod update in the iOS folder</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sanders-mbp:ios sandervanderwal$ pod update Update all pods Updating local specs repositories $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master fetch origin --progress remote: Enumerating objects: 19073, done. remote: Counting objects: 100% (19073/19073), done. remote: Compressing objects: 100% (346/346), done. remote: Total 57973 (delta 18823), reused 18706 (delta 18706), pack-reused 38900 Receiving objects: 100% (57973/57973), 6.45 MiB | 8.49 MiB/s, done. Resolving deltas: 100% (39408/39408), completed with 4694 local objects. From https://github.com/CocoaPods/Specs 1032228ce29..a21d78b8fba master -&gt; origin/master $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master reset --hard origin/master Checking out files: 100% (281500/281500), done. HEAD is now at a21d78b8fba [Add] WXWLaunchAdvertisedAdd 0.0.1 warning: inexact rename detection was skipped due to too many files. warning: you may want to set your diff.renameLimit variable to at least 5913 and retry the command. CocoaPods 1.6.0.beta.2 is available. To update use: `sudo gem install cocoapods --pre` [!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.6.0.beta.2 Analyzing dependencies Fetching podspec for `Flutter` from `.symlinks/flutter/ios` Fetching podspec for `flutter_secure_storage` from `.symlinks/plugins/flutter_secure_storage/ios` Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios` Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios` Downloading dependencies Using Flutter (1.0.0) Using flutter_secure_storage (3.1.1) Using image_picker (0.0.1) Using shared_preferences (0.0.1) Generating Pods project Integrating client project Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed. [!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`. sanders-mbp:ios sandervanderwal$ "><pre class="notranslate"><code class="notranslate">sanders-mbp:ios sandervanderwal$ pod update Update all pods Updating local specs repositories $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master fetch origin --progress remote: Enumerating objects: 19073, done. remote: Counting objects: 100% (19073/19073), done. remote: Compressing objects: 100% (346/346), done. remote: Total 57973 (delta 18823), reused 18706 (delta 18706), pack-reused 38900 Receiving objects: 100% (57973/57973), 6.45 MiB | 8.49 MiB/s, done. Resolving deltas: 100% (39408/39408), completed with 4694 local objects. From https://github.com/CocoaPods/Specs 1032228ce29..a21d78b8fba master -&gt; origin/master $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/sandervanderwal/.cocoapods/repos/master reset --hard origin/master Checking out files: 100% (281500/281500), done. HEAD is now at a21d78b8fba [Add] WXWLaunchAdvertisedAdd 0.0.1 warning: inexact rename detection was skipped due to too many files. warning: you may want to set your diff.renameLimit variable to at least 5913 and retry the command. CocoaPods 1.6.0.beta.2 is available. To update use: `sudo gem install cocoapods --pre` [!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.6.0.beta.2 Analyzing dependencies Fetching podspec for `Flutter` from `.symlinks/flutter/ios` Fetching podspec for `flutter_secure_storage` from `.symlinks/plugins/flutter_secure_storage/ios` Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios` Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios` Downloading dependencies Using Flutter (1.0.0) Using flutter_secure_storage (3.1.1) Using image_picker (0.0.1) Using shared_preferences (0.0.1) Generating Pods project Integrating client project Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed. [!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`. sanders-mbp:ios sandervanderwal$ </code></pre></div> <p dir="auto">What is weird is that pub spec.yaml has shared_preferences: ^0.4.3<br> while pod update lists using shared_preferences (0.0.1)</p>
<p dir="auto"><a href="https://flutter.io/setup-windows/#clone-the-repo" rel="nofollow">https://flutter.io/setup-windows/#clone-the-repo</a> currently recommends to add flutter to the <code class="notranslate">PATH</code> with the following command:</p> <div class="highlight highlight-source-batchfile notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setx PATH &quot;%PATH%;&lt;cd&gt;\flutter\bin&quot;"><pre class="notranslate"><span class="pl-k">setx</span> <span class="pl-k">PATH</span> <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">%PATH%</span>;&lt;cd&gt;\flutter\bin<span class="pl-pds">"</span></span></pre></div> <p dir="auto">This is problematic because it messes up the <code class="notranslate">PATH</code> in a bad way (and the result differs depending on if the command is executed in PowerShell or CMD):</p> <p dir="auto">In CMD, the first <code class="notranslate">PATH</code> in the command references to the <em>user</em> PATH while the second instance (<code class="notranslate">%PATH%</code>) is expanded (by CMD) to the <em>combination</em> of user and system PATH. Essentially, this means that the command copies the system PATH into the user PATH and stores system+user PATH in the user PATH variable. This leads to duplication (some values are now present in system and user path) and it is also likely that the new user path will now be larger than the max length for env variables (1024 characters). This causes the PATH to get silently truncated (bad! some values that were in the PATH will get lost!).</p> <p dir="auto">In PowerShell it fails in a different way: The first <code class="notranslate">PATH</code> in the command still references to the <em>user</em> PATH. However, PowerShell does not expand <code class="notranslate">%PATH%</code> to anything and just writes the string <code class="notranslate">%PATH%;&lt;cd&gt;\flutter\bin</code> verbatim into the user PATH variable overwriting whatever used to be in the user PATH variable. The old values of the user path are lost!</p> <p dir="auto">What's the solution?</p> <p dir="auto">Unfortunately, there is no easy build-in way to append anything to the user PATH from CMD or PowerShell. Here are our options:</p> <ul dir="auto"> <li>We could redirect users to the Windows GUI for editing the PATH variable: <ul dir="auto"> <li>Control Panel &gt; User Accounts &gt; User Accounts &gt; Change my environment variables</li> <li>Under "User variables" add a PATH user variable with the full path to <code class="notranslate">flutter\bin</code> as value. Or, if a variable with that name already exists, add the full path to <code class="notranslate">flutter\bin</code> to it separated by <code class="notranslate">;</code>.</li> </ul> </li> <li>We could provide a script to modify the PATH variable directly in the registry. Example for CMD: <ul dir="auto"> <li><code class="notranslate">for /f "skip=2 tokens=3*" %a in ('reg query HKCU\Environment /v PATH') do @if [%b]==[] ( @setx PATH "&lt;path to flutter\bin&gt;;%~a" ) else ( @setx PATH "&lt;path to flutter\bin&gt;;%~a %~b" )</code></li> <li>scary command</li> <li>only works in CMD, would have to provide alternatives for other shells (e.g. PowerShell, etc)</li> </ul> </li> <li>We could ask users to modify the PATH for the current session only: <ul dir="auto"> <li>in CMD: <code class="notranslate">set PATH=C:\src\flutter\bin;%PATH%</code></li> <li>in PowerShell: <code class="notranslate">$env:path="C:\sdfsdf sdf\bin;$env:path"</code></li> <li>PATH modification is not permanent, lost when current shell window is closed</li> <li>need to provide different commands for different shells</li> </ul> </li> </ul> <p dir="auto">Given that the first option is going to be the only one that will work independent of what shell is used, I'd vote for changing the documentation to that one.</p>
0
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ X ] feature request"><pre class="notranslate"><code class="notranslate">[ X ] feature request </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">The current error thrown when a service hasn't been defined in a module is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="zone.js:522 Unhandled Promise rejection: No provider for XService! ; Zone: &lt;root&gt; ; Task: Promise.then ; Value: Error Error at Error.ZoneAwareError (http://localhost:3000/polyfills.bundle.js:3588:33) at ZoneAwareError (http://localhost:3000/polyfills.bundle.js:3585:35) at injectionError (http://localhost:3000/vendor.bundle.js:3087:86) at noProviderError (http://localhost:3000/vendor.bundle.js:3125:12) at ReflectiveInjector_._throwOrNull (http://localhost:3000/vendor.bundle.js:4627:19) at ReflectiveInjector_._getByKeyDefault (http://localhost:3000/vendor.bundle.js:4666:25) at ReflectiveInjector_._getByKey (http://localhost:3000/vendor.bundle.js:4598:25) at ReflectiveInjector_.get (http://localhost:3000/vendor.bundle.js:4467:21) at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:180:107) at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:295:53) at AppModuleInjector.NgModuleInjector.get (http://localhost:3000/vendor.bundle.js:5431:44) at resolveDep (http://localhost:3000/vendor.bundle.js:12836:45) at createClass (http://localhost:3000/vendor.bundle.js:12699:91) at createDirectiveInstance (http://localhost:3000/vendor.bundle.js:12530:37) at createViewNodes (http://localhost:3000/vendor.bundle.js:13879:49)"><pre class="notranslate"><code class="notranslate">zone.js:522 Unhandled Promise rejection: No provider for XService! ; Zone: &lt;root&gt; ; Task: Promise.then ; Value: Error Error at Error.ZoneAwareError (http://localhost:3000/polyfills.bundle.js:3588:33) at ZoneAwareError (http://localhost:3000/polyfills.bundle.js:3585:35) at injectionError (http://localhost:3000/vendor.bundle.js:3087:86) at noProviderError (http://localhost:3000/vendor.bundle.js:3125:12) at ReflectiveInjector_._throwOrNull (http://localhost:3000/vendor.bundle.js:4627:19) at ReflectiveInjector_._getByKeyDefault (http://localhost:3000/vendor.bundle.js:4666:25) at ReflectiveInjector_._getByKey (http://localhost:3000/vendor.bundle.js:4598:25) at ReflectiveInjector_.get (http://localhost:3000/vendor.bundle.js:4467:21) at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:180:107) at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:295:53) at AppModuleInjector.NgModuleInjector.get (http://localhost:3000/vendor.bundle.js:5431:44) at resolveDep (http://localhost:3000/vendor.bundle.js:12836:45) at createClass (http://localhost:3000/vendor.bundle.js:12699:91) at createDirectiveInstance (http://localhost:3000/vendor.bundle.js:12530:37) at createViewNodes (http://localhost:3000/vendor.bundle.js:13879:49) </code></pre></div> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">I'd like to know what class the error originated from. What class is trying to inject XService.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">When a module has been installed via <code class="notranslate">npm install</code> it becomes annoying to debug. Which NgModule is throwing this error ?</p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 4.0.0</p> </li> <li> <p dir="auto"><strong>Language:</strong> [TypeScript 2 ]</p> </li> </ul>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> Actually I have</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;span class=&quot;slds-form-element__help&quot; *ngIf=&quot;form.get('sapNumber').errors?.maxlength&quot; i18n&gt;Maximum de {{max8}} caractères autorisé.&lt;/span&gt; &lt;span class=&quot;slds-form-element__help&quot; *ngIf=&quot;form.get('interfaceAccountNumber').errors?.maxlength&quot; i18n&gt;Maximum de {{max15}} caractères autorisé.&lt;/span&gt; &lt;span class=&quot;slds-form-element__help&quot; *ngIf=&quot;form.get('formDesignation').errors?.maxlength&quot; i18n&gt;Maximum de {{max20}} caractères autorisé.&lt;/span&gt; &lt;span class=&quot;slds-form-element__help&quot; *ngIf=&quot;form.get('shortDesignation').errors?.maxlength&quot; i18n&gt;Maximum de {{max35}} caractères autorisé.&lt;/span&gt;"><pre class="notranslate"><code class="notranslate">&lt;span class="slds-form-element__help" *ngIf="form.get('sapNumber').errors?.maxlength" i18n&gt;Maximum de {{max8}} caractères autorisé.&lt;/span&gt; &lt;span class="slds-form-element__help" *ngIf="form.get('interfaceAccountNumber').errors?.maxlength" i18n&gt;Maximum de {{max15}} caractères autorisé.&lt;/span&gt; &lt;span class="slds-form-element__help" *ngIf="form.get('formDesignation').errors?.maxlength" i18n&gt;Maximum de {{max20}} caractères autorisé.&lt;/span&gt; &lt;span class="slds-form-element__help" *ngIf="form.get('shortDesignation').errors?.maxlength" i18n&gt;Maximum de {{max35}} caractères autorisé.&lt;/span&gt; </code></pre></div> <p dir="auto">and when I extract with <code class="notranslate">"./node_modules/.bin/ng-xi18n" --i18nFormat=xmb</code> I get 4 times same strings to translate with different ID in my <code class="notranslate">messages.xmb</code> file. All others strings aren't duplicated but this one is, why ?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;msg id=&quot;4591664065864994257&quot;&gt;Maximum de &lt;ph name=&quot;INTERPOLATION&quot;&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id=&quot;3596670943450897156&quot;&gt;Maximum de &lt;ph name=&quot;INTERPOLATION&quot;&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id=&quot;27126914192147611&quot;&gt;Maximum de &lt;ph name=&quot;INTERPOLATION&quot;&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id=&quot;8495459888526831686&quot;&gt;Maximum de &lt;ph name=&quot;INTERPOLATION&quot;&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt;"><pre class="notranslate"><code class="notranslate">&lt;msg id="4591664065864994257"&gt;Maximum de &lt;ph name="INTERPOLATION"&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id="3596670943450897156"&gt;Maximum de &lt;ph name="INTERPOLATION"&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id="27126914192147611"&gt;Maximum de &lt;ph name="INTERPOLATION"&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; &lt;msg id="8495459888526831686"&gt;Maximum de &lt;ph name="INTERPOLATION"&gt;&lt;ex&gt;INTERPOLATION&lt;/ex&gt;&lt;/ph&gt; caractères autorisé.&lt;/msg&gt; </code></pre></div> <p dir="auto">N.B. I tried with <code class="notranslate">{{15}}</code> interpolation, I tried with <code class="notranslate">max15 : string = "15"</code> I tried with <code class="notranslate">max15 : number = 15</code> and same behavior !</p> <p dir="auto"><strong>Expected behavior</strong><br> Extract only one time this i18n string.</p> <p dir="auto"><strong>Please tell us about your environment:</strong> webstorm 2017.1</p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 4.0.0</p> </li> <li> <p dir="auto"><strong>Language:</strong> [ts 2.2.1]</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = v7.7.2</p> </li> </ul>
0
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">The axis arrows of the TransformControls are aligned with the component's local coordinate system, even if the default "world" space is used. Dragging the arrows still works as normal, so the movement of the object does not match the drag direction of the arrows if the transformed object is rotated.</p> <p dir="auto">Could be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="892928459" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/21840" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/21840/hovercard" href="https://github.com/mrdoob/three.js/issues/21840">#21840</a>, but does not require any parent object or snap configuration.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">This can be easily reproduced using the <a href="https://threejs.org/examples/#misc_controls_transform" rel="nofollow">Transform Example</a>:</p> <ol dir="auto"> <li>Switch to Rotate mode</li> <li>Rotate your object in any way</li> <li>Switch back to Translate mode -&gt; Notice that the axes are aligned to the cube, even though we are in "world" space</li> <li>Drag the red arrow -&gt; Note that the object still moves on the global X axis</li> <li>Change to "local" space -&gt; Note that the arrows are still aligned the same (correct)</li> <li>Drag the red arrow again -&gt; Movement follows the arrow (correct)</li> </ol> <p dir="auto"><em><strong>Live example</strong></em></p> <p dir="auto">See steps explained above and the <a href="https://threejs.org/examples/#misc_controls_transform" rel="nofollow">Transform Example</a>.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">I believe that the arrows should be aligned to world axes in "world" space. They also have done so in past versions, IIRC.</p> <p dir="auto"><strong>Screenshots</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/33150734/118851561-2fd40880-b8d2-11eb-8f0a-7ccfcb277c88.png"><img src="https://user-images.githubusercontent.com/33150734/118851561-2fd40880-b8d2-11eb-8f0a-7ccfcb277c88.png" alt="grafik" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: Desktop</li> <li>OS: Windows</li> <li>Browser: Chrome, Firefox</li> <li>Three.js version: r128</li> </ul>
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">TransformControls setSpace() does not update gizmo transform as it did in Three r127.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Go to <a href="https://threejs.org/examples/?q=transform#misc_controls_transform" rel="nofollow">https://threejs.org/examples/?q=transform#misc_controls_transform</a></li> <li>Select the cube</li> <li>Rotate it by ~30 degrees on one axis</li> <li>Press <code class="notranslate">Q</code> to toggle world/local space</li> <li>Gizmos are not updated</li> </ol> <p dir="auto">This is a video of trying to move the rotated cube while changing between local and world space. The transformation is applied correctly, but the gizmos are not oriented correctly.</p> <details open="" class="details-reset border rounded-2"> <summary class="px-3 py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video"> <path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path> </svg> <span aria-label="Video description bug.mp4" class="m-1">bug.mp4</span> <span class="dropdown-caret"></span> </summary> <video src="https://user-images.githubusercontent.com/6860637/116264406-8ee2a980-a77a-11eb-988e-f4c3c319f826.mp4" data-canonical-src="https://user-images.githubusercontent.com/6860637/116264406-8ee2a980-a77a-11eb-988e-f4c3c319f826.mp4" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"> </video> </details> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Gizmos updated to match world/local space.</p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: Desktop computer</li> <li>OS: Linux Manjaro</li> <li>Browser: Chrome 90</li> <li>Three.js version: r128</li> </ul>
1
<ul dir="auto"> <li>Electron Version: v2.0.2</li> <li>Operating System (Platform and Version): Linux</li> <li>Last known working Electron version:</li> </ul> <p dir="auto"><strong>Expected Behavior</strong><br> while using window's background property in electron API and CSS background property I should get a similar result.</p> <p dir="auto"><strong>Actual behavior</strong><br> I set the window's background property with color <code class="notranslate">#141414<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #141414; height: 8px; width: 8px;"></span></code> and also applied <code class="notranslate">#141414<span class="ml-1 d-inline-block border circle color-border-subtle" style="background-color: #141414; height: 8px; width: 8px;"></span></code> color to <code class="notranslate">html, body</code> tags with CSS but in the attached screenshot, the result isn't what I expect.</p> <p dir="auto"><strong>Note:</strong> the top section is CSS colored and the bottom section is native chromium background color. Also, this problem will occur while using <a href="https://github.com/electron/electron/issues/12820#issuecomment-387798184" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/12820/hovercard"><code class="notranslate">--disable-gpu</code></a> flag and well my window is frameless and in Linux by selecting a text object or something else and dragging it to out electron will crash.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11756815/43007060-85b71752-8c4c-11e8-9c36-886fd21b6dec.png"><img src="https://user-images.githubusercontent.com/11756815/43007060-85b71752-8c4c-11e8-9c36-886fd21b6dec.png" alt="screenshot from 2018-07-20 18-32-53" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>Electron version: 1.7.x</li> <li>Operating system: macOS 10.12.5</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Setting a window <code class="notranslate">backgroundColor</code> should produce the same visual result as setting it via CSS.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">There is a slight flicker from where the background color from CSS kicks in.</p> <h3 dir="auto">How to reproduce</h3> <ul dir="auto"> <li>create a window with background color: <code class="notranslate">new BrowserWindow({ width: 800, height: 600, backgroundColor: '#DDDDDD' })</code></li> <li>in that window set the same background color via CSS: <code class="notranslate">&lt;body style="background-color: #DDDDDD;"&gt;</code></li> <li><code class="notranslate">loadURL</code> of the window with a slight timeout to see the difference</li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setTimeout(function () { win.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true })) }, 2000);"><pre class="notranslate"><span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">win</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s1">url</span><span class="pl-kos">.</span><span class="pl-en">format</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">pathname</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'index.html'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">protocol</span>: <span class="pl-s">'file:'</span><span class="pl-kos">,</span> <span class="pl-c1">slashes</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">2000</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">The following video shows the difference clearly:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/900690/26779427/9775cdb2-49e5-11e7-9ec3-b8dbfa600c7a.gif"><img src="https://cloud.githubusercontent.com/assets/900690/26779427/9775cdb2-49e5-11e7-9ec3-b8dbfa600c7a.gif" alt="panel-red" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Could it be that the window <code class="notranslate">backgroundColor</code> somehow uses a different color space compared to the renderer one via CSS?</p>
1
<p dir="auto">Note this is the step before actual compilation occurs. I'm not sure how to debug it, but below is the output for the compilation.</p> <p dir="auto">Here is my babelrc</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [&quot;es2015&quot;, &quot;react&quot;, &quot;stage-0&quot;] }"><pre class="notranslate">{ <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>es2015<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>react<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>stage-0<span class="pl-pds">"</span></span>] }</pre></div> <p dir="auto">Here is the output running with <code class="notranslate">DEBUG=babel</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ time DEBUG=babel babel -d blah button-test.js icon-test.js babel [BABEL] button-test.js: Parse start +0ms babel [BABEL] button-test.js: Parse stop +17ms babel [BABEL] button-test.js: Start set AST +2ms babel [BABEL] button-test.js: End set AST +12ms babel [BABEL] button-test.js: Start transform traverse +0ms babel [BABEL] button-test.js: End transform traverse +36ms babel [BABEL] button-test.js: Generation start +1ms babel [BABEL] button-test.js: Generation end +8ms button-test.js -&gt; blah/button-test.js babel [BABEL] icon-test.js: Parse start +4ms babel [BABEL] icon-test.js: Parse stop +6ms babel [BABEL] icon-test.js: Start set AST +0ms babel [BABEL] icon-test.js: End set AST +5ms babel [BABEL] icon-test.js: Start transform traverse +1ms babel [BABEL] icon-test.js: End transform traverse +7ms babel [BABEL] icon-test.js: Generation start +0ms babel [BABEL] icon-test.js: Generation end +3ms icon-test.js -&gt; blah/icon-test.js DEBUG=babel babel -d blah button-test.js icon-test.js 6.40s user 1.09s system 23% cpu 31.996 total"><pre class="notranslate"><code class="notranslate">❯ time DEBUG=babel babel -d blah button-test.js icon-test.js babel [BABEL] button-test.js: Parse start +0ms babel [BABEL] button-test.js: Parse stop +17ms babel [BABEL] button-test.js: Start set AST +2ms babel [BABEL] button-test.js: End set AST +12ms babel [BABEL] button-test.js: Start transform traverse +0ms babel [BABEL] button-test.js: End transform traverse +36ms babel [BABEL] button-test.js: Generation start +1ms babel [BABEL] button-test.js: Generation end +8ms button-test.js -&gt; blah/button-test.js babel [BABEL] icon-test.js: Parse start +4ms babel [BABEL] icon-test.js: Parse stop +6ms babel [BABEL] icon-test.js: Start set AST +0ms babel [BABEL] icon-test.js: End set AST +5ms babel [BABEL] icon-test.js: Start transform traverse +1ms babel [BABEL] icon-test.js: End transform traverse +7ms babel [BABEL] icon-test.js: Generation start +0ms babel [BABEL] icon-test.js: Generation end +3ms icon-test.js -&gt; blah/icon-test.js DEBUG=babel babel -d blah button-test.js icon-test.js 6.40s user 1.09s system 23% cpu 31.996 total </code></pre></div> <p dir="auto">How can I provide better information on what's happening before compilation?</p>
<p dir="auto">Inspired by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="191777331" data-permission-text="Title is private" data-url="https://github.com/babel/minify/issues/300" data-hovercard-type="issue" data-hovercard-url="/babel/minify/issues/300/hovercard" href="https://github.com/babel/minify/issues/300">babel/minify#300</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="200782687" data-permission-text="Title is private" data-url="https://github.com/babel/minify/issues/375" data-hovercard-type="pull_request" data-hovercard-url="/babel/minify/pull/375/hovercard" href="https://github.com/babel/minify/pull/375">babel/minify#375</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="191804361" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/4896" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/4896/hovercard" href="https://github.com/babel/babel/pull/4896">#4896</a> I was thinking how to properly solve all this cases. Here a short introduction to the problem:</p> <p dir="auto">Assuming this code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="active ? a() : b();"><pre class="notranslate"><code class="notranslate">active ? a() : b(); </code></pre></div> <p dir="auto">Now assuming a transform removes all <code class="notranslate">a()</code> calls, and the resulting code gets</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="active ? : b();"><pre class="notranslate"><code class="notranslate">active ? : b(); </code></pre></div> <p dir="auto">This is not valid js syntax anymore and babel currently throws somewhere after calling <code class="notranslate">path.remove()</code> in this case.</p> <p dir="auto">Currently we have babel handling some of this cases (loops, and arrow functions) but not all of them. Instead of adding more and more rules how to delete certain nodes with certain parents I propose a breaking change to the remove functionality of paths:</p> <h3 dir="auto">Changing path.remove()</h3> <p dir="auto">I propose changing <code class="notranslate">path.remove()</code> to do what it says, removal of a node/path. If the resulting AST is not valid it should throw. Also remove the current removal-hooks for loops and arrow functions and throw instead if for example a loop ends up with the body node being <code class="notranslate">null</code>.</p> <h3 dir="auto">Introduce path.isRemovable()</h3> <p dir="auto">A boolean method that returns true if it is safe to remove the path or false if not.</p> <h3 dir="auto">Introduce path.getSafeReplacement()</h3> <p dir="auto">A function that returns a safe replacement for the current node. It would return a new node that is a "nullable" variant for the current node (<code class="notranslate">Identifier&lt;"undefined"&gt;</code>, <code class="notranslate">BlockStatement</code>, ...) or throw if it is not possible (like <code class="notranslate">var a = 1;</code> Remove Identifier <code class="notranslate">a</code> here)</p> <h3 dir="auto">Introduce path.removeOrReplace();</h3> <p dir="auto">This would more be a sum of the 3 methods I mentioned before and might not be necessary at all, but could be easier to use for plugin authors.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="removeOrReplace() { if (this.isRemovable()) { this.remove(); } else { this.replaceWith(this.getSafeReplacement()); } }"><pre class="notranslate"><span class="pl-en">removeOrReplace</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">isRemovable</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">remove</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">replaceWith</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">getSafeReplacement</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The new functions could be added in 6.x and the change to <code class="notranslate">remove()</code> in 7.0, so that people can migrate.</p> <p dir="auto">The ultimate goal of this proposal is to make <code class="notranslate">remove()</code> do what it name says and give plugin authors the tools to handle all the edge cases where remove is not as easy and not every plugin should handle all this cases on their own and duplicate the logic of <code class="notranslate">if-parent-is-ternary-operator then-replace-with-undefined otherwise-if-...</code>.</p> <p dir="auto">All of this is just a proposal and I would like to hear what you think about it. If you have better ideas or what you don't like about it.</p> <p dir="auto">I want to do more research and see how other handle that (estraverse for example).</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/boopathi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/boopathi">@boopathi</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kangax/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kangax">@kangax</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/loganfsmyth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/loganfsmyth">@loganfsmyth</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DrewML/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DrewML">@DrewML</a></p>
0
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.2 AND 2.4.2</p> <h3 dir="auto">What happened</h3> <ul dir="auto"> <li>Was running on version 2.3.2, out of sudden, scheduler keeps crashing and restarting. Upgrading to 2.4.2 does not resolve the issue.</li> <li>It appears that one particular pipeline cannot updated to be successful (after all tasks succeeded)</li> </ul> <h2 dir="auto">Symptom 1</h2> <p dir="auto">This is when trying to mark the pipeline success (Either manually or by the Airflow Scheduler). The traceback log appears in both the webserver as well as the scheduler. Marking the dag failure does not cause error.<br> At this time, access</p> <p dir="auto">the dag detail view of this dag works. (See attached video as well)</p> <details open="" class="details-reset border rounded-2"> <summary class="px-3 py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-camera-video"> <path d="M16 3.75v8.5a.75.75 0 0 1-1.136.643L11 10.575v.675A1.75 1.75 0 0 1 9.25 13h-7.5A1.75 1.75 0 0 1 0 11.25v-6.5C0 3.784.784 3 1.75 3h7.5c.966 0 1.75.784 1.75 1.75v.675l3.864-2.318A.75.75 0 0 1 16 3.75Zm-6.5 1a.25.25 0 0 0-.25-.25h-7.5a.25.25 0 0 0-.25.25v6.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-6.5ZM11 8.825l3.5 2.1v-5.85l-3.5 2.1Z"></path> </svg> <span aria-label="Video description bug2.mov" class="m-1">bug2.mov</span> <span class="dropdown-caret"></span> </summary> <video src="https://user-images.githubusercontent.com/655051/197767297-f75be8e1-1fab-49ce-be0d-2f4aec793cdf.mov" data-canonical-src="https://user-images.githubusercontent.com/655051/197767297-f75be8e1-1fab-49ce-be0d-2f4aec793cdf.mov" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"> </video> </details> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/655051/197766815-1f921ca1-39bd-4bfa-8119-cc53c4fb33a1.png"><img src="https://user-images.githubusercontent.com/655051/197766815-1f921ca1-39bd-4bfa-8119-cc53c4fb33a1.png" alt="image" style="max-width: 100%;"></a></p> <h2 dir="auto">Symptom 2</h2> <ul dir="auto"> <li>Upgraded to version 2.4.2</li> <li>Trying to recover the issue with <code class="notranslate">airflow dags reserialize</code> (on version 2.4.2), the command succeeded but did not resolve the issue.</li> <li>The error shows up when access the detail view of the dag. Below query returns 2 records.</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="select * from dag where dag_id = 'my_problem_dag'; The result of this query is &quot;dag_id&quot;,&quot;is_paused&quot;,&quot;is_subdag&quot;,&quot;is_active&quot;,&quot;last_parsed_time&quot;,&quot;last_pickled&quot;,&quot;last_expired&quot;,&quot;scheduler_lock&quot;,&quot;pickle_id&quot;,&quot;fileloc&quot;,&quot;owners&quot;,&quot;description&quot;,&quot;default_view&quot;,&quot;schedule_interval&quot;,&quot;root_dag_id&quot;,&quot;next_dagrun&quot;,&quot;next_dagrun_create_after&quot;,&quot;max_active_tasks&quot;,&quot;has_task_concurrency_limits&quot;,&quot;max_active_runs&quot;,&quot;next_dagrun_data_interval_start&quot;,&quot;next_dagrun_data_interval_end&quot;,&quot;has_import_errors&quot;,&quot;timetable_description&quot; &quot;payment_premium_bdr_weekly_v1&quot;,&quot;false&quot;,&quot;false&quot;,&quot;true&quot;,&quot;2022-10-25 10:37:24.499861 +00:00&quot;,,,,,&quot;/opt/airflow/dags/reports_gen/reporting_parser.py&quot;,&quot;airflow&quot;,,&quot;grid&quot;,&quot;&quot;&quot;0 6 * * 1&quot;&quot;&quot;,,&quot;2022-10-17 06:00:00.000000 +00:00&quot;,&quot;2022-10-24 06:00:00.000000 +00:00&quot;,&quot;5&quot;,&quot;false&quot;,&quot;5&quot;,&quot;2022-10-17 06:00:00.000000 +00:00&quot;,&quot;2022-10-24 06:00:00.000000 +00:00&quot;,&quot;false&quot;,&quot;At 06:00, only on Monday&quot; &quot;payment_premium_bdr_weekly_v1&quot;,&quot;false&quot;,&quot;false&quot;,&quot;true&quot;,&quot;2022-10-25 10:36:11.583820 +00:00&quot;,,,,,&quot;/opt/airflow/dags/reports_gen/reporting_parser.py&quot;,&quot;airflow&quot;,,&quot;grid&quot;,&quot;&quot;&quot;0 6 * * 1&quot;&quot;&quot;,,&quot;2022-10-24 06:00:00.000000 +00:00&quot;,&quot;2022-10-31 06:00:00.000000 +00:00&quot;,&quot;5&quot;,&quot;false&quot;,&quot;5&quot;,&quot;2022-10-24 06:00:00.000000 +00:00&quot;,&quot;2022-10-31 06:00:00.000000 +00:00&quot;,&quot;false&quot;,&quot;At 06:00, only on Monday&quot; "><pre class="notranslate"><code class="notranslate">select * from dag where dag_id = 'my_problem_dag'; The result of this query is "dag_id","is_paused","is_subdag","is_active","last_parsed_time","last_pickled","last_expired","scheduler_lock","pickle_id","fileloc","owners","description","default_view","schedule_interval","root_dag_id","next_dagrun","next_dagrun_create_after","max_active_tasks","has_task_concurrency_limits","max_active_runs","next_dagrun_data_interval_start","next_dagrun_data_interval_end","has_import_errors","timetable_description" "payment_premium_bdr_weekly_v1","false","false","true","2022-10-25 10:37:24.499861 +00:00",,,,,"/opt/airflow/dags/reports_gen/reporting_parser.py","airflow",,"grid","""0 6 * * 1""",,"2022-10-17 06:00:00.000000 +00:00","2022-10-24 06:00:00.000000 +00:00","5","false","5","2022-10-17 06:00:00.000000 +00:00","2022-10-24 06:00:00.000000 +00:00","false","At 06:00, only on Monday" "payment_premium_bdr_weekly_v1","false","false","true","2022-10-25 10:36:11.583820 +00:00",,,,,"/opt/airflow/dags/reports_gen/reporting_parser.py","airflow",,"grid","""0 6 * * 1""",,"2022-10-24 06:00:00.000000 +00:00","2022-10-31 06:00:00.000000 +00:00","5","false","5","2022-10-24 06:00:00.000000 +00:00","2022-10-31 06:00:00.000000 +00:00","false","At 06:00, only on Monday" </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/grid.html&quot;, line 22, in top-level template code {% from 'appbuilder/loading_dots.html' import loading_dots %} File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html&quot;, line 30, in top-level template code {% set dag_is_paused = dag.get_is_paused() %} File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py&quot;, line 71, in wrapper return func(*args, session=session, **kwargs) File &quot;/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py&quot;, line 1126, in get_is_paused return session.query(DagModel.is_paused).filter(DagModel.dag_id == self.dag_id).scalar() File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py&quot;, line 2879, in scalar ret = self.one() File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py&quot;, line 2856, in one return self._iter().one() File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engine/result.py&quot;, line 1190, in one return self._only_one_row( File &quot;/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engine/result.py&quot;, line 613, in _only_one_row raise exc.MultipleResultsFound( sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required"><pre class="notranslate"><code class="notranslate">File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/grid.html", line 22, in top-level template code {% from 'appbuilder/loading_dots.html' import loading_dots %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/www/templates/airflow/dag.html", line 30, in top-level template code {% set dag_is_paused = dag.get_is_paused() %} File "/home/airflow/.local/lib/python3.8/site-packages/airflow/utils/session.py", line 71, in wrapper return func(*args, session=session, **kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/dag.py", line 1126, in get_is_paused return session.query(DagModel.is_paused).filter(DagModel.dag_id == self.dag_id).scalar() File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2879, in scalar ret = self.one() File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 2856, in one return self._iter().one() File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engine/result.py", line 1190, in one return self._only_one_row( File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engine/result.py", line 613, in _only_one_row raise exc.MultipleResultsFound( sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required </code></pre></div> <h2 dir="auto">Symptom 3</h2> <p dir="auto">Most importantly, the scheduler loop exited, and crashes very often due to that the scheduler trying to update dag run result, but no row was affected.</p> <h3 dir="auto">What you think should happen instead</h3> <ul dir="auto"> <li>We were running 2.3.2 for a while and had no problem.</li> <li>The problematic pipeline was not modified for the last six months</li> </ul> <h3 dir="auto">How to reproduce</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating System</h3> <p dir="auto">Debian GNU/Linux 11 (bullseye)</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">Not related to this, but here is the list</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-cncf-kubernetes==4.3.0 apache-airflow-providers-common-sql==1.1.0 apache-airflow-providers-docker==3.1.0 apache-airflow-providers-ftp==3.1.0 apache-airflow-providers-google==8.3.0 apache-airflow-providers-http==4.0.0 apache-airflow-providers-imap==3.0.0 apache-airflow-providers-mysql==3.2.0 apache-airflow-providers-opsgenie==4.0.0 apache-airflow-providers-postgres==5.2.0 apache-airflow-providers-redis==3.0.0 apache-airflow-providers-sftp==4.0.0 apache-airflow-providers-slack==5.1.0 apache-airflow-providers-sqlite==3.2.0 apache-airflow-providers-ssh==3.1.0"><pre lang="apache-airflow-providers-amazon==5.0.0" class="notranslate"><code class="notranslate">apache-airflow-providers-cncf-kubernetes==4.3.0 apache-airflow-providers-common-sql==1.1.0 apache-airflow-providers-docker==3.1.0 apache-airflow-providers-ftp==3.1.0 apache-airflow-providers-google==8.3.0 apache-airflow-providers-http==4.0.0 apache-airflow-providers-imap==3.0.0 apache-airflow-providers-mysql==3.2.0 apache-airflow-providers-opsgenie==4.0.0 apache-airflow-providers-postgres==5.2.0 apache-airflow-providers-redis==3.0.0 apache-airflow-providers-sftp==4.0.0 apache-airflow-providers-slack==5.1.0 apache-airflow-providers-sqlite==3.2.0 apache-airflow-providers-ssh==3.1.0 </code></pre></div> <h3 dir="auto">Deployment</h3> <p dir="auto">Other Docker-based deployment</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">Were using official Docker image on GKE</p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<p dir="auto">Let's say that you have a DAG with 8 retries and email_on_failure=True.</p> <p dir="auto">The first 6 times it fails due to a server conn error, and on the 7th it works. I really don't care why it failed the first six times, and I will care just if it fails the 8th time.</p> <p dir="auto">It would be nice to have a parameter that allows us to only receive an email if all 8 retries fail.</p>
0
<p dir="auto">Note: I am not trying to get help fixing my code. I am only reporting what I think is a bug in typescript.</p> <p dir="auto">See branch "AddVS15" of <a href="https://github.com/kevinpas/Klib6">https://github.com/kevinpas/Klib6</a></p> <p dir="auto">There are two imports in the startup file "Klib6/Tests/Core/CoreTests.ts". If you comment out the second one you can successfully run and debug/step through the tests in the startup file.</p> <p dir="auto">If you uncomment the second import and uncomment the two lines near the bottom:<br> //var units = "mm";<br> //var nameValueUnits = new NameValueUnits( name, value, units );</p> <p dir="auto">when you try to run it you get the exception (on win7):</p> <p dir="auto">Debugger listening on port 5858<br> module.js:338<br> throw err;<br> ^<br> Error: Cannot find module 'NameValue'<br> at Function.Module._resolveFilename (module.js:336:15)<br> at Function.Module._load (module.js:278:25)<br> at Module.require (module.js:365:17)<br> at require (module.js:384:17)<br> at Object. (C:\ ... \Git\GitHub\Klib6\Source\Core<br> \NameValueUnits.js:46:19)<br> at Module._compile (module.js:460:26)<br> at Object.Module._extensions..js (module.js:478:10)<br> at Module.load (module.js:355:32)<br> at Function.Module._load (module.js:310:12)<br> at Module.require (module.js:365:17)<br> Press any key to continue...</p>
<p dir="auto">Issue moved from <a href="http://typescript.codeplex.com/workitem/2448" rel="nofollow">http://typescript.codeplex.com/workitem/2448</a><br> If a require statement has a non-relative path (eg. require('mymod') ) then tsc will search all directories from the container of the requiring file all the way up to the file system root for a corresponding source file.</p> <p dir="auto">This can result in the require pulling in a completely unexpected source file.</p> <p dir="auto">In my scenario I had the following files:</p> <ol dir="auto"> <li>/home/user/myproject/crypto.ts</li> <li>/home/user/myproject/typings/DefinitelyTyped/node/node.d.ts</li> <li>/home/user/myproject/lib/test.ts</li> </ol> <p dir="auto">test.ts uses a '' directive to reference the Node.js typings. The node.d.ts file happens to have an 'import crypto = require('crypto')' statement in it to get Node.js' crypto module.</p> <p dir="auto">When tsc was invoked in the 'lib' directory with 'tsc test.ts' and it encountered the node.d.ts file reference, it ended up looking for:</p> <p dir="auto">/home/user/myproject/typings/DefinitelyTyped/node/crypto.ts<br> /home/user/myproject/typings/DefinitelyTyped/crypto.ts<br> /home/user/myproject/typings/crypto.ts<br> ...<br> /crypto.ts</p> <p dir="auto">Since I happened to have a file with this name in one of these parent directories, tsc ended up trying to compile that code.</p> <p dir="auto">This behavior doesn't feel intuitive to me. Node.js' own require statement does something similar but only looks in 'node_modules/' directories at each level, so is less likely to run into the issue.</p> <p dir="auto">I'm unsure of what the best behavior would be. Perhaps align the way require() works with absolute paths to match node.js?</p>
1
<p dir="auto">Is there a command that will run my file without opening the debug console and without opening the debug tab?</p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Wosi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Wosi">@Wosi</a> on October 13, 2015 14:22</em></p> <p dir="auto">I'm looking for a way to implement an advanced source highlighting<br> where a language service changes the color of words in a file. The result would look similar to the output Visual Studio creates in C# files.<br> The screenshot shows C# code in Visual Studio. The word "Customer" is highlighted differently based on its context:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3448684/10456067/6b53769e-71bf-11e5-95b3-f2e95348101b.PNG"><img src="https://cloud.githubusercontent.com/assets/3448684/10456067/6b53769e-71bf-11e5-95b3-f2e95348101b.PNG" alt="advancedhighlighting" style="max-width: 100%;"></a></p> <p dir="auto">To implement highlighting like this it's necassary to let a language service decide about the color of a word after the grammar based highlighter has done its job.<br> I would like to see an API for this in the future.</p> <p dir="auto"><em>Copied from original issue: Microsoft/vscode-extensionbuilders#14</em></p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd df = pd.DataFrame(columns=[&quot;A&quot;, &quot;B&quot;, &quot;C&quot;]) df.set_index([&quot;A&quot;, &quot;B&quot;], inplace=True) df.ix[(&quot;x&quot;, &quot;y&quot;), :] = 0 print(df) print(df.ix[(&quot;x&quot;, slice(None)), :]) print(df)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">"A"</span>, <span class="pl-s">"B"</span>, <span class="pl-s">"C"</span>]) <span class="pl-s1">df</span>.<span class="pl-en">set_index</span>([<span class="pl-s">"A"</span>, <span class="pl-s">"B"</span>], <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">df</span>.<span class="pl-s1">ix</span>[(<span class="pl-s">"x"</span>, <span class="pl-s">"y"</span>), :] <span class="pl-c1">=</span> <span class="pl-c1">0</span> <span class="pl-en">print</span>(<span class="pl-s1">df</span>) <span class="pl-en">print</span>(<span class="pl-s1">df</span>.<span class="pl-s1">ix</span>[(<span class="pl-s">"x"</span>, <span class="pl-en">slice</span>(<span class="pl-c1">None</span>)), :]) <span class="pl-en">print</span>(<span class="pl-s1">df</span>)</pre></div> <h5 dir="auto">Output</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" C A B x y 0 C B y 0 C B y 0"><pre class="notranslate"><code class="notranslate"> C A B x y 0 C B y 0 C B y 0 </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">My understanding is that <code class="notranslate">DataFrame.ix</code> is a read-only operation and should not modify the <code class="notranslate">DataFrame</code>. However, in the example above column <code class="notranslate">A</code> is dropped from the index and thus cannot be use anymore.</p> <h4 dir="auto">Expected Output</h4> <p dir="auto">The unmodified <code class="notranslate">DataFrame</code>. So the last print yields the same output as the first one.</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> ``` INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-46-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: de_DE.UTF-8 LOCALE: de_DE.UTF-8 <p dir="auto">pandas: 0.19.2<br> nose: None<br> pip: 9.0.1<br> setuptools: 35.0.0<br> Cython: None<br> numpy: 1.12.1<br> scipy: 0.19.0<br> statsmodels: None<br> xarray: None<br> IPython: 5.3.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.0<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: 1.1.9<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> boto: None<br> pandas_datareader: None</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;/details&gt;"><pre class="notranslate"><code class="notranslate">&lt;/details&gt; </code></pre></div></details>
<h3 dir="auto">Small Example</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [13]: import pandas as pd ...: ...: df1 = pd.DataFrame(data=dict(A=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], ...: B=[1, 1, 2, 2, 2, 3, 1, 1, 1, 2, 3, 4], ...: C=[1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 4], ...: X=[1, 5, 2, 3, 8, 3, 3, 3, 1, 2, 1, 4], ...: Y=[7, 3, 4, 1, 3, 9, 9, 3, 1, 9, 3, 7])) ...: df1 = df1.set_index(['A', 'B', 'C']) ...: In [14]: df1.loc[pd.IndexSlice[1, :, :]] Out[14]: X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 .. .. .. 1 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 [12 rows x 2 columns] In [15]: df1 Out[15]: X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 .. .. .. 1 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 [12 rows x 2 columns]"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">13</span>]: <span class="pl-s1">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> ...: ...: <span class="pl-s1">df1</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-en">dict</span>(<span class="pl-v">A</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], ...: <span class="pl-v">B</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>], ...: <span class="pl-v">C</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">4</span>], ...: <span class="pl-v">X</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">5</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">8</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">4</span>], ...: <span class="pl-v">Y</span><span class="pl-c1">=</span>[<span class="pl-c1">7</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-c1">1</span>, <span class="pl-c1">3</span>, <span class="pl-c1">9</span>, <span class="pl-c1">9</span>, <span class="pl-c1">3</span>, <span class="pl-c1">1</span>, <span class="pl-c1">9</span>, <span class="pl-c1">3</span>, <span class="pl-c1">7</span>])) ...: <span class="pl-s1">df1</span> <span class="pl-c1">=</span> <span class="pl-s1">df1</span>.<span class="pl-en">set_index</span>([<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>, <span class="pl-s">'C'</span>]) ...: <span class="pl-v">In</span> [<span class="pl-c1">14</span>]: <span class="pl-s1">df1</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">pd</span>.<span class="pl-v">IndexSlice</span>[<span class="pl-c1">1</span>, :, :]] <span class="pl-v">Out</span>[<span class="pl-c1">14</span>]: <span class="pl-v">X</span> <span class="pl-v">Y</span> <span class="pl-v">B</span> <span class="pl-v">C</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">7</span> <span class="pl-c1">2</span> <span class="pl-c1">5</span> <span class="pl-c1">3</span> <span class="pl-c1">2</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">4</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">8</span> <span class="pl-c1">3</span> .. .. .. <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">9</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">7</span> [<span class="pl-c1">12</span> <span class="pl-s1">rows</span> <span class="pl-s1">x</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>] <span class="pl-v">In</span> [<span class="pl-c1">15</span>]: <span class="pl-s1">df1</span> <span class="pl-v">Out</span>[<span class="pl-c1">15</span>]: <span class="pl-v">X</span> <span class="pl-v">Y</span> <span class="pl-v">B</span> <span class="pl-v">C</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">7</span> <span class="pl-c1">2</span> <span class="pl-c1">5</span> <span class="pl-c1">3</span> <span class="pl-c1">2</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">4</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">8</span> <span class="pl-c1">3</span> .. .. .. <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">9</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">7</span> [<span class="pl-c1">12</span> <span class="pl-s1">rows</span> <span class="pl-s1">x</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>]</pre></div> <h3 dir="auto">Expected Output</h3> <p dir="auto">The output of the slice <code class="notranslate">Out[14]</code> is correct, but <code class="notranslate">df1</code> should not be modified inplace. So the expected <code class="notranslate">Out[15]</code> is the original <code class="notranslate">df1</code>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [17]: df1 Out[17]: X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 ... .. .. 1 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 [12 rows x 2 columns]"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">17</span>]: <span class="pl-s1">df1</span> <span class="pl-v">Out</span>[<span class="pl-c1">17</span>]: <span class="pl-v">X</span> <span class="pl-v">Y</span> <span class="pl-v">A</span> <span class="pl-v">B</span> <span class="pl-v">C</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">7</span> <span class="pl-c1">2</span> <span class="pl-c1">5</span> <span class="pl-c1">3</span> <span class="pl-c1">2</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">4</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">8</span> <span class="pl-c1">3</span> ... .. .. <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">2</span> <span class="pl-c1">9</span> <span class="pl-c1">3</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">3</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">4</span> <span class="pl-c1">7</span> [<span class="pl-c1">12</span> <span class="pl-s1">rows</span> <span class="pl-s1">x</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>]</pre></div> <hr> <p dir="auto">I'm still not good at submitting issues here with code and print out, so I appreciate your patience. Also, thank you guys for making pandas as amazing as it is!!</p> <p dir="auto">Anyhow...</p> <p dir="auto">I have dataframes that sometimes have up to 5 levels on their multiindex. It's not uncommon for me to want to just grab a subset containing only one value on a certain level. If one level of that index has only one value, then .loc can drop that level inplace. I'd say this is highly undesirable.</p> <p dir="auto">First the normal behavior. Here's my input:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 2 1 1 3 9 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7"><pre class="notranslate"><code class="notranslate"> X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 2 1 1 3 9 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 </code></pre></div> <p dir="auto">When I have a multi-indexed dataframe, and I do:<br> df.loc[1]<br> I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9"><pre class="notranslate"><code class="notranslate"> X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 </code></pre></div> <p dir="auto">I personally expect it to return the original multi-index where the first level has only that value. Sadly, it drops it entirely ( I think this is terrible, since if you plan on resetting the index or concatenating later, you've just unwittingly lost information).</p> <p dir="auto">Anyhow, I recognize now that you need to provide an index for all levels, e.g., the way I expected it to work can actually be achieved by (for a three level index):<br> df.loc[pd.IndexSlice[1, :, :]]</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9"><pre class="notranslate"><code class="notranslate"> X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 </code></pre></div> <p dir="auto">Here's the rub... If the level that I indexed above has more than one unique value, this works fine. If <strong>it has only one, then once again that level gets dropped, but worse, the index is modified in place during the .loc operation.</strong><br> Here's the dataframe showing the bad behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7"><pre class="notranslate"><code class="notranslate"> X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 </code></pre></div> <p dir="auto">df.loc[pd.IndexSlice[1, :, :]] gives:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7"><pre class="notranslate"><code class="notranslate"> X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 </code></pre></div> <p dir="auto">Same syntax as the other case, but it dropped index A. Worse is that this is now df.<br> print(df)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7"><pre class="notranslate"><code class="notranslate"> X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 </code></pre></div> <p dir="auto">If I modify the syntax slightly. I.e., df.loc[pd.IndexSlice[1, :, :], :] (with the original not modifed frame, I get the expected result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7"><pre class="notranslate"><code class="notranslate"> X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 </code></pre></div> <p dir="auto">I've tried to provide a code sample with comments that demonstrates the problem.</p> <h3 dir="auto">Code Sample, a copy-pastable example if possible</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd df1 = pd.DataFrame(data=dict(A=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], B=[1, 1, 2, 2, 2, 3, 1, 1, 1, 2, 3, 4], C=[1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 4], X=[1, 5, 2, 3, 8, 3, 3, 3, 1, 2, 1, 4], Y=[7, 3, 4, 1, 3, 9, 9, 3, 1, 9, 3, 7])) df2 = df1.copy(deep=True) df2['A'] = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2] df1 = df1.set_index(['A', 'B', 'C']).sortlevel() df2 = df2.set_index(['A', 'B', 'C']).sortlevel() df1_copy = df1.copy() print(&quot;Here's df2, with more than 1 unique value for the index A:&quot;) print(df2) # already annoyed by this, I don't think this is how it should work, but I understand it print(&quot;\nHere's what df2.loc[1] returns&quot;) print(df2.loc[1]) # understand how to get around it at least print(&quot;\nCan get around this annoyance by df2.loc[pd.IndexSlice[1, :, :]]&quot;) print(df2.loc[pd.IndexSlice[1, :, :]]) # BUT! If it's the only one... print(&quot;\nHere's df1, with only a single value for the index A&quot;) print(df1) print(&quot;\nNow let's do the same thing we did for df2, namely display df1.loc[pidx[1, :, :]]&quot;) print(df1.loc[pd.IndexSlice[1, :, :]]) # and holy crap it's an inplace operation! print(&quot;\nDamnit.. it dropped by index again! And... ruh roh! It has a side effect! Here's df1 again:&quot;) print(df1) print(&quot;\nDoing df1.loc[pidx[1, :, :], :] (using the original df1) works as expected.&quot;) print(df1_copy.loc[pd.IndexSlice[1, :, :], :])"><pre class="notranslate"><code class="notranslate">import pandas as pd df1 = pd.DataFrame(data=dict(A=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], B=[1, 1, 2, 2, 2, 3, 1, 1, 1, 2, 3, 4], C=[1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 4], X=[1, 5, 2, 3, 8, 3, 3, 3, 1, 2, 1, 4], Y=[7, 3, 4, 1, 3, 9, 9, 3, 1, 9, 3, 7])) df2 = df1.copy(deep=True) df2['A'] = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2] df1 = df1.set_index(['A', 'B', 'C']).sortlevel() df2 = df2.set_index(['A', 'B', 'C']).sortlevel() df1_copy = df1.copy() print("Here's df2, with more than 1 unique value for the index A:") print(df2) # already annoyed by this, I don't think this is how it should work, but I understand it print("\nHere's what df2.loc[1] returns") print(df2.loc[1]) # understand how to get around it at least print("\nCan get around this annoyance by df2.loc[pd.IndexSlice[1, :, :]]") print(df2.loc[pd.IndexSlice[1, :, :]]) # BUT! If it's the only one... print("\nHere's df1, with only a single value for the index A") print(df1) print("\nNow let's do the same thing we did for df2, namely display df1.loc[pidx[1, :, :]]") print(df1.loc[pd.IndexSlice[1, :, :]]) # and holy crap it's an inplace operation! print("\nDamnit.. it dropped by index again! And... ruh roh! It has a side effect! Here's df1 again:") print(df1) print("\nDoing df1.loc[pidx[1, :, :], :] (using the original df1) works as expected.") print(df1_copy.loc[pd.IndexSlice[1, :, :], :]) </code></pre></div> <h4 dir="auto">Here's what I get from running the code</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Here's df2, with more than 1 unique value for the index A: X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 2 1 1 3 9 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 Here's what df2.loc[1] returns X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 Can get around this annoyance by df2.loc[pd.IndexSlice[1, :, :]] X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 Here's df1, with only a single value for the index A X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Now let's do the same thing we did for df2, namely display df1.loc[pidx[1, :, :]] X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Damnit.. it dropped by index again! And... ruh roh! It has a side effect! Here's df1 again: X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Doing df1.loc[pidx[1, :, :], :] (using the original df1) works as expected. X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7"><pre class="notranslate"><code class="notranslate">Here's df2, with more than 1 unique value for the index A: X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 2 1 1 3 9 2 3 3 3 1 1 2 2 2 9 3 1 1 3 4 4 4 7 Here's what df2.loc[1] returns X Y B C 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 Can get around this annoyance by df2.loc[pd.IndexSlice[1, :, :]] X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 Here's df1, with only a single value for the index A X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Now let's do the same thing we did for df2, namely display df1.loc[pidx[1, :, :]] X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Damnit.. it dropped by index again! And... ruh roh! It has a side effect! Here's df1 again: X Y B C 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 Doing df1.loc[pidx[1, :, :], :] (using the original df1) works as expected. X Y A B C 1 1 1 1 7 1 3 9 2 5 3 2 3 3 3 1 1 2 1 2 4 2 3 1 2 2 9 3 8 3 3 1 1 3 2 3 9 4 4 4 7 </code></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">What I expect from all of the examples above, is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9"><pre class="notranslate"><code class="notranslate"> X Y A B C 1 1 1 1 7 2 5 3 2 1 2 4 2 3 1 3 8 3 3 2 3 9 </code></pre></div> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.11.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.6.3-300.fc24.x86_64<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8</p> <p dir="auto">pandas: 0.18.1<br> nose: None<br> pip: 8.0.3<br> setuptools: 20.1.1<br> Cython: 0.23.4<br> numpy: 1.10.4<br> scipy: 0.17.0<br> statsmodels: None<br> xarray: None<br> IPython: 4.1.2<br> sphinx: None<br> patsy: None<br> dateutil: 2.4.2<br> pytz: 2015.7<br> blosc: None<br> bottleneck: None<br> tables: 3.2.2<br> numexpr: 2.5.1<br> matplotlib: 1.5.0<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: 1.0.10<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.8<br> boto: None<br> pandas_datareader: None</p>
1
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">When saving the figure as a PDF, the items are grouped unusually, which leads to unexpected results when shown in a viewer that supports <a href="https://www.makeuseof.com/tag/create-knockout-effect-photoshop-illustrator/" rel="nofollow">knockout effects</a>.<br> While this is not problematic most of the time, the issue causes troubles if the PDF created by matplotlib is edited within Illustrator (possibly other PDF editors as well).</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt x = [42,43,44] y=[42,43,44] plt.scatter(x,y,alpha=0.7,sizes=[500], linewidths=[5]) plt.savefig('sample.pdf')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">42</span>,<span class="pl-c1">43</span>,<span class="pl-c1">44</span>] <span class="pl-s1">y</span><span class="pl-c1">=</span>[<span class="pl-c1">42</span>,<span class="pl-c1">43</span>,<span class="pl-c1">44</span>] <span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>,<span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0.7</span>,<span class="pl-s1">sizes</span><span class="pl-c1">=</span>[<span class="pl-c1">500</span>], <span class="pl-s1">linewidths</span><span class="pl-c1">=</span>[<span class="pl-c1">5</span>]) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'sample.pdf'</span>)</pre></div> <p dir="auto"><strong>Actual outcome</strong><br> Because I initially thought this is an Illustrator related problem, I posted a <a href="https://forums.adobe.com/thread/2644593" rel="nofollow">(very detailed) description in one of the Adobe Forums</a>.</p> <p dir="auto">In (MacOS) Preview.app<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11406002/62951802-e85e4580-bdea-11e9-8cce-333205149cd6.png"><img src="https://user-images.githubusercontent.com/11406002/62951802-e85e4580-bdea-11e9-8cce-333205149cd6.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">In Adobe Illustrator:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11406002/62951867-062baa80-bdeb-11e9-987b-bf1853329bcb.png"><img src="https://user-images.githubusercontent.com/11406002/62951867-062baa80-bdeb-11e9-987b-bf1853329bcb.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">In the Adobe Illustrator forum I got the feedback that the grouping of the items is unusual and causes the confusion. Indeed, <a href="https://forums.adobe.com/message/11206013#11206013" rel="nofollow">ungrouping the elements</a> resolved all of my problems.</p> <p dir="auto"><strong>Expected outcome</strong><br> Same as in default preview app.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>MacOS 10.14.5</li> <li>Matplotlib v3.1.1</li> <li>Matplotlib backend: MacOSX</li> <li>Python 3.6.7</li> </ul>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">The baseline images for the rgba_markers test (rgba_markers.{png,pdf,svg}) clearly show differences in rendering between agg, pdf and svg:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1322974/34086128-4fa9ac6c-e34e-11e7-86e8-240e8206dd78.png"><img src="https://user-images.githubusercontent.com/1322974/34086128-4fa9ac6c-e34e-11e7-86e8-240e8206dd78.png" alt="rgba_markers" style="max-width: 100%;"></a></p> <p dir="auto">top left is the svg baseline rendered by inkview (inkscape) 0.92.2, top right is the png baseline, bottom left is the pdf baseline rendered by okular 17.08.3, bottom right is the pdf baseline rendered by gs 9.22 (gs is used by the testing framework to rasterize the pdf for image comparisons).</p> <p dir="auto"><strong>Code for reproduction</strong></p> <p dir="auto">N/A</p> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto">On the right subplot, whether the central blue disk overlaps with the edge red circle depends on the backend... and, for the case of pdf, also on the renderer (so that part may possibly be a bug in eother okular or gs, but at least svg and png should not be different).</p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">All three backends should render hatching in a similar manner.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system:</li> <li>Matplotlib version: master</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>):</li> <li>Python version:</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul>
1
<p dir="auto"><strong>Elasticsearch version</strong>: 5.0.0-alpha5</p> <p dir="auto"><strong>Plugins installed</strong>: []</p> <p dir="auto"><strong>JVM version</strong>: Oracle Java 1.8.0_102</p> <p dir="auto"><strong>OS version</strong>: Windows 10 x86_64</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:</p> <p dir="auto">When switching from 5.0.0-alpha4 to 5.0.0-alpha5, existing elasticsearch.yml stopped working, with what appears as an impossible error to bypass. I expect the node to startup, but the PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169380692" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/19803" data-hovercard-type="pull_request" data-hovercard-url="/elastic/elasticsearch/pull/19803/hovercard" href="https://github.com/elastic/elasticsearch/pull/19803">#19803</a> seems to completely change the logic for starting a new Node object.</p> <p dir="auto">With my working in 5.0.0-alpha4 configuration, with 5.0.0-alpha5, I get this exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Unknown [transport] type [] possible values: [local] at org.elasticsearch.common.util.ExtensionPoint$SelectedType.bindType(ExtensionPoint.java:151) at org.elasticsearch.common.network.NetworkModule.configure(NetworkModule.java:154)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" java.lang.IllegalArgumentException: Unknown [transport] type [] possible values: [local] at org.elasticsearch.common.util.ExtensionPoint$SelectedType.bindType(ExtensionPoint.java:151) at org.elasticsearch.common.network.NetworkModule.configure(NetworkModule.java:154) </code></pre></div> <p dir="auto">I have to add <code class="notranslate">transport.type: local</code> because the default isn't detecting <code class="notranslate">local</code>. Then, once i've added <code class="notranslate">transport.type</code>, I get this exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Unknown [http_transport] type [] possible values: [] at org.elasticsearch.common.util.ExtensionPoint$SelectedType.bindType(ExtensionPoint.java:151) at org.elasticsearch.common.network.NetworkModule.configure(NetworkModule.java:159)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" java.lang.IllegalArgumentException: Unknown [http_transport] type [] possible values: [] at org.elasticsearch.common.util.ExtensionPoint$SelectedType.bindType(ExtensionPoint.java:151) at org.elasticsearch.common.network.NetworkModule.configure(NetworkModule.java:159) </code></pre></div> <p dir="auto">To get past this error, i can change <code class="notranslate">http.enabled</code> to <code class="notranslate">false</code>, which I don't want to do, but it seems that previous "working" is no longer the case.</p> <p dir="auto">As for expected result, I'd ideally expect previous defaults to work. If that isn't possible, it would be beneficial to provide better error messages as I have no clue why <code class="notranslate">http_transport</code> is being output if <code class="notranslate">http.enabled: true</code>. Also breaking changes for 5.0 should be updated for embedded users.</p> <p dir="auto"><strong>Steps to reproduce</strong>:<br> I setup a sample maven project to recreate this issue and included the relevant sections below.<br> <a href="https://github.com/ruckc/elasticsearch-embedded-issue">https://github.com/ruckc/elasticsearch-embedded-issue</a></p> <p dir="auto">elasticsearch.yml:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="network.host: 127.0.0.1 http.port: 9200 http.enabled: true gateway.expected_nodes: 1 cluster.routing.allocation.disk.watermark.low: 512mb cluster.routing.allocation.disk.watermark.high: 256mb path.data: target/test/testdata2 path.home: target/test"><pre class="notranslate"><code class="notranslate">network.host: 127.0.0.1 http.port: 9200 http.enabled: true gateway.expected_nodes: 1 cluster.routing.allocation.disk.watermark.low: 512mb cluster.routing.allocation.disk.watermark.high: 256mb path.data: target/test/testdata2 path.home: target/test </code></pre></div> <p dir="auto">sample main method:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" public static void main(String... args) throws IOException { try (InputStream is = Main.class.getResourceAsStream(&quot;/elasticsearch.yml&quot;)) { Settings settings = Settings.builder().loadFromStream(&quot;elasticsearch.yml&quot;, is).build(); Node node = new Node(settings); node.start(); } }"><pre class="notranslate"><code class="notranslate"> public static void main(String... args) throws IOException { try (InputStream is = Main.class.getResourceAsStream("/elasticsearch.yml")) { Settings settings = Settings.builder().loadFromStream("elasticsearch.yml", is).build(); Node node = new Node(settings); node.start(); } } </code></pre></div>
<p dir="auto">Sort by a column of type 'short' throws an exception</p>
0
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift" rel="nofollow">http://freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift</a> has an issue.<br> The error is in the assert function. It says <code class="notranslate">toLowerCase()</code> is not a function</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">I entered myArray.unshift(["Paul"]);<br> the error message d[0].toLowerCase is not a function</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12203531/9456073/cc6dc8b2-4a87-11e5-90b1-18fe034d5a3d.jpg"><img src="https://cloud.githubusercontent.com/assets/12203531/9456073/cc6dc8b2-4a87-11e5-90b1-18fe034d5a3d.jpg" alt="unshift" style="max-width: 100%;"></a></p> <p dir="auto">Thanks</p>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.34.3]</li> <li>Operating System: [macOS 13.2.1]</li> <li>Browser: [Chromium, Firefox]</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto">When I use newContext() and post() api to send multipart form which includes a file, I get the error <code class="notranslate">apiRequestContext.post: Unexpected buffer type of 'data.file'</code>.</p> <p dir="auto">I have this fixture:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { test as base, APIRequestContext, request } from '@playwright/test'; export const test = base.extend({ apiRequest: async ({apiBaseURL}, use) =&gt; { const apiRequestContext = await request.newContext({ baseURL: process.env.REACT_APP_API_URL }) await use(apiRequestContext); await apiRequestContext.dispose(); }, post: async ({ apiRequest }, use) =&gt; { await use(async ({ url, options, context }) =&gt; { if (options &amp;&amp; options.data) { options.data = snakecaseKeys(options.data, { exclude: options.exclude || [] }); } if (options &amp;&amp; options.multipart) { options.multipart = snakecaseKeys(options.multipart, { exclude: options.exclude || [] }); } const response = await apiRequest.post(url, options); return camelcaseKeys(await response.json(), { deep: true }); }); }, });"><pre class="notranslate"><code class="notranslate">import { test as base, APIRequestContext, request } from '@playwright/test'; export const test = base.extend({ apiRequest: async ({apiBaseURL}, use) =&gt; { const apiRequestContext = await request.newContext({ baseURL: process.env.REACT_APP_API_URL }) await use(apiRequestContext); await apiRequestContext.dispose(); }, post: async ({ apiRequest }, use) =&gt; { await use(async ({ url, options, context }) =&gt; { if (options &amp;&amp; options.data) { options.data = snakecaseKeys(options.data, { exclude: options.exclude || [] }); } if (options &amp;&amp; options.multipart) { options.multipart = snakecaseKeys(options.multipart, { exclude: options.exclude || [] }); } const response = await apiRequest.post(url, options); return camelcaseKeys(await response.json(), { deep: true }); }); }, }); </code></pre></div> <p dir="auto">Also, second fixture which uses <code class="notranslate">post</code> that relies on <code class="notranslate">newContext()</code> (this is not working, getting error from the title):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { faker } from '@faker-js/faker'; import { tests as base } from '@fixtures/util/util.fixture.ts'; import snakecaseKeys from 'snakecase-keys'; export const fileTest = base.extend({ submitFile: async ({ post }, use) =&gt; { await use(async (data, token) =&gt; { const { orderId } = data; const file = { name: 'file.pdf', mimeType: 'application/pdf', buffer: Buffer.from('file content'), }; const payload = snakecaseKeys({ orderId }); return post( { url: someUrl, options: { multipart: { ...payload, file, }, headers: { 'api-token': token, }, exclude: ['mimeType'] }, } ); }); }, });"><pre class="notranslate"><code class="notranslate">import { faker } from '@faker-js/faker'; import { tests as base } from '@fixtures/util/util.fixture.ts'; import snakecaseKeys from 'snakecase-keys'; export const fileTest = base.extend({ submitFile: async ({ post }, use) =&gt; { await use(async (data, token) =&gt; { const { orderId } = data; const file = { name: 'file.pdf', mimeType: 'application/pdf', buffer: Buffer.from('file content'), }; const payload = snakecaseKeys({ orderId }); return post( { url: someUrl, options: { multipart: { ...payload, file, }, headers: { 'api-token': token, }, exclude: ['mimeType'] }, } ); }); }, }); </code></pre></div> <p dir="auto">The same fixture is working if I use <code class="notranslate">context</code> to call <code class="notranslate">post</code> (I would prefer to use <code class="notranslate">newContext()</code> since I don't have to repeat baseUrl every time):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { faker } from '@faker-js/faker'; import { tests as base } from '@fixtures/util/util.fixture.ts'; import snakecaseKeys from 'snakecase-keys'; export const fileTest = base.extend({ submitFile: async ({ context }, use) =&gt; { await use(async (data, token) =&gt; { const { orderId } = data; const file = { name: 'file.pdf', mimeType: 'application/pdf', buffer: Buffer.from('file content'), }; const payload = snakecaseKeys({ orderId }); return context.request.post( url: process.env.REACT_APP_API_URL + someUrl, options: { multipart: { ...payload, file, }, headers: { 'api-token': token, }, }, ); }); }, });"><pre class="notranslate"><code class="notranslate">import { faker } from '@faker-js/faker'; import { tests as base } from '@fixtures/util/util.fixture.ts'; import snakecaseKeys from 'snakecase-keys'; export const fileTest = base.extend({ submitFile: async ({ context }, use) =&gt; { await use(async (data, token) =&gt; { const { orderId } = data; const file = { name: 'file.pdf', mimeType: 'application/pdf', buffer: Buffer.from('file content'), }; const payload = snakecaseKeys({ orderId }); return context.request.post( url: process.env.REACT_APP_API_URL + someUrl, options: { multipart: { ...payload, file, }, headers: { 'api-token': token, }, }, ); }); }, }); </code></pre></div> <p dir="auto">So, it seems newContext() have some issues with multipart form and Buffer.</p> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Expected multipart form data to be submitted when using <code class="notranslate">newContext()</code></p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Getting the error <code class="notranslate">Error: apiRequestContext.post: Unexpected buffer type of 'data.file'</code> on the line which points to <code class="notranslate">post</code> method in my first fixture.</p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.XX]: 1.32.3</li> <li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]: Windows 10</li> <li>Browser: [All, Chromium, Firefox, WebKit]: Chromium</li> <li>Other info:</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p> <p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p> <p dir="auto">or</p> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright-ct.config.ts // @ts-check import { defineConfig, devices } from '@playwright/experimental-ct-react'; import { resolve } from &quot;path&quot;; /** * @see https://playwright.dev/docs/test-configuration */ module.exports = defineConfig({ retries: 1, testDir: './tests/component', timeout: 30 * 1000, // fullyParallel: true, use: { trace: 'on-first-retry', ctPort: 3100, ctViteConfig: { resolve: { alias: { '@': resolve(__dirname, './src'), '@/*': resolve(__dirname, './src'), } } } }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] } }, ] });"><pre class="notranslate"><span class="pl-c">// playwright-ct.config.ts</span> <span class="pl-c">// <span class="pl-k">@ts</span>-check</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">resolve</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"path"</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * <span class="pl-k">@see</span> https://playwright.dev/docs/test-configuration</span> <span class="pl-c"> */</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">retries</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">testDir</span>: <span class="pl-s">'./tests/component'</span><span class="pl-kos">,</span> <span class="pl-c1">timeout</span>: <span class="pl-c1">30</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span> <span class="pl-c">// fullyParallel: true,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span> <span class="pl-c1">ctPort</span>: <span class="pl-c1">3100</span><span class="pl-kos">,</span> <span class="pl-c1">ctViteConfig</span>: <span class="pl-kos">{</span> <span class="pl-c1">resolve</span>: <span class="pl-kos">{</span> <span class="pl-c1">alias</span>: <span class="pl-kos">{</span> <span class="pl-s">'@'</span>: <span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'./src'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s">'@/*'</span>: <span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'./src'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">/* Configure projects for major browsers */</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="it('should check the box using setChecked', async ({ page }) =&gt; { await page.setContent(`&lt;input id='checkbox' type='checkbox'&gt;&lt;/input&gt;`); await page.getByRole('checkbox').check(); await expect(page.getByRole('checkbox')).toBeChecked(); });"><pre class="notranslate"><span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should check the box using setChecked'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span><span class="pl-s">`&lt;input id='checkbox' type='checkbox'&gt;&lt;/input&gt;`</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'checkbox'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">check</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'checkbox'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBeChecked</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>execute command <code class="notranslate">cross-env PW_EXPERIMENTAL_TS_ESM=1 playwright test --ui -c playwright-ct.config.ts</code></li> <li>run specific one test on left side from UI</li> <li>wait for complete test</li> <li>rerun this test again</li> <li>i am getting error below</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Should be able to rerun same test in UI.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Since I opened GUI, first test always gets working, but every time after first attempt I am being blocked by below error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vite v4.2.2 building for production... transforming (1) playwright\index.htmlError when using sourcemap for reporting an error: Can't resolve original location of error. ✓ 3 modules transformed. ✓ built in 67ms Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) file: C:/dev/tester/frontend/playwright/index.ts:139:12 137: // This file is injected into the registry as text, no dependencies are allowed. 138: 139: import * as __pwReact from 'react'; ^ 140: import { createRoot as __pwCreateRoot } from 'react-dom/client'; RollupError: Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) at error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:2125:30) at Module.error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13334:16) at Module.tryParse (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:14011:25) at Module.setSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13621:39) at ModuleLoader.addModuleSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:23586:20) RollupError: Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) at error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:2125:30) at Module.error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13334:16) at Module.tryParse (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:14011:25) at Module.setSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13621:39) at ModuleLoader.addModuleSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:23586:20)"><pre class="notranslate"><code class="notranslate">vite v4.2.2 building for production... transforming (1) playwright\index.htmlError when using sourcemap for reporting an error: Can't resolve original location of error. ✓ 3 modules transformed. ✓ built in 67ms Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) file: C:/dev/tester/frontend/playwright/index.ts:139:12 137: // This file is injected into the registry as text, no dependencies are allowed. 138: 139: import * as __pwReact from 'react'; ^ 140: import { createRoot as __pwCreateRoot } from 'react-dom/client'; RollupError: Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) at error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:2125:30) at Module.error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13334:16) at Module.tryParse (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:14011:25) at Module.setSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13621:39) at ModuleLoader.addModuleSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:23586:20) RollupError: Identifier '__pwReact' has already been declared (Note that you need plugins to import files that are not JavaScript) at error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:2125:30) at Module.error (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13334:16) at Module.tryParse (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:14011:25) at Module.setSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:13621:39) at ModuleLoader.addModuleSource (C:\dev\tester\frontend\node_modules\vite\node_modules\rollup\dist\es\shared\node-entry.js:23586:20) </code></pre></div>
0
<p dir="auto">Right now I have managed to setup a single webpack configuration and webpack-dev-server (hotload) that managing all my subprojects/plugins at the same time.</p> <p dir="auto">However, I would like to be able to resolve folders for each subproject, such as <code class="notranslate">/components</code>, so as to avoid long relative paths. Is this possible?</p> <p dir="auto">I have the following folder structure</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -/ MyProject -/ node_modules -/ plugin1 -/ node_modules - package.json ... -/ plugin2 -/ plugin3 -/ shared (styles etc) - webpack.config.js - package.json"><pre class="notranslate"><code class="notranslate"> -/ MyProject -/ node_modules -/ plugin1 -/ node_modules - package.json ... -/ plugin2 -/ plugin3 -/ shared (styles etc) - webpack.config.js - package.json </code></pre></div> <p dir="auto">My webpack conf:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var webpack = require('webpack'); var path = require('path'); var ExtractTextPlugin = require('extract-text-webpack-plugin') var env = process.env.NODE_ENV; var isProduction = env === 'production' var host = 'http://localhost:4000'; var socketHost = 'ws://localhost:4000'; module.exports = { devtool: 'source-map', entry: { script: ['webpack-hot-middleware/client', './js/script/src/index.js'], app: ['webpack-hot-middleware/client', './js/site/index.js'], }, output: { path: path.join(__dirname , 'dist'), filename: '[name].js', publicPath: '/static/' }, resolve: { root: path.resolve(__dirname), alias: { styles: path.join(__dirname, 'styles'), app: path.join(__dirname, 'js', 'site'), script: path.join(__dirname, 'js', 'script'), } }, module: { loaders: [ { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /\.scss$/, loaders: [&quot;style&quot;, &quot;css&quot;, &quot;sass&quot;] }, { test: /\.(otf|eot|svg|ttf|woff|woff2)(\?.+)$/, loader: 'url-loader?limit=8192', include: /node_modules/ } ] }, plugins: [ new webpack.DefinePlugin({ PRODUCTION: false, APP_HOST: JSON.stringify(host), WS_HOST: JSON.stringify(socketHost) }), new webpack.optimize.OccurenceOrderPlugin(), // recommanded by webpack // new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), // recommanded by webpack // new ExtractTextPlugin('bundle.css') ] }; "><pre class="notranslate"><code class="notranslate">var webpack = require('webpack'); var path = require('path'); var ExtractTextPlugin = require('extract-text-webpack-plugin') var env = process.env.NODE_ENV; var isProduction = env === 'production' var host = 'http://localhost:4000'; var socketHost = 'ws://localhost:4000'; module.exports = { devtool: 'source-map', entry: { script: ['webpack-hot-middleware/client', './js/script/src/index.js'], app: ['webpack-hot-middleware/client', './js/site/index.js'], }, output: { path: path.join(__dirname , 'dist'), filename: '[name].js', publicPath: '/static/' }, resolve: { root: path.resolve(__dirname), alias: { styles: path.join(__dirname, 'styles'), app: path.join(__dirname, 'js', 'site'), script: path.join(__dirname, 'js', 'script'), } }, module: { loaders: [ { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /\.scss$/, loaders: ["style", "css", "sass"] }, { test: /\.(otf|eot|svg|ttf|woff|woff2)(\?.+)$/, loader: 'url-loader?limit=8192', include: /node_modules/ } ] }, plugins: [ new webpack.DefinePlugin({ PRODUCTION: false, APP_HOST: JSON.stringify(host), WS_HOST: JSON.stringify(socketHost) }), new webpack.optimize.OccurenceOrderPlugin(), // recommanded by webpack // new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), // recommanded by webpack // new ExtractTextPlugin('bundle.css') ] }; </code></pre></div>
<p dir="auto">I am upgrading existing apps from webpack 4.43.0 to webpack 5.0.0-beta.28. I am seeing multiple deprecation warnings. I am using</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;webpack&quot;: &quot;^5.0.0-beta.28&quot;, &quot;webpack-cli&quot;: &quot;3.3.12&quot;, &quot;webpack-dev-server&quot;: &quot;3.11.0&quot;, &quot;html-webpack-plugin&quot;: &quot;4.3.0&quot;, &quot;duplicate-package-checker-webpack-plugin&quot;: &quot;3.0.0&quot;, "><pre class="notranslate"><code class="notranslate">"webpack": "^5.0.0-beta.28", "webpack-cli": "3.3.12", "webpack-dev-server": "3.11.0", "html-webpack-plugin": "4.3.0", "duplicate-package-checker-webpack-plugin": "3.0.0", </code></pre></div> <p dir="auto">With above setup, when I run<br> <code class="notranslate">node --trace-deprecation node_modules/webpack/bin/webpack.js --config ./webpack/webpack.development.js</code></p> <p dir="auto">I am seeing following Deprecation warnings coming from <code class="notranslate">last-call-webpack-plugin</code> and <code class="notranslate">html-webpack-plugin</code> plugins</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(node:47918) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option) at /Users/vrajole/sg-core/raisin-frontend/node_modules/last-call-webpack-plugin/src/index.js:176:49 at Hook.eval [as call] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), &lt;anonymous&gt;:198:1) at Hook.CALL_DELEGATE [as _call] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:910:26) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:951:29 "><pre class="notranslate"><code class="notranslate">(node:47918) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option) at /Users/vrajole/sg-core/raisin-frontend/node_modules/last-call-webpack-plugin/src/index.js:176:49 at Hook.eval [as call] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), &lt;anonymous&gt;:198:1) at Hook.CALL_DELEGATE [as _call] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:910:26) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:951:29 </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(node:47918) [DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH] DeprecationWarning: MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead) at HtmlWebpackPlugin.htmlWebpackPluginAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/html-webpack-plugin/index.js:532:56) at /Users/vrajole/sg-core/raisin-frontend/node_modules/html-webpack-plugin/index.js:164:29 at _next0 (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:31:1) at eval (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:48:1) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:190:5 at Hook.eval [as callAsync] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:43:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14) at Compiler.emitAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:729:19) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:392:10 at processTicksAndRejections (internal/process/task_queues.js:75:11)"><pre class="notranslate"><code class="notranslate">(node:47918) [DEP_WEBPACK_MAIN_TEMPLATE_GET_PUBLIC_PATH] DeprecationWarning: MainTemplate.getPublicPath is deprecated (use Compilation.getAssetPath(compilation.outputOptions.publicPath, options) instead) at HtmlWebpackPlugin.htmlWebpackPluginAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/html-webpack-plugin/index.js:532:56) at /Users/vrajole/sg-core/raisin-frontend/node_modules/html-webpack-plugin/index.js:164:29 at _next0 (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:31:1) at eval (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:48:1) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:190:5 at Hook.eval [as callAsync] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:43:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14) at Compiler.emitAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:729:19) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:392:10 at processTicksAndRejections (internal/process/task_queues.js:75:11) </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(node:47918) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API at Function.getModuleGraphForModule (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/ModuleGraph.js:695:10) at NormalModule.get issuer [as issuer] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Module.js:243:22) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:105:29 at Set.forEach (&lt;anonymous&gt;) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:74:25 at Hook.eval [as callAsync] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:43:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14) at Compiler.emitAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:729:19) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:392:10 at processTicksAndRejections (internal/process/task_queues.js:75:11) "><pre class="notranslate"><code class="notranslate">(node:47918) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API at Function.getModuleGraphForModule (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/ModuleGraph.js:695:10) at NormalModule.get issuer [as issuer] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Module.js:243:22) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:105:29 at Set.forEach (&lt;anonymous&gt;) at /Users/vrajole/sg-core/raisin-frontend/node_modules/duplicate-package-checker-webpack-plugin/lib/index.js:74:25 at Hook.eval [as callAsync] (eval at create (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), &lt;anonymous&gt;:43:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14) at Compiler.emitAssets (/Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:729:19) at /Users/vrajole/sg-core/raisin-frontend/node_modules/webpack/lib/Compiler.js:392:10 at processTicksAndRejections (internal/process/task_queues.js:75:11) </code></pre></div> <p dir="auto">Attaching screenshots for reference.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4668780/91580308-30e09680-e94d-11ea-9e7a-b89ad98e1a79.png"><img src="https://user-images.githubusercontent.com/4668780/91580308-30e09680-e94d-11ea-9e7a-b89ad98e1a79.png" alt="Screenshot 2020-08-28 at 4 39 10 PM" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/4668780/91580351-3dfd8580-e94d-11ea-8d04-fbda51e8e4a9.png"><img src="https://user-images.githubusercontent.com/4668780/91580351-3dfd8580-e94d-11ea-8d04-fbda51e8e4a9.png" alt="Screenshot 2020-08-28 at 4 38 50 PM" style="max-width: 100%;"></a></p>
0
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="102609240" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/12278" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/12278/hovercard" href="https://github.com/golang/go/issues/12278">#12278</a> was originally about this, but was changed to be about go/build.</p> <p dir="auto">go/build and x/tools/go/loader now know about vendor directories, but there is more work to do to make goimports add the correct paths.</p> <p dir="auto">When working on <code class="notranslate">$GOPATH/src/a</code> that vendors <code class="notranslate">b</code>, instead of adding the (disallowed) import <code class="notranslate">"a/vendor/b"</code>, goimports should add <code class="notranslate">"b"</code>.</p>
<p dir="auto">If someone is working in a tree where they have gone to the trouble to vendor a package, as long as the vendored copy is visible (not blocked by internal) we should make sure the vendored copy is always preferred. Otherwise goimports may hurt more than it helps in these situations.</p> <p dir="auto">Once there is a standard config file explaining what has been vendored, goimports could just read it and when it wants to use X but there's a vendored copy visible, use the vendored copy instead.</p> <p dir="auto">This came up in a private discussion with an external project about vendoring.</p>
1
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>yes</td> </tr> <tr> <td>Feature request?</td> <td>no</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>3.3.x-dev</td> </tr> </tbody> </table> <p dir="auto">A few weeks ago on master I was able to use <code class="notranslate">factory</code> in my <code class="notranslate">_instanceof</code> Yaml service declarations. This was useful because all instances of DoctrineRepository need the same factory call. Without it, all DoctrineRepositories have to duplicate the same factory line. The purpose of <code class="notranslate">_instanceof</code> to reduce duplication would be better served if we could use factory.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nicolas-grekas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nicolas-grekas">@nicolas-grekas</a> I edited <code class="notranslate">DependencyInjection/Loader/YamlFileLoader</code> and added <code class="notranslate">'factory' =&gt; 'factory'</code> to the <code class="notranslate">$instanceofKeywords</code> array and it seemed to work. Any drawbacks? Better solutions?</p>
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>no</td> </tr> <tr> <td>Feature request?</td> <td>yes</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>master</td> </tr> </tbody> </table> <p dir="auto">Following up on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216725633" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/22143" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/22143/hovercard" href="https://github.com/symfony/symfony/issues/22143">#22143</a>, the lack of proper error is solved now in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="217325433" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/22185" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/22185/hovercard" href="https://github.com/symfony/symfony/pull/22185">#22185</a>, but the use case for <code class="notranslate">factory</code> still seems valid:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="services: _defaults: factory: [ &quot;@doctrine&quot;, getRepository ] AppBundle\RoleRepository: arguments: [ &quot;AppBundle:Role&quot; ] AppBundle\UserRepository: arguments: [ &quot;AppBundle:User&quot; ]"><pre class="notranslate"><span class="pl-ent">services</span>: <span class="pl-ent">_defaults</span>: <span class="pl-ent">factory</span>: <span class="pl-s">[ "@doctrine", getRepository ]</span> <span class="pl-ent">AppBundle\RoleRepository</span>: <span class="pl-ent">arguments</span>: <span class="pl-s">[ "AppBundle:Role" ]</span> <span class="pl-ent">AppBundle\UserRepository</span>: <span class="pl-ent">arguments</span>: <span class="pl-s">[ "AppBundle:User" ]</span></pre></div> <p dir="auto">It was decided in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="197736884" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/21071" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21071/hovercard?comment_id=94062689&amp;comment_type=review_comment" href="https://github.com/symfony/symfony/pull/21071#discussion_r94062689">#21071 (comment)</a> to consider the <code class="notranslate">factory</code> attribute a detector flag for real services, but this <a href="https://github.com/symfony/symfony/pull/22185" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/22185/hovercard">has become obsolete</a>, and the use case for <a href="https://github.com/symfony/symfony/pull/21071#issuecomment-269835047" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/21071/hovercard">default factory settings is there</a>.</p> <p dir="auto">Therefore I propose to reallow <code class="notranslate">factory</code> in <code class="notranslate">_defaults</code> sections.</p>
1
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">I would consider it a feature 😈</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">React does not put any limits on recursive rendering, using higher-order components. However it does so for calling <code class="notranslate">this.setState(...)</code></p> <p dir="auto">It reproduces pretty easy with a pair of a Container and an HOC:<br> <a href="https://github.com/sergeysolovev/react-bomb/blob/master/src/index.js">https://github.com/sergeysolovev/react-bomb/blob/master/src/index.js</a></p> <p dir="auto">I wouldn't try this on CodeSandbox or JSFiddle (I did). Here is the code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from &quot;react&quot;; import ReactDOM from &quot;react-dom&quot;; // Accepts a component as a prop and renders it // passing the props through. In a real life scenario // usually does something more than that const Container = props =&gt; { const { component: Component } = props; return &lt;Component {...props} /&gt;; }; // An HOC-version of Container const withContainer = WrappedComponent =&gt; props =&gt; ( &lt;Container component={WrappedComponent} {...props} /&gt; ); // Though it looks a bit artificially here, // it's pretty common to use something like `compose` // which does the same thing but looks more innocent const Bomb = withContainer(withContainer(() =&gt; null)); class Detonator extends React.Component { state = { wentOff: false }; goOff = () =&gt; this.setState({ wentOff: true }); render = () =&gt; this.state.wentOff ? ( &lt;React.Fragment&gt; &lt;Bomb /&gt; Oooppps... This text probably wont be rendered &lt;/React.Fragment&gt; ) : ( &lt;button onClick={this.goOff}&gt;Lets see&lt;/button&gt; ); } ReactDOM.render(&lt;Detonator /&gt;, document.getElementById(&quot;root&quot;));"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">"react"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">ReactDOM</span> <span class="pl-k">from</span> <span class="pl-s">"react-dom"</span><span class="pl-kos">;</span> <span class="pl-c">// Accepts a component as a prop and renders it</span> <span class="pl-c">// passing the props through. In a real life scenario</span> <span class="pl-c">// usually does something more than that</span> <span class="pl-k">const</span> <span class="pl-v">Container</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-c1">component</span>: <span class="pl-v">Component</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-v">Component</span> <span class="pl-kos">{</span>...<span class="pl-s1">props</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// An HOC-version of Container</span> <span class="pl-k">const</span> <span class="pl-en">withContainer</span> <span class="pl-c1">=</span> <span class="pl-v">WrappedComponent</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">props</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-v">Container</span> <span class="pl-c1">component</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-v">WrappedComponent</span><span class="pl-kos">}</span> <span class="pl-kos">{</span>...<span class="pl-s1">props</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Though it looks a bit artificially here,</span> <span class="pl-c">// it's pretty common to use something like `compose`</span> <span class="pl-c">// which does the same thing but looks more innocent</span> <span class="pl-k">const</span> <span class="pl-v">Bomb</span> <span class="pl-c1">=</span> <span class="pl-en">withContainer</span><span class="pl-kos">(</span><span class="pl-en">withContainer</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-v">Detonator</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span> <span class="pl-c1">state</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">wentOff</span>: <span class="pl-c1">false</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c1">goOff</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">wentOff</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">render</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">wentOff</span> ? <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">Fragment</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-v">Bomb</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> Oooppps... This text probably wont be rendered <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-v">Fragment</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> : <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">goOff</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span>Lets see<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">button</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-v">ReactDOM</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-ent">Detonator</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">,</span> <span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementById</span><span class="pl-kos">(</span><span class="pl-s">"root"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">I would expect to have some limit on such kind of recursion, because it's blazing fast (like React's supposed to be), eating lots of RAM in short time and a bit difficult and annoying to stop.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <p dir="auto">Reproduces on Chrome 65. I've done it for React 16.3.1 and 16.3.2</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <ul dir="auto"> <li>Feature (possibly bug?)</li> </ul> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">I've been trying out the new Context API in my project and it's awesome. However, in my haste to start using it, I managed to stumble into a situation where every time I would try and render a certain component which was making use of a few different contexts, the app would completely freeze, and the only thing that would let me get out of this error state was to forcefully kill the process via the chrome task manager.</p> <p dir="auto">Nothing would be logged to the console, the app would just completely freeze, and when I opened up the task manager and saw the CPU spiked up every time i would go to this component, and the only way I could stop it was to crash the tab.</p> <p dir="auto">I finally threw some <code class="notranslate">console</code> statements in and saw that it had just entered into an infinite loop between these providers. I managed to get the app to stop crashing, but I'm still unsure as to why exactly this was happening. I'm sure I was just using this API incorrectly somehow, but this was a very confusing problem to diagnose, and some error checking here would be incredibly useful</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">It would be very beneficial to have some sort of checks in place, similar to what happens with too many <code class="notranslate">setState</code> calls happening too closely when you call it from <code class="notranslate">componentDidUpdate</code>, for example. That way, instead of freezing everything up permanently, the app could at least crash and report some sort of information and help me realize where I'd gone wrong.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <ul dir="auto"> <li>React <code class="notranslate">16.3.0</code></li> <li>Chrome <code class="notranslate">65.0.3325.181</code></li> </ul>
1
<p dir="auto">Requests fails on the URL <code class="notranslate">http://www.whatbird.com/forum/index.php?/gallery/image/291517-foo/</code>, which is a 301 redirect to</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="http://www.whatbird.com/forum/index.php?/gallery/image/291517-title-paused-jewel-allens-hummingbird-a-backyard-bird-painting-in-oil-by-camille-engel/"><pre class="notranslate"><code class="notranslate">http://www.whatbird.com/forum/index.php?/gallery/image/291517-title-paused-jewel-allens-hummingbird-a-backyard-bird-painting-in-oil-by-camille-engel/ </code></pre></div> <p dir="auto">. The issue seems to be that the server's initial 301 response has a header falsely claiming that the response body (a simple HTML page) is gzipped, when it's actually uncompressed.</p> <p dir="auto">When resolving redirects, Requests does (in <code class="notranslate">requests.sessions.resolve_redirects</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="resp.content # Consume socket so it can be released"><pre class="notranslate"><code class="notranslate">resp.content # Consume socket so it can be released </code></pre></div> <p dir="auto">which attempts to decode</p> <p dir="auto">One could legitimately say this is the server's problem. However, conceptually, why decode the response body of a redirect, which won't get returned? Other programs (Chromium, Firefox, <code class="notranslate">curl</code>) don't do this. For example, <code class="notranslate">curl</code> gives an error, as expected, when not following redirects:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl --compressed 'http://www.whatbird.com/forum/index.php?/gallery/image/291517-foo/' curl: (61) Error while processing content unencoding: invalid code lengths set"><pre class="notranslate"><code class="notranslate">$ curl --compressed 'http://www.whatbird.com/forum/index.php?/gallery/image/291517-foo/' curl: (61) Error while processing content unencoding: invalid code lengths set </code></pre></div> <p dir="auto">whereas it works if you add the <code class="notranslate">--location</code> flag (follow redirects).</p> <h1 dir="auto">Example of error</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.3.2+ (default, Oct 9 2013, 14:56:03) [GCC 4.8.1] on linux Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import requests ; requests.get('http://www.whatbird.com/forum/index.php?/gallery/image/291517-foo/') Traceback (most recent call last): File &quot;./requests/packages/urllib3/response.py&quot;, line 199, in read data = self._decoder.decompress(data) zlib.error: Error -3 while decompressing data: incorrect header check During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;./requests/models.py&quot;, line 629, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File &quot;./requests/packages/urllib3/response.py&quot;, line 236, in stream data = self.read(amt=amt, decode_content=decode_content) File &quot;./requests/packages/urllib3/response.py&quot;, line 204, in read e) requests.packages.urllib3.exceptions.DecodeError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;./requests/api.py&quot;, line 55, in get return request('get', url, **kwargs) File &quot;./requests/api.py&quot;, line 44, in request return session.request(method=method, url=url, **kwargs) File &quot;./requests/sessions.py&quot;, line 393, in request resp = self.send(prep, **send_kwargs) File &quot;./requests/sessions.py&quot;, line 496, in send r = adapter.send(request, **kwargs) File &quot;./requests/adapters.py&quot;, line 391, in send r.content File &quot;./requests/models.py&quot;, line 691, in content self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes() File &quot;./requests/models.py&quot;, line 634, in generate raise ContentDecodingError(e) requests.exceptions.ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',))"><pre class="notranslate"><code class="notranslate">Python 3.3.2+ (default, Oct 9 2013, 14:56:03) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import requests ; requests.get('http://www.whatbird.com/forum/index.php?/gallery/image/291517-foo/') Traceback (most recent call last): File "./requests/packages/urllib3/response.py", line 199, in read data = self._decoder.decompress(data) zlib.error: Error -3 while decompressing data: incorrect header check During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./requests/models.py", line 629, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File "./requests/packages/urllib3/response.py", line 236, in stream data = self.read(amt=amt, decode_content=decode_content) File "./requests/packages/urllib3/response.py", line 204, in read e) requests.packages.urllib3.exceptions.DecodeError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "./requests/api.py", line 55, in get return request('get', url, **kwargs) File "./requests/api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "./requests/sessions.py", line 393, in request resp = self.send(prep, **send_kwargs) File "./requests/sessions.py", line 496, in send r = adapter.send(request, **kwargs) File "./requests/adapters.py", line 391, in send r.content File "./requests/models.py", line 691, in content self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes() File "./requests/models.py", line 634, in generate raise ContentDecodingError(e) requests.exceptions.ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',)) </code></pre></div>
<p dir="auto">See this issue on Requests: <a href="https://github.com/kennethreitz/requests/issues/1472">https://github.com/kennethreitz/requests/issues/1472</a></p> <p dir="auto">This is the truncated traceback:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... /project/virtualenv/lib/python2.6/requests/packages/urllib3/response.py&quot;, line 188, in read &quot;failed to decode it.&quot; % content_encoding) DecodeError: Received response with content-encoding: gzip, but failed to decode it."><pre class="notranslate"><code class="notranslate">... /project/virtualenv/lib/python2.6/requests/packages/urllib3/response.py", line 188, in read "failed to decode it." % content_encoding) DecodeError: Received response with content-encoding: gzip, but failed to decode it. </code></pre></div> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/schlamar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/schlamar">@schlamar</a></p>
1
<p dir="auto">Hello all, I'm new to FastAPI but I believe this is the right place to be posting this even though the issues I believe stems from Pydantic as I'm using it in the context of FastAPI. I'm running this in Pycharm 2020.2 but have also tried it outside of an IDE.</p> <h3 dir="auto">Description</h3> <p dir="auto">I've seen similar issues about self-referencing Pydantic models causing <code class="notranslate">RecursionError: maximum recursion depth exceeded in comparison</code> but as far as I can tell there are no self referencing models included.</p> <p dir="auto">The code runs successfully until the function in <code class="notranslate">audit.py</code> tries to return the output from the model. I'm willing to state that its most likely something I've coded wrong so I've listed this as a question.</p> <p dir="auto">The output is created correctly and I have checked this with debugging but the <code class="notranslate">output</code> is not returned and creates a 500 http status code when running from <code class="notranslate">http://127.0.0.1/docs#/audit/audit_api_v1_audit__post</code>.</p> <p dir="auto">Thanks in advance and thank you for creating this wonderful framework!</p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>OS: Windows 10</li> <li>FastAPI Version: 0.61.1</li> <li>Pydantic Version: 1.6.1</li> <li>Uvicorn Version: 0.11.8</li> <li>Python Version: 3.7.1</li> <li>Pycharm Version: 2020.2</li> </ul> <h3 dir="auto">App</h3> <p dir="auto"><code class="notranslate">main.py</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;&quot; import uvicorn from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from app.api.routes.router import api_router from app.core.logging import init_logging from app.core.config import settings init_logging() def get_app() -&gt; FastAPI: application = FastAPI(title=settings.APP_NAME, version=settings.APP_VERSION, debug=settings.DEBUG) if settings.BACKEND_CORS_ORIGINS: # middleware support for cors application.add_middleware( CORSMiddleware, allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS], allow_credentials=True, allow_methods=[&quot;*&quot;], allow_headers=[&quot;*&quot;], ) application.include_router(api_router, prefix=settings.API_V1_STR) return application app = get_app() if __name__ == &quot;__main__&quot;: uvicorn.run(&quot;main:app&quot;, host=&quot;127.0.0.1&quot;, port=80) "><pre class="notranslate"><code class="notranslate">"" import uvicorn from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from app.api.routes.router import api_router from app.core.logging import init_logging from app.core.config import settings init_logging() def get_app() -&gt; FastAPI: application = FastAPI(title=settings.APP_NAME, version=settings.APP_VERSION, debug=settings.DEBUG) if settings.BACKEND_CORS_ORIGINS: # middleware support for cors application.add_middleware( CORSMiddleware, allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) application.include_router(api_router, prefix=settings.API_V1_STR) return application app = get_app() if __name__ == "__main__": uvicorn.run("main:app", host="127.0.0.1", port=80) </code></pre></div> <p dir="auto"><code class="notranslate">router.py</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" from fastapi import APIRouter from app.api.routes import audit api_router = APIRouter() api_router.include_router(audit.router, tags=[&quot;audit&quot;], prefix=&quot;/audit&quot;)"><pre class="notranslate"><code class="notranslate"> from fastapi import APIRouter from app.api.routes import audit api_router = APIRouter() api_router.include_router(audit.router, tags=["audit"], prefix="/audit") </code></pre></div> <p dir="auto"><code class="notranslate">audit.py</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import validators from fastapi import APIRouter, HTTPException from loguru import logger from app.api.dependencies.audit import analyzer from app.schemas.audit import AuditPayload, AuditResult router = APIRouter() @router.post(&quot;/&quot;, response_model=AuditResult, name=&quot;audit&quot;, status_code=200) async def post_audit(payload: AuditPayload) -&gt; AuditResult: logger.info(&quot;Audit request received&quot;) # validate URL try: logger.info(&quot;Validating URL&quot;) validators.url(payload.url) except HTTPException: HTTPException(status_code=404, detail=&quot;Invalid URL.&quot;) logger.exception(&quot;HTTPException - Invalid URL&quot;) # generate output from route audit.py logger.info(&quot;Running audit analysis. This could take up to 10 minutes. Maybe grab a coffee...&quot;) analyzed_output = analyzer.analyze(url=payload.url, brand=payload.brand, twitter_screen_name=payload.twitter_screen_name, facebook_page_name=payload.facebook_page_name, instagram_screen_name=payload.instagram_screen_name, youtube_user_name=payload.youtube_user_name, ignore_robots=payload.ignore_robots, ignore_sitemap=payload.ignore_sitemap, google_analytics_view_id=payload.google_analytics_view_id) output = AuditResult(**analyzed_output) return output "><pre class="notranslate"><code class="notranslate">import validators from fastapi import APIRouter, HTTPException from loguru import logger from app.api.dependencies.audit import analyzer from app.schemas.audit import AuditPayload, AuditResult router = APIRouter() @router.post("/", response_model=AuditResult, name="audit", status_code=200) async def post_audit(payload: AuditPayload) -&gt; AuditResult: logger.info("Audit request received") # validate URL try: logger.info("Validating URL") validators.url(payload.url) except HTTPException: HTTPException(status_code=404, detail="Invalid URL.") logger.exception("HTTPException - Invalid URL") # generate output from route audit.py logger.info("Running audit analysis. This could take up to 10 minutes. Maybe grab a coffee...") analyzed_output = analyzer.analyze(url=payload.url, brand=payload.brand, twitter_screen_name=payload.twitter_screen_name, facebook_page_name=payload.facebook_page_name, instagram_screen_name=payload.instagram_screen_name, youtube_user_name=payload.youtube_user_name, ignore_robots=payload.ignore_robots, ignore_sitemap=payload.ignore_sitemap, google_analytics_view_id=payload.google_analytics_view_id) output = AuditResult(**analyzed_output) return output </code></pre></div> <p dir="auto"><code class="notranslate">audit_models.py</code>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from pydantic import BaseModel class AuditPayload(BaseModel): url: str brand: str twitter_screen_name: str facebook_page_name: str instagram_screen_name: str youtube_user_name: str ignore_robots: bool ignore_sitemap: bool google_analytics_view_id: str class AuditResult(BaseModel): base_url: str run_time: float website_404: dict website_302: dict website_h1_tags: dict website_duplicate_h1: dict website_h2_tags: dict website_page_duplications: dict website_page_similarities: dict website_page_desc_duplications: dict website_page_title_duplications: dict pages: list pages_out_links_404: dict = None pages_canonicals: dict seo_phrases: dict social: dict google_analytics_report: dict google_psi_desktop: dict google_psi_mobile: dict google_algo_updates: dict google_sb: list robots_txt: list "><pre class="notranslate"><code class="notranslate">from pydantic import BaseModel class AuditPayload(BaseModel): url: str brand: str twitter_screen_name: str facebook_page_name: str instagram_screen_name: str youtube_user_name: str ignore_robots: bool ignore_sitemap: bool google_analytics_view_id: str class AuditResult(BaseModel): base_url: str run_time: float website_404: dict website_302: dict website_h1_tags: dict website_duplicate_h1: dict website_h2_tags: dict website_page_duplications: dict website_page_similarities: dict website_page_desc_duplications: dict website_page_title_duplications: dict pages: list pages_out_links_404: dict = None pages_canonicals: dict seo_phrases: dict social: dict google_analytics_report: dict google_psi_desktop: dict google_psi_mobile: dict google_algo_updates: dict google_sb: list robots_txt: list </code></pre></div> <p dir="auto">This line throws the error in the logs:<br> 2020-09-10 10:02:31.483 | ERROR | uvicorn.protocols.http.h11_impl:run_asgi:391 - Exception in ASGI application</p> <p dir="auto">I've included the full stack trace as I'm not sure which bit is most relevant, but I believe this has something to do with it:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;pydantic\main.py&quot;, line 623, in pydantic.main.BaseModel._get_value [Previous line repeated 722 more times]"><pre class="notranslate"><code class="notranslate"> File "pydantic\main.py", line 623, in pydantic.main.BaseModel._get_value [Previous line repeated 722 more times] </code></pre></div> <p dir="auto">Full traceback:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py&quot;, line 483, in &lt;module&gt; pydevconsole.start_client(host, port) │ │ │ └ 50488 │ │ └ '127.0.0.1' │ └ &lt;function start_client at 0x000001BCEDC19D08&gt; └ &lt;module 'pydevconsole' from 'C:\\Users\\&lt;user&gt;\\AppData\\Local\\JetBrains\\Toolbox\\apps\\PyCharm-P\\ch-0\\202.6948.78\\pl... File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py&quot;, line 411, in start_client process_exec_queue(interpreter) │ └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; └ &lt;function process_exec_queue at 0x000001BCEDC19A60&gt; File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py&quot;, line 258, in process_exec_queue more = interpreter.add_exec(code_fragment) │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ └ &lt;function BaseCodeExecutor.add_exec at 0x000001BCECF38488&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_code_executor.py&quot;, line 106, in add_exec more = self.do_add_exec(code_fragment) │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ └ &lt;function InterpreterInterface.do_add_exec at 0x000001BCEDC15D90&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_ipython_console.py&quot;, line 36, in do_add_exec res = bool(self.interpreter.add_exec(code_fragment.text)) │ │ │ │ └ &quot;runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... │ │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ │ └ &lt;function _PyDevFrontEnd.add_exec at 0x000001BCEDC15A60&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011._PyDevFrontEnd object at 0x000001BCEDC350B8&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py&quot;, line 483, in add_exec self.ipython.run_cell(line, store_history=True) │ │ │ └ &quot;runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... │ │ └ &lt;function InteractiveShell.run_cell at 0x000001BCED5E7268&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; └ &lt;_pydev_bundle.pydev_ipython_console_011._PyDevFrontEnd object at 0x000001BCEDC350B8&gt; File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 2843, in run_cell raw_cell, store_history, silent, shell_futures) │ │ │ └ True │ │ └ False │ └ True └ &quot;runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 2869, in _run_cell return runner(coro) │ └ &lt;generator object InteractiveShell.run_cell_async at 0x000001BCEDC49C78&gt; └ &lt;function _pseudo_sync_runner at 0x000001BCED5D0C80&gt; File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\async_helpers.py&quot;, line 67, in _pseudo_sync_runner coro.send(None) │ └ &lt;method 'send' of 'generator' objects&gt; └ &lt;generator object InteractiveShell.run_cell_async at 0x000001BCEDC49C78&gt; File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 3044, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) │ │ └ &lt;ExecutionResult object at 1bcedcd3470, execution_count=2 error_before_exec=None error_in_exec=None info=&lt;ExecutionInfo objec... │ └ &lt;IPython.core.compilerop.CachingCompiler object at 0x000001BCEDC356D8&gt; └ 'last_expr' File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 3215, in run_ast_nodes if (yield from self.run_code(code, result)): │ │ │ └ &lt;ExecutionResult object at 1bcedcd3470, execution_count=2 error_before_exec=None error_in_exec=None info=&lt;ExecutionInfo objec... │ │ └ &lt;code object &lt;module&gt; at 0x000001BCEDCDADB0, file &quot;&lt;ipython-input-2-086756a0f1dd&gt;&quot;, line 1&gt; │ └ &lt;function InteractiveShell.run_code at 0x000001BCED5E76A8&gt; └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; File &quot;C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 3291, in run_code exec(code_obj, self.user_global_ns, self.user_ns) │ │ │ │ └ {'__name__': 'pydev_umd', '__doc__': 'Automatically created module for IPython interactive environment', '__package__': None,... │ │ │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; │ │ └ &lt;property object at 0x000001BCED5D8958&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; └ &lt;code object &lt;module&gt; at 0x000001BCEDCDADB0, file &quot;&lt;ipython-input-2-086756a0f1dd&gt;&quot;, line 1&gt; File &quot;&lt;ipython-input-2-086756a0f1dd&gt;&quot;, line 1, in &lt;module&gt; runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app') File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py&quot;, line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script │ │ │ │ └ {'__name__': '__main__', '__doc__': &quot;\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ │ └ {'__name__': '__main__', '__doc__': &quot;\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ └ 'E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py' │ └ &lt;function execfile at 0x000001BCECC521E0&gt; └ &lt;module '_pydev_bundle.pydev_imports' from 'C:\\Users\\&lt;user&gt;\\AppData\\Local\\JetBrains\\Toolbox\\apps\\PyCharm-P\\ch-0\\... File &quot;C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py&quot;, line 18, in execfile exec(compile(contents+&quot;\n&quot;, file, 'exec'), glob, loc) │ │ │ └ {'__name__': '__main__', '__doc__': &quot;\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ └ {'__name__': '__main__', '__doc__': &quot;\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ └ 'E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py' └ '#!/usr/bin/env python\n\n&quot;&quot;&quot;\nMain entry point into API for endpoints related to HawkSense\'s main functionality.\ntodo: htt... File &quot;E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app\main.py&quot;, line 47, in &lt;module&gt; uvicorn.run(&quot;main:app&quot;, host=&quot;127.0.0.1&quot;, port=80) # for debug only │ └ &lt;function run at 0x000001BCEDE041E0&gt; └ &lt;module 'uvicorn' from 'C:\\Program Files\\Python37\\lib\\site-packages\\uvicorn\\__init__.py'&gt; File &quot;C:\Program Files\Python37\lib\site-packages\uvicorn\main.py&quot;, line 362, in run server.run() │ └ &lt;function Server.run at 0x000001BCEDE4B510&gt; └ &lt;uvicorn.main.Server object at 0x000001BCFC722198&gt; File &quot;C:\Program Files\Python37\lib\site-packages\uvicorn\main.py&quot;, line 390, in run loop.run_until_complete(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ &lt;function Server.serve at 0x000001BCEDE4B598&gt; │ │ └ &lt;uvicorn.main.Server object at 0x000001BCFC722198&gt; │ └ &lt;function BaseEventLoop.run_until_complete at 0x000001BCED49FE18&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File &quot;C:\Program Files\Python37\lib\asyncio\base_events.py&quot;, line 560, in run_until_complete self.run_forever() │ └ &lt;function BaseEventLoop.run_forever at 0x000001BCED49FD90&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File &quot;C:\Program Files\Python37\lib\asyncio\base_events.py&quot;, line 528, in run_forever self._run_once() │ └ &lt;function BaseEventLoop._run_once at 0x000001BCED4A27B8&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File &quot;C:\Program Files\Python37\lib\asyncio\base_events.py&quot;, line 1764, in _run_once handle._run() │ └ &lt;function Handle._run at 0x000001BCED43AB70&gt; └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; File &quot;C:\Program Files\Python37\lib\asyncio\events.py&quot;, line 88, in _run self._context.run(self._callback, *self._args) │ │ │ │ │ └ &lt;member '_args' of 'Handle' objects&gt; │ │ │ │ └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; │ │ │ └ &lt;member '_callback' of 'Handle' objects&gt; │ │ └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; │ └ &lt;member '_context' of 'Handle' objects&gt; └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; &gt; File &quot;C:\Program Files\Python37\lib\site-packages\uvicorn\protocols\http\h11_impl.py&quot;, line 388, in run_asgi result = await app(self.scope, self.receive, self.send) │ │ │ │ │ │ └ &lt;function RequestResponseCycle.send at 0x000001BCFC757840&gt; │ │ │ │ │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; │ │ │ │ └ &lt;function RequestResponseCycle.receive at 0x000001BCFC7578C8&gt; │ │ │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; └ &lt;uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x000001BCFC722BA8&gt; File &quot;C:\Program Files\Python37\lib\site-packages\uvicorn\middleware\proxy_headers.py&quot;, line 45, in __call__ return await self.app(scope, receive, send) │ │ │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;fastapi.applications.FastAPI object at 0x000001BCFC722710&gt; └ &lt;uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x000001BCFC722BA8&gt; File &quot;C:\Program Files\Python37\lib\site-packages\fastapi\applications.py&quot;, line 149, in __call__ await super().__call__(scope, receive, send) │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... File &quot;C:\Program Files\Python37\lib\site-packages\starlette\applications.py&quot;, line 102, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.middleware.errors.ServerErrorMiddleware object at 0x000001BCFC7B8FD0&gt; └ &lt;fastapi.applications.FastAPI object at 0x000001BCFC722710&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\middleware\errors.py&quot;, line 181, in __call__ raise exc from None File &quot;C:\Program Files\Python37\lib\site-packages\starlette\middleware\errors.py&quot;, line 159, in __call__ await self.app(scope, receive, _send) │ │ │ │ └ &lt;function ServerErrorMiddleware.__call__.&lt;locals&gt;._send at 0x000001BCFC72AE18&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; └ &lt;starlette.middleware.errors.ServerErrorMiddleware object at 0x000001BCFC7B8FD0&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\middleware\cors.py&quot;, line 84, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) │ │ │ │ │ └ Headers({'host': '127.0.0.1', 'connection': 'keep-alive', 'content-length': '295', 'accept': 'application/json', 'user-agent'... │ │ │ │ └ &lt;function ServerErrorMiddleware.__call__.&lt;locals&gt;._send at 0x000001BCFC72AE18&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function CORSMiddleware.simple_response at 0x000001BCEE53DC80&gt; └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\middleware\cors.py&quot;, line 140, in simple_response await self.app(scope, receive, send) │ │ │ │ └ functools.partial(&lt;bound method CORSMiddleware.send of &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60... │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.exceptions.ExceptionMiddleware object at 0x000001BCFC7B8E48&gt; └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\exceptions.py&quot;, line 82, in __call__ raise exc from None File &quot;C:\Program Files\Python37\lib\site-packages\starlette\exceptions.py&quot;, line 71, in __call__ await self.app(scope, receive, sender) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;fastapi.routing.APIRouter object at 0x000001BCFC7220F0&gt; └ &lt;starlette.exceptions.ExceptionMiddleware object at 0x000001BCFC7B8E48&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\routing.py&quot;, line 550, in __call__ await route.handle(scope, receive, send) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function Route.handle at 0x000001BCEE4FF6A8&gt; └ &lt;fastapi.routing.APIRoute object at 0x000001BCFC7B8E80&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\routing.py&quot;, line 227, in handle await self.app(scope, receive, send) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function request_response.&lt;locals&gt;.app at 0x000001BCFC7C1A60&gt; └ &lt;fastapi.routing.APIRoute object at 0x000001BCFC7B8E80&gt; File &quot;C:\Program Files\Python37\lib\site-packages\starlette\routing.py&quot;, line 41, in app response = await func(request) │ └ &lt;starlette.requests.Request object at 0x000001BCFC7D4588&gt; └ &lt;function get_request_handler.&lt;locals&gt;.app at 0x000001BCFC7C19D8&gt; File &quot;C:\Program Files\Python37\lib\site-packages\fastapi\routing.py&quot;, line 213, in app is_coroutine=is_coroutine, └ True File &quot;C:\Program Files\Python37\lib\site-packages\fastapi\routing.py&quot;, line 113, in serialize_response exclude_none=exclude_none, └ False File &quot;C:\Program Files\Python37\lib\site-packages\fastapi\routing.py&quot;, line 65, in _prepare_response_content exclude_none=exclude_none, └ False File &quot;pydantic\main.py&quot;, line 386, in pydantic.main.BaseModel.dict File &quot;pydantic\main.py&quot;, line 706, in _iter File &quot;pydantic\main.py&quot;, line 623, in pydantic.main.BaseModel._get_value File &quot;pydantic\main.py&quot;, line 623, in pydantic.main.BaseModel._get_value File &quot;pydantic\main.py&quot;, line 623, in pydantic.main.BaseModel._get_value [Previous line repeated 722 more times] File &quot;pydantic\main.py&quot;, line 605, in pydantic.main.BaseModel._get_value File &quot;C:\Program Files\Python37\lib\abc.py&quot;, line 139, in __instancecheck__ return _abc_instancecheck(cls, instance) │ │ └ 8 │ └ &lt;class 'pydantic.main.BaseModel'&gt; └ &lt;built-in function _abc_instancecheck&gt; RecursionError: maximum recursion depth exceeded in comparison``` "><pre lang="Traceback" class="notranslate"><code class="notranslate"> File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py", line 483, in &lt;module&gt; pydevconsole.start_client(host, port) │ │ │ └ 50488 │ │ └ '127.0.0.1' │ └ &lt;function start_client at 0x000001BCEDC19D08&gt; └ &lt;module 'pydevconsole' from 'C:\\Users\\&lt;user&gt;\\AppData\\Local\\JetBrains\\Toolbox\\apps\\PyCharm-P\\ch-0\\202.6948.78\\pl... File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py", line 411, in start_client process_exec_queue(interpreter) │ └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; └ &lt;function process_exec_queue at 0x000001BCEDC19A60&gt; File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\pydevconsole.py", line 258, in process_exec_queue more = interpreter.add_exec(code_fragment) │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ └ &lt;function BaseCodeExecutor.add_exec at 0x000001BCECF38488&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_code_executor.py", line 106, in add_exec more = self.do_add_exec(code_fragment) │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ └ &lt;function InterpreterInterface.do_add_exec at 0x000001BCEDC15D90&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_ipython_console.py", line 36, in do_add_exec res = bool(self.interpreter.add_exec(code_fragment.text)) │ │ │ │ └ "runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... │ │ │ └ &lt;_pydev_bundle.pydev_console_types.CodeFragment object at 0x000001BCEDCFE748&gt; │ │ └ &lt;function _PyDevFrontEnd.add_exec at 0x000001BCEDC15A60&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011._PyDevFrontEnd object at 0x000001BCEDC350B8&gt; └ &lt;_pydev_bundle.pydev_ipython_console.InterpreterInterface object at 0x000001BCEDC1BF98&gt; File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 483, in add_exec self.ipython.run_cell(line, store_history=True) │ │ │ └ "runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... │ │ └ &lt;function InteractiveShell.run_cell at 0x000001BCED5E7268&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; └ &lt;_pydev_bundle.pydev_ipython_console_011._PyDevFrontEnd object at 0x000001BCEDC350B8&gt; File "C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 2843, in run_cell raw_cell, store_history, silent, shell_futures) │ │ │ └ True │ │ └ False │ └ True └ "runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Docume... File "C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 2869, in _run_cell return runner(coro) │ └ &lt;generator object InteractiveShell.run_cell_async at 0x000001BCEDC49C78&gt; └ &lt;function _pseudo_sync_runner at 0x000001BCED5D0C80&gt; File "C:\Program Files\Python37\lib\site-packages\IPython\core\async_helpers.py", line 67, in _pseudo_sync_runner coro.send(None) │ └ &lt;method 'send' of 'generator' objects&gt; └ &lt;generator object InteractiveShell.run_cell_async at 0x000001BCEDC49C78&gt; File "C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 3044, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) │ │ └ &lt;ExecutionResult object at 1bcedcd3470, execution_count=2 error_before_exec=None error_in_exec=None info=&lt;ExecutionInfo objec... │ └ &lt;IPython.core.compilerop.CachingCompiler object at 0x000001BCEDC356D8&gt; └ 'last_expr' File "C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 3215, in run_ast_nodes if (yield from self.run_code(code, result)): │ │ │ └ &lt;ExecutionResult object at 1bcedcd3470, execution_count=2 error_before_exec=None error_in_exec=None info=&lt;ExecutionInfo objec... │ │ └ &lt;code object &lt;module&gt; at 0x000001BCEDCDADB0, file "&lt;ipython-input-2-086756a0f1dd&gt;", line 1&gt; │ └ &lt;function InteractiveShell.run_code at 0x000001BCED5E76A8&gt; └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; File "C:\Program Files\Python37\lib\site-packages\IPython\core\interactiveshell.py", line 3291, in run_code exec(code_obj, self.user_global_ns, self.user_ns) │ │ │ │ └ {'__name__': 'pydev_umd', '__doc__': 'Automatically created module for IPython interactive environment', '__package__': None,... │ │ │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; │ │ └ &lt;property object at 0x000001BCED5D8958&gt; │ └ &lt;_pydev_bundle.pydev_ipython_console_011.PyDevTerminalInteractiveShell object at 0x000001BCEDC350F0&gt; └ &lt;code object &lt;module&gt; at 0x000001BCEDCDADB0, file "&lt;ipython-input-2-086756a0f1dd&gt;", line 1&gt; File "&lt;ipython-input-2-086756a0f1dd&gt;", line 1, in &lt;module&gt; runfile('E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py', wdir='E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app') File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script │ │ │ │ └ {'__name__': '__main__', '__doc__': "\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ │ └ {'__name__': '__main__', '__doc__': "\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ └ 'E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py' │ └ &lt;function execfile at 0x000001BCECC521E0&gt; └ &lt;module '_pydev_bundle.pydev_imports' from 'C:\\Users\\&lt;user&gt;\\AppData\\Local\\JetBrains\\Toolbox\\apps\\PyCharm-P\\ch-0\\... File "C:\Users\&lt;user&gt;\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\202.6948.78\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) │ │ │ └ {'__name__': '__main__', '__doc__': "\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ │ └ {'__name__': '__main__', '__doc__': "\nMain entry point into API for endpoints related to HawkSense's main functionality.\nto... │ └ 'E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app/main.py' └ '#!/usr/bin/env python\n\n"""\nMain entry point into API for endpoints related to HawkSense\'s main functionality.\ntodo: htt... File "E:/Users/&lt;user&gt;/Documents/GitHub/HawkSense/backend/app/app\main.py", line 47, in &lt;module&gt; uvicorn.run("main:app", host="127.0.0.1", port=80) # for debug only │ └ &lt;function run at 0x000001BCEDE041E0&gt; └ &lt;module 'uvicorn' from 'C:\\Program Files\\Python37\\lib\\site-packages\\uvicorn\\__init__.py'&gt; File "C:\Program Files\Python37\lib\site-packages\uvicorn\main.py", line 362, in run server.run() │ └ &lt;function Server.run at 0x000001BCEDE4B510&gt; └ &lt;uvicorn.main.Server object at 0x000001BCFC722198&gt; File "C:\Program Files\Python37\lib\site-packages\uvicorn\main.py", line 390, in run loop.run_until_complete(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ &lt;function Server.serve at 0x000001BCEDE4B598&gt; │ │ └ &lt;uvicorn.main.Server object at 0x000001BCFC722198&gt; │ └ &lt;function BaseEventLoop.run_until_complete at 0x000001BCED49FE18&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File "C:\Program Files\Python37\lib\asyncio\base_events.py", line 560, in run_until_complete self.run_forever() │ └ &lt;function BaseEventLoop.run_forever at 0x000001BCED49FD90&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File "C:\Program Files\Python37\lib\asyncio\base_events.py", line 528, in run_forever self._run_once() │ └ &lt;function BaseEventLoop._run_once at 0x000001BCED4A27B8&gt; └ &lt;_WindowsSelectorEventLoop running=True closed=False debug=False&gt; File "C:\Program Files\Python37\lib\asyncio\base_events.py", line 1764, in _run_once handle._run() │ └ &lt;function Handle._run at 0x000001BCED43AB70&gt; └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; File "C:\Program Files\Python37\lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) │ │ │ │ │ └ &lt;member '_args' of 'Handle' objects&gt; │ │ │ │ └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; │ │ │ └ &lt;member '_callback' of 'Handle' objects&gt; │ │ └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; │ └ &lt;member '_context' of 'Handle' objects&gt; └ &lt;Handle &lt;TaskStepMethWrapper object at 0x000001BCFC7D4B00&gt;()&gt; &gt; File "C:\Program Files\Python37\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 388, in run_asgi result = await app(self.scope, self.receive, self.send) │ │ │ │ │ │ └ &lt;function RequestResponseCycle.send at 0x000001BCFC757840&gt; │ │ │ │ │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; │ │ │ │ └ &lt;function RequestResponseCycle.receive at 0x000001BCFC7578C8&gt; │ │ │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt; └ &lt;uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x000001BCFC722BA8&gt; File "C:\Program Files\Python37\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 45, in __call__ return await self.app(scope, receive, send) │ │ │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;fastapi.applications.FastAPI object at 0x000001BCFC722710&gt; └ &lt;uvicorn.middleware.proxy_headers.ProxyHeadersMiddleware object at 0x000001BCFC722BA8&gt; File "C:\Program Files\Python37\lib\site-packages\fastapi\applications.py", line 149, in __call__ await super().__call__(scope, receive, send) │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... File "C:\Program Files\Python37\lib\site-packages\starlette\applications.py", line 102, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ &lt;bound method RequestResponseCycle.send of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4A90&gt;&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.middleware.errors.ServerErrorMiddleware object at 0x000001BCFC7B8FD0&gt; └ &lt;fastapi.applications.FastAPI object at 0x000001BCFC722710&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__ raise exc from None File "C:\Program Files\Python37\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__ await self.app(scope, receive, _send) │ │ │ │ └ &lt;function ServerErrorMiddleware.__call__.&lt;locals&gt;._send at 0x000001BCFC72AE18&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; └ &lt;starlette.middleware.errors.ServerErrorMiddleware object at 0x000001BCFC7B8FD0&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\middleware\cors.py", line 84, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) │ │ │ │ │ └ Headers({'host': '127.0.0.1', 'connection': 'keep-alive', 'content-length': '295', 'accept': 'application/json', 'user-agent'... │ │ │ │ └ &lt;function ServerErrorMiddleware.__call__.&lt;locals&gt;._send at 0x000001BCFC72AE18&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function CORSMiddleware.simple_response at 0x000001BCEE53DC80&gt; └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\middleware\cors.py", line 140, in simple_response await self.app(scope, receive, send) │ │ │ │ └ functools.partial(&lt;bound method CORSMiddleware.send of &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60... │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;starlette.exceptions.ExceptionMiddleware object at 0x000001BCFC7B8E48&gt; └ &lt;starlette.middleware.cors.CORSMiddleware object at 0x000001BCFC7B8F60&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\exceptions.py", line 82, in __call__ raise exc from None File "C:\Program Files\Python37\lib\site-packages\starlette\exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;fastapi.routing.APIRouter object at 0x000001BCFC7220F0&gt; └ &lt;starlette.exceptions.ExceptionMiddleware object at 0x000001BCFC7B8E48&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\routing.py", line 550, in __call__ await route.handle(scope, receive, send) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function Route.handle at 0x000001BCEE4FF6A8&gt; └ &lt;fastapi.routing.APIRoute object at 0x000001BCFC7B8E80&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\routing.py", line 227, in handle await self.app(scope, receive, send) │ │ │ │ └ &lt;function ExceptionMiddleware.__call__.&lt;locals&gt;.sender at 0x000001BCFC7C18C8&gt; │ │ │ └ &lt;bound method RequestResponseCycle.receive of &lt;uvicorn.protocols.http.h11_impl.RequestResponseCycle object at 0x000001BCFC7D4... │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.1'}, 'http_version': '1.1', 'server': ('127.0.0.1', 80), 'clie... │ └ &lt;function request_response.&lt;locals&gt;.app at 0x000001BCFC7C1A60&gt; └ &lt;fastapi.routing.APIRoute object at 0x000001BCFC7B8E80&gt; File "C:\Program Files\Python37\lib\site-packages\starlette\routing.py", line 41, in app response = await func(request) │ └ &lt;starlette.requests.Request object at 0x000001BCFC7D4588&gt; └ &lt;function get_request_handler.&lt;locals&gt;.app at 0x000001BCFC7C19D8&gt; File "C:\Program Files\Python37\lib\site-packages\fastapi\routing.py", line 213, in app is_coroutine=is_coroutine, └ True File "C:\Program Files\Python37\lib\site-packages\fastapi\routing.py", line 113, in serialize_response exclude_none=exclude_none, └ False File "C:\Program Files\Python37\lib\site-packages\fastapi\routing.py", line 65, in _prepare_response_content exclude_none=exclude_none, └ False File "pydantic\main.py", line 386, in pydantic.main.BaseModel.dict File "pydantic\main.py", line 706, in _iter File "pydantic\main.py", line 623, in pydantic.main.BaseModel._get_value File "pydantic\main.py", line 623, in pydantic.main.BaseModel._get_value File "pydantic\main.py", line 623, in pydantic.main.BaseModel._get_value [Previous line repeated 722 more times] File "pydantic\main.py", line 605, in pydantic.main.BaseModel._get_value File "C:\Program Files\Python37\lib\abc.py", line 139, in __instancecheck__ return _abc_instancecheck(cls, instance) │ │ └ 8 │ └ &lt;class 'pydantic.main.BaseModel'&gt; └ &lt;built-in function _abc_instancecheck&gt; RecursionError: maximum recursion depth exceeded in comparison``` </code></pre></div>
<h3 dir="auto">First Check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> </ul> <h3 dir="auto">Commit to Help</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options 👆</li> </ul> <h3 dir="auto">Example Code</h3> <p dir="auto">Here's <code class="notranslate">conftest.py</code> where I attempt to define a fixture that takes care of creating a test PostgreSQL database in the beginning of the test session, and dropping it after the test suite is done running:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Base = declarative_base() @pytest.fixture(scope=&quot;session&quot;) def db_engine(): default_db = ( &quot;postgresql+asyncpg://postgres:postgres@postgres:5432/postgres&quot; ) test_db = &quot;postgresql+asyncpg://postgres:postgres@postgres:5432/test&quot; engine = create_async_engine(default_db) if not database_exists(test_db): # &lt;- Getting error on this line create_database(test_db) Base.metadata.create_all(bind=engine) yield engine @pytest.fixture(scope=&quot;function&quot;) def db(db_engine): connection = db_engine.connect() # begin a non-ORM transaction connection.begin() # bind an individual Session to the connection Session = sessionmaker(bind=connection) db = Session() # db = Session(db_engine) yield db db.rollback() connection.close() @pytest.fixture(scope=&quot;function&quot;) def client(db): app.dependency_overrides[get_session] = lambda: db PREFIX = &quot;/api/v1/my-endpoint&quot; with TestClient(PREFIX, app) as c: yield c"><pre class="notranslate"><span class="pl-v">Base</span> <span class="pl-c1">=</span> <span class="pl-en">declarative_base</span>() <span class="pl-en">@<span class="pl-s1">pytest</span>.<span class="pl-en">fixture</span>(<span class="pl-s1">scope</span><span class="pl-c1">=</span><span class="pl-s">"session"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">db_engine</span>(): <span class="pl-s1">default_db</span> <span class="pl-c1">=</span> ( <span class="pl-s">"postgresql+asyncpg://postgres:postgres@postgres:5432/postgres"</span> ) <span class="pl-s1">test_db</span> <span class="pl-c1">=</span> <span class="pl-s">"postgresql+asyncpg://postgres:postgres@postgres:5432/test"</span> <span class="pl-s1">engine</span> <span class="pl-c1">=</span> <span class="pl-en">create_async_engine</span>(<span class="pl-s1">default_db</span>) <span class="pl-k">if</span> <span class="pl-c1">not</span> <span class="pl-en">database_exists</span>(<span class="pl-s1">test_db</span>): <span class="pl-c"># &lt;- Getting error on this line</span> <span class="pl-en">create_database</span>(<span class="pl-s1">test_db</span>) <span class="pl-v">Base</span>.<span class="pl-s1">metadata</span>.<span class="pl-en">create_all</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">engine</span>) <span class="pl-k">yield</span> <span class="pl-s1">engine</span> <span class="pl-en">@<span class="pl-s1">pytest</span>.<span class="pl-en">fixture</span>(<span class="pl-s1">scope</span><span class="pl-c1">=</span><span class="pl-s">"function"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">db</span>(<span class="pl-s1">db_engine</span>): <span class="pl-s1">connection</span> <span class="pl-c1">=</span> <span class="pl-s1">db_engine</span>.<span class="pl-en">connect</span>() <span class="pl-c"># begin a non-ORM transaction</span> <span class="pl-s1">connection</span>.<span class="pl-en">begin</span>() <span class="pl-c"># bind an individual Session to the connection</span> <span class="pl-v">Session</span> <span class="pl-c1">=</span> <span class="pl-en">sessionmaker</span>(<span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-s1">connection</span>) <span class="pl-s1">db</span> <span class="pl-c1">=</span> <span class="pl-v">Session</span>() <span class="pl-c"># db = Session(db_engine)</span> <span class="pl-k">yield</span> <span class="pl-s1">db</span> <span class="pl-s1">db</span>.<span class="pl-en">rollback</span>() <span class="pl-s1">connection</span>.<span class="pl-en">close</span>() <span class="pl-en">@<span class="pl-s1">pytest</span>.<span class="pl-en">fixture</span>(<span class="pl-s1">scope</span><span class="pl-c1">=</span><span class="pl-s">"function"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">client</span>(<span class="pl-s1">db</span>): <span class="pl-s1">app</span>.<span class="pl-s1">dependency_overrides</span>[<span class="pl-s1">get_session</span>] <span class="pl-c1">=</span> <span class="pl-k">lambda</span>: <span class="pl-s1">db</span> <span class="pl-v">PREFIX</span> <span class="pl-c1">=</span> <span class="pl-s">"/api/v1/my-endpoint"</span> <span class="pl-k">with</span> <span class="pl-v">TestClient</span>(<span class="pl-v">PREFIX</span>, <span class="pl-s1">app</span>) <span class="pl-k">as</span> <span class="pl-s1">c</span>: <span class="pl-k">yield</span> <span class="pl-s1">c</span></pre></div> <p dir="auto">Here's the error I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: Task &lt;Task pending name='anyio.from_thread.BlockingPortal._call_func' coro=&lt;BlockingPortal._call_func() running at /usr/local/lib/python3.9/site-packages/anyio/from_thread.py:187&gt; cb=[TaskGroup._spawn.&lt;locals&gt;.task_done() at /usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py:629]&gt; got Future &lt;Future pending cb=[Protocol._on_waiter_completed()]&gt; attached to a different loop (Background on this error at: https://sqlalche.me/e/14/7s2a) /usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py:601: PendingRollbackError"><pre class="notranslate"><code class="notranslate">E sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: Task &lt;Task pending name='anyio.from_thread.BlockingPortal._call_func' coro=&lt;BlockingPortal._call_func() running at /usr/local/lib/python3.9/site-packages/anyio/from_thread.py:187&gt; cb=[TaskGroup._spawn.&lt;locals&gt;.task_done() at /usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py:629]&gt; got Future &lt;Future pending cb=[Protocol._on_waiter_completed()]&gt; attached to a different loop (Background on this error at: https://sqlalche.me/e/14/7s2a) /usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py:601: PendingRollbackError </code></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">I'm trying to create and drop test database during tests but I couldn't find any resources helping me do that. I posted to questions on StackOverflow (<a href="https://stackoverflow.com/questions/70752806/how-to-use-postgresql-test-database-in-async-fastapi-tests" rel="nofollow">this</a> and <a href="https://stackoverflow.com/questions/70798578/pendingrollbackerror-when-accessing-test-database-in-fastapi-async-test" rel="nofollow">this</a>) but got no answer. I believe this is a common use-case, so I figure I'd ask here. If this is possible, I believe an example of how to do it should be added to the documentation.</p> <h3 dir="auto">Operating System</h3> <p dir="auto">macOS</p> <h3 dir="auto">Operating System Details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">FastAPI Version</h3> <p dir="auto">0.70.1</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.9.9</p> <h3 dir="auto">Additional Context</h3> <p dir="auto"><em>No response</em></p>
0
<p dir="auto"><strong>Glide Version</strong>:4.6.1<br> <strong>Integration libraries</strong>: okhttp3<br> <strong>Device/Android Version</strong>:all<br> <strong>Issue details / Repro steps / Use case background</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GlideApp.with(imageView.context) .load(url) .thumbnail(GlideApp.with(imageView.context) .load(thumbnail)) .transition(withCrossFade()) .error(R.drawable.ic_error_outline_24dp) .into(imageView)"><pre class="notranslate"><code class="notranslate">GlideApp.with(imageView.context) .load(url) .thumbnail(GlideApp.with(imageView.context) .load(thumbnail)) .transition(withCrossFade()) .error(R.drawable.ic_error_outline_24dp) .into(imageView) </code></pre></div> <p dir="auto">So maybe my usage is not correct but I want to load the thumbnail with has a square size (let's say 150 * 150) and then show the full resolution image (let's say 640 * 800).<br> The final image has a square size once load instead to the right one. If I remove the transition <code class="notranslate">.transition(withCrossFade())</code> then the final image is ok.</p> <p dir="auto">Any idea ?</p>
<p dir="auto">After the Make Project, it still prompts "can not resolve symbol 'GlideApp',Ask for help~</p> <p dir="auto">`compile 'com.github.bumptech.glide:glide:4.0.0-RC1'</p> <p dir="auto">annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'`</p> <p dir="auto"><code class="notranslate">@GlideModule public final class MyAppGlideModule extends AppGlideModule {}</code></p> <p dir="auto">Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored</p>
0
<p dir="auto">Namespace packages are the source of all kinds of user errors.</p> <p dir="auto">This would involve moving basemap (and any other 3rd-party packages that install into <code class="notranslate">mpl_toolkits</code>, if they exist) to the top-level and installing a shim so it could still be imported from the old location.</p> <p dir="auto">Cc: <del><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jswhit/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jswhit">@jswhit</a></del> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/WeatherGod/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/WeatherGod">@WeatherGod</a> to coordinate.</p> <p dir="auto">Cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jenshnielsen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jenshnielsen">@jenshnielsen</a></p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">As of <a href="https://setuptools.pypa.io/en/latest/history.html#v67-3-0" rel="nofollow">setuptools v67.3.0</a> the use of <code class="notranslate">pkg_resources.declare_namespace</code> in <a href="https://github.com/matplotlib/matplotlib/blob/f6e0ee49c598f59c6e6cf4eefe473e4dc634a58a/lib/mpl_toolkits/__init__.py#L2"><code class="notranslate">lib/mpl_toolkits/__init__.py</code></a> raises a <code class="notranslate">DeprecationWarning</code>.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mamba create -n test python=3.10 matplotlib-base -y $ mamba activate test $ export PYTHONDEVMODE=1 $ python -c &quot;import pkg_resources&quot;"><pre class="notranslate">$ <span class="pl-s1">mamba</span> <span class="pl-s1">create</span> <span class="pl-c1">-</span><span class="pl-s1">n</span> <span class="pl-s1">test</span> <span class="pl-s1">python</span><span class="pl-c1">=</span><span class="pl-c1">3.10</span> <span class="pl-s1">matplotlib</span><span class="pl-c1">-</span><span class="pl-s1">base</span> <span class="pl-c1">-</span><span class="pl-s1">y</span> $ <span class="pl-s1">mamba</span> <span class="pl-s1">activate</span> <span class="pl-s1">test</span> $ <span class="pl-s1">export</span> <span class="pl-v">PYTHONDEVMODE</span><span class="pl-c1">=</span><span class="pl-c1">1</span> $ <span class="pl-s1">python</span> <span class="pl-c1">-</span><span class="pl-s1">c</span> <span class="pl-s">"import pkg_resources"</span></pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/path/to/test/lib/python3.10/site-packages/pkg_resources/__init__.py:2804: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg)"><pre class="notranslate"><code class="notranslate">/path/to/test/lib/python3.10/site-packages/pkg_resources/__init__.py:2804: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">No output</p> <h3 dir="auto">Additional information</h3> <p dir="auto">See also:<br> <a href="https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages" rel="nofollow">https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages</a><br> <a href="https://packaging.python.org/en/latest/guides/packaging-namespace-packages/" rel="nofollow">https://packaging.python.org/en/latest/guides/packaging-namespace-packages/</a><br> <a href="https://peps.python.org/pep-0420/" rel="nofollow">https://peps.python.org/pep-0420/</a></p> <h3 dir="auto">Operating system</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.7.0</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">TkAgg</p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.10.9</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">conda</p>
1
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sns.distplot(np.concatenate([np.zeros(100), np.ones(10)]))"><pre class="notranslate"><span class="pl-s1">sns</span>.<span class="pl-en">distplot</span>(<span class="pl-s1">np</span>.<span class="pl-en">concatenate</span>([<span class="pl-s1">np</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">100</span>), <span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-c1">10</span>)]))</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-24-9543570a22a7&gt; in &lt;module&gt;() ----&gt; 1 sns.distplot(np.concatenate([np.zeros(100), np.ones(10)])) /home/wiecki/miniconda3/lib/python3.4/site-packages/seaborn/distributions.py in distplot(a, bins, hist, kde, rug, fit, hist_kws, kde_kws, rug_kws, fit_kws, color, vertical, norm_hist, axlabel, label, ax) 210 hist_color = hist_kws.pop(&quot;color&quot;, color) 211 ax.hist(a, bins, orientation=orientation, --&gt; 212 color=hist_color, **hist_kws) 213 if hist_color != color: 214 hist_kws[&quot;color&quot;] = hist_color /home/wiecki/miniconda3/lib/python3.4/site-packages/matplotlib/axes/_axes.py in hist(self, x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs) 5676 # this will automatically overwrite bins, 5677 # so that each histogram uses the same bins -&gt; 5678 m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs) 5679 m = m.astype(float) # causes problems later if it's an int 5680 if mlast is None: /home/wiecki/miniconda3/lib/python3.4/site-packages/numpy/lib/function_base.py in histogram(a, bins, range, normed, weights, density) 247 n.imag += np.bincount(indices, weights=tmp_w.imag, minlength=bins) 248 else: --&gt; 249 n += np.bincount(indices, weights=tmp_w, minlength=bins).astype(ntype) 250 251 # We now compute the bin edges since these are returned ValueError: operands could not be broadcast together with shapes (10,) (11,) (10,) &gt; /home/wiecki/miniconda3/lib/python3.4/site-packages/numpy/lib/function_base.py(249)histogram() 248 else: --&gt; 249 n += np.bincount(indices, weights=tmp_w, minlength=bins).astype(ntype) 250 "><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-24-9543570a22a7&gt; in &lt;module&gt;() ----&gt; 1 sns.distplot(np.concatenate([np.zeros(100), np.ones(10)])) /home/wiecki/miniconda3/lib/python3.4/site-packages/seaborn/distributions.py in distplot(a, bins, hist, kde, rug, fit, hist_kws, kde_kws, rug_kws, fit_kws, color, vertical, norm_hist, axlabel, label, ax) 210 hist_color = hist_kws.pop("color", color) 211 ax.hist(a, bins, orientation=orientation, --&gt; 212 color=hist_color, **hist_kws) 213 if hist_color != color: 214 hist_kws["color"] = hist_color /home/wiecki/miniconda3/lib/python3.4/site-packages/matplotlib/axes/_axes.py in hist(self, x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs) 5676 # this will automatically overwrite bins, 5677 # so that each histogram uses the same bins -&gt; 5678 m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs) 5679 m = m.astype(float) # causes problems later if it's an int 5680 if mlast is None: /home/wiecki/miniconda3/lib/python3.4/site-packages/numpy/lib/function_base.py in histogram(a, bins, range, normed, weights, density) 247 n.imag += np.bincount(indices, weights=tmp_w.imag, minlength=bins) 248 else: --&gt; 249 n += np.bincount(indices, weights=tmp_w, minlength=bins).astype(ntype) 250 251 # We now compute the bin edges since these are returned ValueError: operands could not be broadcast together with shapes (10,) (11,) (10,) &gt; /home/wiecki/miniconda3/lib/python3.4/site-packages/numpy/lib/function_base.py(249)histogram() 248 else: --&gt; 249 n += np.bincount(indices, weights=tmp_w, minlength=bins).astype(ntype) 250 </code></pre></div>
<p dir="auto">lmplot Method does not give a good sense of regressed line when axes boundaries are far from zero and not in scale. It might be a good idea to write a method or argument to somehow (either on the plot or as print) output the intercept and slope of the regressed line.</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto">I Haven't written any custom code.</p> <h4 dir="auto">Problem description</h4> <p dir="auto">I'm trying to install Pandas with pip install pandas, and I'am encountering the following error:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="nvidia@tegra-ubuntu:~/opt$ sudo -H pip install pandas Collecting pandas Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz Could not find a version that satisfies the requirement Cython (from versions: ) No matching distribution found for Cython"><pre class="notranslate">nvidia@tegra-ubuntu:<span class="pl-k">~</span>/opt$ sudo -H pip install pandas Collecting pandas Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz Could not find a version that satisfies the requirement Cython (from versions: ) No matching distribution found <span class="pl-k">for</span> Cython</pre></div> <p dir="auto">At first I tried to install Cython, then installing pandas, but the same behavior is encountered, my platfrom is arm-64 and is currently my bottleneck to develop.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$pip --version"><pre class="notranslate"><code class="notranslate">$pip --version </code></pre></div>
<p dir="auto">Now that pip 19 is out, we can attempt to re-add pyproject.toml</p> <hr> <p dir="auto">The release of pip version 10 and the presence of a <code class="notranslate">pyproject.toml</code> in our latest released versions gives problems for installing pandas in the following cases:</p> <p dir="auto"><strong>Problem with installing pandas for Python 3.4</strong></p> <ul dir="auto"> <li>You get the error <em>"Double requirement given: numpy ..."</em></li> <li>The reason for this error is that pandas 0.21-0.22 no longer supports Python 3.4, and thus no longer distributes binary wheels for Python 3.4. Therefore, pip tries to install pandas from source, and this is what now started to fail with Pip version 10.</li> <li><strong>Solution</strong>: <ul dir="auto"> <li> <p dir="auto">Install an older version of pandas</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install pandas&lt;0.21"><pre class="notranslate"><code class="notranslate">pip install pandas&lt;0.21 </code></pre></div> </li> <li> <p dir="auto">Workaround for package maintainers to specify the pandas version in <code class="notranslate">install_requires</code>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="314359671" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20697" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/20697/hovercard?comment_id=381372004&amp;comment_type=issue_comment" href="https://github.com/pandas-dev/pandas/issues/20697#issuecomment-381372004">#20697 (comment)</a></p> </li> </ul> </li> <li>The fact that those version are downloaded for Python 3.4 (instead of an older compatible version) was a bug in our setup.py, and this will be fixed in future versions of pandas: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="314372081" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20698" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/20698/hovercard" href="https://github.com/pandas-dev/pandas/pull/20698">#20698</a></li> </ul> <p dir="auto"><strong>Problem with installing pandas on "special" platforms (32bit, PyPy, ARM, ...) (building from source)</strong>:</p> <ul dir="auto"> <li>You get the error <em>"No matching distribution found for Cython"</em></li> <li>The reason for this error is that we do not provide wheels for such python versions or platforms. In such a case, <code class="notranslate">pip</code> will try to build pandas from source, but this started to fail with pip version 10. This is because their limited support for PEP518, and they require that all build dependencies of pandas are installed from wheels (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="314376984" data-permission-text="Title is private" data-url="https://github.com/pypa/pip/issues/5229" data-hovercard-type="issue" data-hovercard-url="/pypa/pip/issues/5229/hovercard" href="https://github.com/pypa/pip/issues/5229">pypa/pip#5229</a>), which are often also not available on those python versions / platforms.</li> <li><strong>Solution</strong> <ul dir="auto"> <li>Use an older version of pip</li> <li>Use <code class="notranslate">pip install pandas --no-build-isolation</code></li> </ul> </li> <li>See eg <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="313701198" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20666" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/20666/hovercard" href="https://github.com/pandas-dev/pandas/issues/20666">#20666</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="316399092" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/20771" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/20771/hovercard" href="https://github.com/pandas-dev/pandas/issues/20771">#20771</a></li> </ul>
1
<h3 dir="auto">Website or app</h3> <p dir="auto"><a href="https://www.youtube.com/" rel="nofollow">https://www.youtube.com/</a></p> <h3 dir="auto">Repro steps</h3> <p dir="auto">I was watching a video on youtube when I noticed the new video hover features which were not there on the 15th of January 2022.<br> This then led me to the react dev tools which I noticed had turned blue, never had before. wanted to know of this is a bug or not.<br> I have restarted my computer and browser severally.</p> <p dir="auto">[](url<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/65865227/149665223-b3243940-c1b0-418f-bfba-a8ca9eebb885.png"><img src="https://user-images.githubusercontent.com/65865227/149665223-b3243940-c1b0-418f-bfba-a8ca9eebb885.png" alt="tube" style="max-width: 100%;"></a><br> )</p> <h3 dir="auto">How often does this bug happen?</h3> <p dir="auto">Every time</p> <h3 dir="auto">DevTools package (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">DevTools version (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error message (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error call stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error component stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">GitHub query string (automated)</h3> <p dir="auto"><em>No response</em></p>
<h3 dir="auto">Website or app</h3> <p dir="auto">youtube.com, github.com, gmail.com, lucidchart.app</p> <h3 dir="auto">Repro steps</h3> <ol dir="auto"> <li>Open any web app not made with React (e.g.: youtube.com, amazon.com, github.com, gmail.com, lucidchart.app)</li> <li>The react icon is ON and the popover message says:<br> 'This page is using the production build of React. ✅'</li> </ol> <h3 dir="auto">How often does this bug happen?</h3> <p dir="auto">Every time</p> <h3 dir="auto">DevTools package (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">DevTools version (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error message (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error call stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error component stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">GitHub query string (automated)</h3> <p dir="auto"><em>No response</em></p>
1
<p dir="auto">Got another ICE, this time it only shows itself when compiled with debug info (rustc -g error.rs).<br> Also of note is that another ICE shows itself if the State wrapper is removed (I can file a separate report for that if you want but I figure they might be the same issue).</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct State&lt;I&gt;; trait Parser { type Input; } impl Parser for () { type Input = (); } struct IntoIter&lt;P: Parser&gt; { input: State&lt;&lt;P as Parser&gt;::Input&gt; } fn main() { let p = IntoIter::&lt;()&gt; { input: State::&lt;()&gt; }; } //Compile with rustc error.rs -g "><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">State</span><span class="pl-kos">&lt;</span><span class="pl-smi">I</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">trait</span> <span class="pl-smi">Parser</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">Input</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span> <span class="pl-smi">Parser</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">Input</span> = <span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">struct</span> <span class="pl-smi">IntoIter</span><span class="pl-kos">&lt;</span><span class="pl-smi">P</span><span class="pl-kos">:</span> <span class="pl-smi">Parser</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">input</span><span class="pl-kos">:</span> <span class="pl-smi">State</span><span class="pl-kos">&lt;</span>&lt;<span class="pl-smi">P</span> <span class="pl-k">as</span> <span class="pl-smi">Parser</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">Input</span><span class="pl-kos">&gt;</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> p = <span class="pl-smi">IntoIter</span><span class="pl-kos">::</span><span class="pl-kos">&lt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">input</span><span class="pl-kos">:</span> <span class="pl-v">State</span><span class="pl-kos">::</span><span class="pl-kos">&lt;</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">&gt;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">//Compile with rustc error.rs -g</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: get_unique_type_id_of_type() - unexpected type: &lt;() as Parser&gt;::Input, ty_projection(ProjectionTy { trait_ref: Rc(TraitRef { def_id: DefId { krate: 0u32, node: 8u32 }, substs: Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [TyS { sty: ty_tup([]), flags: 0, region_depth: 0u32 }], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }) } }), item_name: &quot;Input&quot;(64) }) note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:182 stack backtrace: 1: 0x69bec997 - sys::backtrace::write::h62d87c63e18a3ea5JRt 2: 0x69c00672 - rt::unwind::register::haa3a38fa07bfa9beVGz 3: 0x69b834a7 - rt::unwind::begin_unwind_inner::hbebf9f8c0125ffc9tEz 4: 0x6f898116 - diagnostic::SpanHandler::span_bug::hebc2106d060dd9d6xSF 5: 0x6f8989c5 - diagnostic::Handler::bug::hd75d92a08fdf3c17DYF 6: 0x801852 - session::Session::bug::h9385caa3fe1c8dc3wQq 7: 0x11467b7 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 8: 0x114a57a - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 9: 0x1147448 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 10: 0x114c721 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 11: 0x1154a87 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 12: 0x11545ca - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 13: 0x11504ef - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 14: 0x11531f4 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 15: 0x114d472 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 16: 0x114eaa2 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 17: 0x114e2bf - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 18: 0x1033554 - trans::cleanup::FunctionContext&lt;'blk, 'tcx&gt;.CleanupMethods&lt;'blk, 'tcx&gt;::pop_and_trans_ast_cleanup_scope::h80e56e364b2716daMFK 19: 0x10fd20a - trans::base::IsUnboxedClosureFlag...std..clone..Clone::clone::h7d2a86d65666b43aQYt 20: 0x101e571 - trans::context::CrateContext&lt;'b, 'tcx&gt;::sess::h6fdd1e7dea5490cdItm 21: 0x1019cc3 - trans::context::CrateContext&lt;'b, 'tcx&gt;::stats::hd7a1dc7a2465d605EGm 22: 0x1103768 - trans::base::trans_crate::h4bc502f506e6c118Wsv 23: 0x70b2af6a - driver::phase_4_translate_to_llvm::haa9c5e826483e242PFa 24: 0x70b03623 - driver::compile_input::hf5b2f58693da03b5xba 25: 0x70bd1eec - run::ha65e56249318cc0dV3b 26: 0x70bd04cc - run::ha65e56249318cc0dV3b 27: 0x70bcf16a - run::ha65e56249318cc0dV3b 28: 0x69c2881c - rust_try 29: 0x69c287f9 - rust_try 30: 0x70bcf854 - run::ha65e56249318cc0dV3b 31: 0x69bf14a7 - sys::tcp::TcpListener::bind::hc4a8da4adad0f541bsw 32: 0x7fff4c8816ad - BaseThreadInitThunk"><pre class="notranslate"><code class="notranslate">error: internal compiler error: get_unique_type_id_of_type() - unexpected type: &lt;() as Parser&gt;::Input, ty_projection(ProjectionTy { trait_ref: Rc(TraitRef { def_id: DefId { krate: 0u32, node: 8u32 }, substs: Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [TyS { sty: ty_tup([]), flags: 0, region_depth: 0u32 }], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }) } }), item_name: "Input"(64) }) note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:182 stack backtrace: 1: 0x69bec997 - sys::backtrace::write::h62d87c63e18a3ea5JRt 2: 0x69c00672 - rt::unwind::register::haa3a38fa07bfa9beVGz 3: 0x69b834a7 - rt::unwind::begin_unwind_inner::hbebf9f8c0125ffc9tEz 4: 0x6f898116 - diagnostic::SpanHandler::span_bug::hebc2106d060dd9d6xSF 5: 0x6f8989c5 - diagnostic::Handler::bug::hd75d92a08fdf3c17DYF 6: 0x801852 - session::Session::bug::h9385caa3fe1c8dc3wQq 7: 0x11467b7 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 8: 0x114a57a - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 9: 0x1147448 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 10: 0x114c721 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 11: 0x1154a87 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 12: 0x11545ca - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 13: 0x11504ef - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 14: 0x11531f4 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 15: 0x114d472 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 16: 0x114eaa2 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 17: 0x114e2bf - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD 18: 0x1033554 - trans::cleanup::FunctionContext&lt;'blk, 'tcx&gt;.CleanupMethods&lt;'blk, 'tcx&gt;::pop_and_trans_ast_cleanup_scope::h80e56e364b2716daMFK 19: 0x10fd20a - trans::base::IsUnboxedClosureFlag...std..clone..Clone::clone::h7d2a86d65666b43aQYt 20: 0x101e571 - trans::context::CrateContext&lt;'b, 'tcx&gt;::sess::h6fdd1e7dea5490cdItm 21: 0x1019cc3 - trans::context::CrateContext&lt;'b, 'tcx&gt;::stats::hd7a1dc7a2465d605EGm 22: 0x1103768 - trans::base::trans_crate::h4bc502f506e6c118Wsv 23: 0x70b2af6a - driver::phase_4_translate_to_llvm::haa9c5e826483e242PFa 24: 0x70b03623 - driver::compile_input::hf5b2f58693da03b5xba 25: 0x70bd1eec - run::ha65e56249318cc0dV3b 26: 0x70bd04cc - run::ha65e56249318cc0dV3b 27: 0x70bcf16a - run::ha65e56249318cc0dV3b 28: 0x69c2881c - rust_try 29: 0x69c287f9 - rust_try 30: 0x70bcf854 - run::ha65e56249318cc0dV3b 31: 0x69bf14a7 - sys::tcp::TcpListener::bind::hc4a8da4adad0f541bsw 32: 0x7fff4c8816ad - BaseThreadInitThunk </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800) binary: rustc commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7 commit-date: 2015-01-08 17:03:40 -0800 host: x86_64-pc-windows-gnu release: 1.0.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800) binary: rustc commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7 commit-date: 2015-01-08 17:03:40 -0800 host: x86_64-pc-windows-gnu release: 1.0.0-nightly </code></pre></div>
<p dir="auto">I thought that my example in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="53175754" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/20368" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/20368/hovercard" href="https://github.com/rust-lang/rust/issues/20368">#20368</a> was sufficient to cover one of my desired uses of associated types, but, while that example does now successfully compile, the module I really wanted to improve still fails with yet another ICE. Here's the module in full:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" use std::default::Default; use std::io::IoResult; use std::io::fs; use std::io::fs::PathExtensions; /// A strategy for acquiring more subpaths to walk. pub trait Strategy { type P: PathExtensions; /// Get additional subpaths from a given path. fn get_more(&amp;self, item: &amp;Self::P) -&gt; IoResult&lt;Vec&lt;Self::P&gt;&gt;; /// Determine whether a path should be walked further. /// This is run against each item from `get_more()`. fn prune(&amp;self, p: &amp;Self::P) -&gt; bool; } /// The basic fully-recursive strategy. Nothing is pruned. #[derive(Copy, Default)] pub struct Recursive; impl Strategy for Recursive { type P = Path; fn get_more(&amp;self, p: &amp;Path) -&gt; IoResult&lt;Vec&lt;Path&gt;&gt; { fs::readdir(p) } fn prune(&amp;self, _: &amp;Path) -&gt; bool { false } } /// A directory walker of `P` using strategy `S`. pub struct Subpaths&lt;S: Strategy&gt; { stack: Vec&lt;S::P&gt;, strategy: S, } impl&lt;S: Strategy&gt; Subpaths&lt;S&gt; { /// Create a directory walker with a root path and strategy. pub fn new(p: &amp;S::P, strategy: S) -&gt; IoResult&lt;Subpaths&lt;S&gt;&gt; { let stack = try!(strategy.get_more(p)); Ok(Subpaths { stack: stack, strategy: strategy }) } } impl&lt;S: Default + Strategy&gt; Subpaths&lt;S&gt; { /// Create a directory walker with a root path and a default strategy. pub fn walk(p: &amp;S::P) -&gt; IoResult&lt;Subpaths&lt;S&gt;&gt; { Subpaths::new(p, Default::default()) } } impl&lt;S: Default + Strategy&gt; Default for Subpaths&lt;S&gt; { fn default() -&gt; Subpaths&lt;S&gt; { Subpaths { stack: Vec::new(), strategy: Default::default() } } } impl&lt;S: Strategy&gt; Iterator for Subpaths&lt;S&gt; { type Item = S::P; fn next (&amp;mut self) -&gt; Option&lt;S::P&gt; { let mut opt_path = self.stack.pop(); while opt_path.is_some() &amp;&amp; self.strategy.prune(opt_path.as_ref().unwrap()) { opt_path = self.stack.pop(); } match opt_path { Some(path) =&gt; { if PathExtensions::is_dir(&amp;path) { let result = self.strategy.get_more(&amp;path); match result { Ok(dirs) =&gt; { self.stack.extend(dirs.into_iter()); }, Err(..) =&gt; { } } } Some(path) } None =&gt; None, } } } #[test] fn woot() { let mut walker: Subpaths&lt;Recursive&gt; = Subpaths::walk(&amp;Path::new(&quot;/home&quot;)).unwrap(); }"><pre class="notranslate"> <span class="pl-k">use</span> std<span class="pl-kos">::</span>default<span class="pl-kos">::</span><span class="pl-v">Default</span><span class="pl-kos">;</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span><span class="pl-v">IoResult</span><span class="pl-kos">;</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span>fs<span class="pl-kos">;</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>io<span class="pl-kos">::</span>fs<span class="pl-kos">::</span><span class="pl-v">PathExtensions</span><span class="pl-kos">;</span> <span class="pl-c">/// A strategy for acquiring more subpaths to walk.</span> <span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Strategy</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">P</span><span class="pl-kos">:</span> <span class="pl-smi">PathExtensions</span><span class="pl-kos">;</span> <span class="pl-c">/// Get additional subpaths from a given path.</span> <span class="pl-k">fn</span> <span class="pl-en">get_more</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">item</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">IoResult</span><span class="pl-kos">&lt;</span><span class="pl-smi">Vec</span><span class="pl-kos">&lt;</span><span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-c">/// Determine whether a path should be walked further.</span> <span class="pl-c">/// This is run against each item from `get_more()`.</span> <span class="pl-k">fn</span> <span class="pl-en">prune</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">p</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">bool</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">/// The basic fully-recursive strategy. Nothing is pruned.</span> <span class="pl-c1">#<span class="pl-kos">[</span>derive<span class="pl-kos">(</span><span class="pl-v">Copy</span><span class="pl-kos">,</span> <span class="pl-v">Default</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Recursive</span><span class="pl-kos">;</span> <span class="pl-k">impl</span> <span class="pl-smi">Strategy</span> <span class="pl-k">for</span> <span class="pl-smi">Recursive</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">P</span> = <span class="pl-smi">Path</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">get_more</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-s1">p</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Path</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">IoResult</span><span class="pl-kos">&lt;</span><span class="pl-smi">Vec</span><span class="pl-kos">&lt;</span><span class="pl-smi">Path</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> fs<span class="pl-kos">::</span><span class="pl-en">readdir</span><span class="pl-kos">(</span>p<span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">prune</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">,</span> _<span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Path</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">bool</span> <span class="pl-kos">{</span> <span class="pl-c1">false</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c">/// A directory walker of `P` using strategy `S`.</span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Strategy</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">stack</span><span class="pl-kos">:</span> <span class="pl-smi">Vec</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-c1">strategy</span><span class="pl-kos">:</span> <span class="pl-smi">S</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Strategy</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">/// Create a directory walker with a root path and strategy.</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">S</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">,</span> <span class="pl-s1">strategy</span><span class="pl-kos">:</span> <span class="pl-smi">S</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">IoResult</span><span class="pl-kos">&lt;</span><span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> stack = <span class="pl-en">try</span><span class="pl-en">!</span><span class="pl-kos">(</span>strategy.get_more<span class="pl-kos">(</span>p<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-v">Ok</span><span class="pl-kos">(</span><span class="pl-smi">Subpaths</span> <span class="pl-kos">{</span> <span class="pl-c1">stack</span><span class="pl-kos">:</span> stack<span class="pl-kos">,</span> <span class="pl-c1">strategy</span><span class="pl-kos">:</span> strategy <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Default</span> + <span class="pl-smi">Strategy</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">/// Create a directory walker with a root path and a default strategy.</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">walk</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">S</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">IoResult</span><span class="pl-kos">&lt;</span><span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span>p<span class="pl-kos">,</span> <span class="pl-smi">Default</span><span class="pl-kos">::</span><span class="pl-en">default</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Default</span> + <span class="pl-smi">Strategy</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Default</span> <span class="pl-k">for</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">fn</span> <span class="pl-en">default</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">Subpaths</span> <span class="pl-kos">{</span> <span class="pl-c1">stack</span><span class="pl-kos">:</span> <span class="pl-smi">Vec</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">strategy</span><span class="pl-kos">:</span> <span class="pl-smi">Default</span><span class="pl-kos">::</span><span class="pl-en">default</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Strategy</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Iterator</span> <span class="pl-k">for</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">Item</span> = <span class="pl-smi">S</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">next</span> <span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Option</span><span class="pl-kos">&lt;</span><span class="pl-smi">S</span><span class="pl-kos">::</span><span class="pl-smi">P</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> opt_path = <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">stack</span><span class="pl-kos">.</span><span class="pl-en">pop</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">while</span> opt_path<span class="pl-kos">.</span><span class="pl-en">is_some</span><span class="pl-kos">(</span><span class="pl-kos">)</span> &amp;&amp; <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">strategy</span><span class="pl-kos">.</span><span class="pl-en">prune</span><span class="pl-kos">(</span>opt_path<span class="pl-kos">.</span><span class="pl-en">as_ref</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> opt_path = <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">stack</span><span class="pl-kos">.</span><span class="pl-en">pop</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">match</span> opt_path <span class="pl-kos">{</span> <span class="pl-v">Some</span><span class="pl-kos">(</span>path<span class="pl-kos">)</span> =&gt; <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-smi">PathExtensions</span><span class="pl-kos">::</span><span class="pl-en">is_dir</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span>path<span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> result = <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">strategy</span><span class="pl-kos">.</span><span class="pl-en">get_more</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span>path<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">match</span> result <span class="pl-kos">{</span> <span class="pl-v">Ok</span><span class="pl-kos">(</span>dirs<span class="pl-kos">)</span> =&gt; <span class="pl-kos">{</span> <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">stack</span><span class="pl-kos">.</span><span class="pl-en">extend</span><span class="pl-kos">(</span>dirs<span class="pl-kos">.</span><span class="pl-en">into_iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-v">Err</span><span class="pl-kos">(</span>..<span class="pl-kos">)</span> =&gt; <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-v">Some</span><span class="pl-kos">(</span>path<span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-v">None</span> =&gt; <span class="pl-v">None</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-c1">#<span class="pl-kos">[</span>test<span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">woot</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> walker<span class="pl-kos">:</span> <span class="pl-smi">Subpaths</span><span class="pl-kos">&lt;</span><span class="pl-smi">Recursive</span><span class="pl-kos">&gt;</span> = <span class="pl-smi">Subpaths</span><span class="pl-kos">::</span><span class="pl-en">walk</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">Path</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-s">"/home"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">unwrap</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Here's the error and backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: get_unique_type_id_of_type() - unexpected type: &lt;Recursive as Strategy&gt;::P, ty_projection(ProjectionTy { trait_ref: Rc(TraitRef { def_id: DefId { krate: 0u32, node: 8u32 }, substs: Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [TyS { sty: ty_struct(DefId { krate: 0u32, node: 40u32 }, Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }, regions: ErasedRegions }), flags: 0, region_depth: 0u32 }], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }) } }), item_name: &quot;P&quot;(73) }) note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/samuel/rust/src/libsyntax/diagnostic.rs:182 stack backtrace: 1: 0x7f4a265a0570 - sys::backtrace::write::h3452feb04e320bcfCzt 2: 0x7f4a265c2780 - failure::on_fail::hd0efae8686875716aPz 3: 0x7f4a26530300 - rt::unwind::begin_unwind_inner::h229232f5734654792tz 4: 0x7f4a214ada20 - rt::unwind::begin_unwind::h9438643137198476843 5: 0x7f4a214ae2d0 - diagnostic::Handler::bug::he657a4296d705a33tWF 6: 0x7f4a2488f180 - session::Session::bug::ha8836431c543757ciRq 7: 0x7f4a25673ba0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::h606c89215412cd5brGD 8: 0x7f4a256778d0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::from_def_id_and_substs::h9fa1f90635ed12d03PD 9: 0x7f4a25673ba0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::h606c89215412cd5brGD 10: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 11: 0x7f4a25682220 - trans::debuginfo::StructMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45598 12: 0x7f4a25681e00 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h9648212210143919248 13: 0x7f4a2567dda0 - trans::debuginfo::StructMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::hf79fdc4d3167c5d0j9E 14: 0x7f4a25680980 - trans::debuginfo::RecursiveTypeDescription&lt;'tcx&gt;::finalize::h0ff9cf1ab1bdbcef26E 15: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 16: 0x7f4a25684fd0 - trans::debuginfo::VariantMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45632 17: 0x7f4a25684be0 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h5453357870208096995 18: 0x7f4a25683270 - trans::debuginfo::EnumMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45606 19: 0x7f4a25682e50 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h13188062602912948975 20: 0x7f4a2567de90 - trans::debuginfo::EnumMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::h1355d0387a727939hgF 21: 0x7f4a25680980 - trans::debuginfo::RecursiveTypeDescription&lt;'tcx&gt;::finalize::h0ff9cf1ab1bdbcef26E 22: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 23: 0x7f4a25688070 - trans::debuginfo::subroutine_type_metadata::haec4c13f9a5d7a59vOF 24: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 25: 0x7f4a25620ae0 - trans::debuginfo::create_function_debug_context::h985b11ad61da52fdwsE 26: 0x7f4a25580890 - trans::base::new_fn_ctxt::hbe79965b1049ecf2Zxt 27: 0x7f4a25626410 - trans::base::trans_closure::h5c0a7253f08a6c1bEYt 28: 0x7f4a255452b0 - trans::base::trans_fn::h84cc11dd50b05f50j9t 29: 0x7f4a25545710 - trans::monomorphize::monomorphic_fn::h44708ba9400c75dbFpd 30: 0x7f4a25597ff0 - trans::callee::trans_fn_ref_with_substs::h1741ea29b53c270fGxg 31: 0x7f4a25596590 - trans::callee::trans_fn_ref::h611f01f0cbdf2e42Rlg 32: 0x7f4a25593870 - trans::callee::trans::h2d6fbfb713fd152ayag 33: 0x7f4a2559da90 - trans::callee::trans_call_inner::h893956557312987459 34: 0x7f4a255a34b0 - trans::expr::trans_rvalue_dps_unadjusted::h4ab35d4af002299e1Si 35: 0x7f4a255a2790 - trans::expr::trans_unadjusted::h15f19eba475549d3Oji 36: 0x7f4a2555b000 - trans::expr::trans::ha962b869e642f0b8eCh 37: 0x7f4a2556c0b0 - trans::callee::trans_args::h2dbfd3d1c7128174xch 38: 0x7f4a2559f460 - trans::callee::trans_call_inner::h11730372111330536098 39: 0x7f4a255a34b0 - trans::expr::trans_rvalue_dps_unadjusted::h4ab35d4af002299e1Si 40: 0x7f4a25559d90 - trans::expr::trans_into::h70023b40e1df277dKyh 41: 0x7f4a2565e030 - trans::_match::mk_binding_alloca::h14708251032129145358 42: 0x7f4a25559390 - trans::base::init_local::h17113ff3a822f41bC7s 43: 0x7f4a2555a3e0 - trans::controlflow::trans_block::hd4046f45161d1f00B3d 44: 0x7f4a25626410 - trans::base::trans_closure::h5c0a7253f08a6c1bEYt 45: 0x7f4a255452b0 - trans::base::trans_fn::h84cc11dd50b05f50j9t 46: 0x7f4a25540840 - trans::base::trans_item::h560b1558a6cec5e6Ewu 47: 0x7f4a2562dc30 - trans::base::trans_crate::heb94c899d24982b8lsv 48: 0x7f4a26b09fa0 - driver::phase_4_translate_to_llvm::h4be77ff61772864dPFa 49: 0x7f4a26ae3f30 - driver::compile_input::hefa96b3bea08e00bxba 50: 0x7f4a26bb3bc0 - monitor::unboxed_closure.22498 51: 0x7f4a26bb3a20 - thunk::F.Invoke&lt;A, R&gt;::invoke::h2604081160332846052 52: 0x7f4a26bb27a0 - rt::unwind::try::try_fn::h10712615664574212328 53: 0x7f4a26630f00 - rust_try_inner 54: 0x7f4a26630ef0 - rust_try 55: 0x7f4a26bb2a90 - thunk::F.Invoke&lt;A, R&gt;::invoke::h6088602545528080049 56: 0x7f4a265b0630 - sys::thread::thread_start::h803dac673dcdb1abqrw 57: 0x7f4a20cc7250 - start_thread 58: 0x7f4a261e0219 - clone 59: 0x0 - &lt;unknown&gt; Could not compile `subpaths`."><pre class="notranslate"><code class="notranslate">error: internal compiler error: get_unique_type_id_of_type() - unexpected type: &lt;Recursive as Strategy&gt;::P, ty_projection(ProjectionTy { trait_ref: Rc(TraitRef { def_id: DefId { krate: 0u32, node: 8u32 }, substs: Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [TyS { sty: ty_struct(DefId { krate: 0u32, node: 40u32 }, Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }, regions: ErasedRegions }), flags: 0, region_depth: 0u32 }], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [], SelfSpace: [], FnSpace: [], }) } }), item_name: "P"(73) }) note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/samuel/rust/src/libsyntax/diagnostic.rs:182 stack backtrace: 1: 0x7f4a265a0570 - sys::backtrace::write::h3452feb04e320bcfCzt 2: 0x7f4a265c2780 - failure::on_fail::hd0efae8686875716aPz 3: 0x7f4a26530300 - rt::unwind::begin_unwind_inner::h229232f5734654792tz 4: 0x7f4a214ada20 - rt::unwind::begin_unwind::h9438643137198476843 5: 0x7f4a214ae2d0 - diagnostic::Handler::bug::he657a4296d705a33tWF 6: 0x7f4a2488f180 - session::Session::bug::ha8836431c543757ciRq 7: 0x7f4a25673ba0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::h606c89215412cd5brGD 8: 0x7f4a256778d0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::from_def_id_and_substs::h9fa1f90635ed12d03PD 9: 0x7f4a25673ba0 - trans::debuginfo::TypeMap&lt;'tcx&gt;::get_unique_type_id_of_type::h606c89215412cd5brGD 10: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 11: 0x7f4a25682220 - trans::debuginfo::StructMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45598 12: 0x7f4a25681e00 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h9648212210143919248 13: 0x7f4a2567dda0 - trans::debuginfo::StructMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::hf79fdc4d3167c5d0j9E 14: 0x7f4a25680980 - trans::debuginfo::RecursiveTypeDescription&lt;'tcx&gt;::finalize::h0ff9cf1ab1bdbcef26E 15: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 16: 0x7f4a25684fd0 - trans::debuginfo::VariantMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45632 17: 0x7f4a25684be0 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h5453357870208096995 18: 0x7f4a25683270 - trans::debuginfo::EnumMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::unboxed_closure.45606 19: 0x7f4a25682e50 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h13188062602912948975 20: 0x7f4a2567de90 - trans::debuginfo::EnumMemberDescriptionFactory&lt;'tcx&gt;::create_member_descriptions::h1355d0387a727939hgF 21: 0x7f4a25680980 - trans::debuginfo::RecursiveTypeDescription&lt;'tcx&gt;::finalize::h0ff9cf1ab1bdbcef26E 22: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 23: 0x7f4a25688070 - trans::debuginfo::subroutine_type_metadata::haec4c13f9a5d7a59vOF 24: 0x7f4a25679e30 - trans::debuginfo::type_metadata::h7557684678d0dd25RSF 25: 0x7f4a25620ae0 - trans::debuginfo::create_function_debug_context::h985b11ad61da52fdwsE 26: 0x7f4a25580890 - trans::base::new_fn_ctxt::hbe79965b1049ecf2Zxt 27: 0x7f4a25626410 - trans::base::trans_closure::h5c0a7253f08a6c1bEYt 28: 0x7f4a255452b0 - trans::base::trans_fn::h84cc11dd50b05f50j9t 29: 0x7f4a25545710 - trans::monomorphize::monomorphic_fn::h44708ba9400c75dbFpd 30: 0x7f4a25597ff0 - trans::callee::trans_fn_ref_with_substs::h1741ea29b53c270fGxg 31: 0x7f4a25596590 - trans::callee::trans_fn_ref::h611f01f0cbdf2e42Rlg 32: 0x7f4a25593870 - trans::callee::trans::h2d6fbfb713fd152ayag 33: 0x7f4a2559da90 - trans::callee::trans_call_inner::h893956557312987459 34: 0x7f4a255a34b0 - trans::expr::trans_rvalue_dps_unadjusted::h4ab35d4af002299e1Si 35: 0x7f4a255a2790 - trans::expr::trans_unadjusted::h15f19eba475549d3Oji 36: 0x7f4a2555b000 - trans::expr::trans::ha962b869e642f0b8eCh 37: 0x7f4a2556c0b0 - trans::callee::trans_args::h2dbfd3d1c7128174xch 38: 0x7f4a2559f460 - trans::callee::trans_call_inner::h11730372111330536098 39: 0x7f4a255a34b0 - trans::expr::trans_rvalue_dps_unadjusted::h4ab35d4af002299e1Si 40: 0x7f4a25559d90 - trans::expr::trans_into::h70023b40e1df277dKyh 41: 0x7f4a2565e030 - trans::_match::mk_binding_alloca::h14708251032129145358 42: 0x7f4a25559390 - trans::base::init_local::h17113ff3a822f41bC7s 43: 0x7f4a2555a3e0 - trans::controlflow::trans_block::hd4046f45161d1f00B3d 44: 0x7f4a25626410 - trans::base::trans_closure::h5c0a7253f08a6c1bEYt 45: 0x7f4a255452b0 - trans::base::trans_fn::h84cc11dd50b05f50j9t 46: 0x7f4a25540840 - trans::base::trans_item::h560b1558a6cec5e6Ewu 47: 0x7f4a2562dc30 - trans::base::trans_crate::heb94c899d24982b8lsv 48: 0x7f4a26b09fa0 - driver::phase_4_translate_to_llvm::h4be77ff61772864dPFa 49: 0x7f4a26ae3f30 - driver::compile_input::hefa96b3bea08e00bxba 50: 0x7f4a26bb3bc0 - monitor::unboxed_closure.22498 51: 0x7f4a26bb3a20 - thunk::F.Invoke&lt;A, R&gt;::invoke::h2604081160332846052 52: 0x7f4a26bb27a0 - rt::unwind::try::try_fn::h10712615664574212328 53: 0x7f4a26630f00 - rust_try_inner 54: 0x7f4a26630ef0 - rust_try 55: 0x7f4a26bb2a90 - thunk::F.Invoke&lt;A, R&gt;::invoke::h6088602545528080049 56: 0x7f4a265b0630 - sys::thread::thread_start::h803dac673dcdb1abqrw 57: 0x7f4a20cc7250 - start_thread 58: 0x7f4a261e0219 - clone 59: 0x0 - &lt;unknown&gt; Could not compile `subpaths`. </code></pre></div>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [[版本 10.0.18362.10019]] Windows Terminal version (if applicable):Windows Terminal (Preview) Version: 0.5.2681.0 Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [[版本 10.0.18362.10019]] Windows Terminal version (if applicable):Windows Terminal (Preview) Version: 0.5.2681.0 Any other software? </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">when drag and select some character, now right click the mouse. the terminal will exit without any clue.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">terminal do not exit, and paste the txt I selected.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">windows closed.</p>
<p dir="auto">Windows Terminal Preview crashes when using right click to copy multiple lines of text in PowerShell 7.0.0-preview.4.</p> <p dir="auto"><a href="https://aka.ms/AA6486q" rel="nofollow">Feedback Hub link with crash</a></p> <h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.5.2661.0 Any other software? PowerShell 7.0.0-preview4 "><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.5.2661.0 Any other software? PowerShell 7.0.0-preview4 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Open PowerShell Core 7 Preview-4 in Windows Terminal</li> <li>Left click select multiple lines, and then right click.</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Right click should copy text.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Crash. Occurs 100% of the time following these steps. I've tried it 6 times and got the crash all 6 times.</p> <p dir="auto">I believe this is a regression as this did not occur in the previous version of Windows Terminal Preview.</p>
1
<p dir="auto">I would like to set an http request timeout in the kubernetes Go client, however:</p> <ol dir="auto"> <li>The underlying http client is not exposed.</li> <li>Even if I access the underlying http client through an (admittedly inelegant) cast and set the timeout, requests fail because the Transport does not support the CancelRequest method.</li> </ol> <p dir="auto">The example below fails with <code class="notranslate">cannot make request: net/http: Client Transport of type *unversioned.userAgentRoundTripper doesn't support CancelRequest; Timeout not supported</code></p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main import ( &quot;fmt&quot; k8sClient &quot;k8s.io/kubernetes/pkg/client/unversioned&quot; &quot;net/http&quot; &quot;time&quot; ) func main() { client, err := k8sClient.NewInCluster() if err != nil { fmt.Printf(&quot;cannot create client: %s\n&quot;, err) return } httpClient, ok := client.RESTClient.Client.(*http.Client) if !ok { fmt.Println(&quot;cannot cast k8s client to http client&quot;) } httpClient.Timeout = time.Millisecond * 500 if _, err := client.Services(&quot;default&quot;).Get(&quot;foo&quot;); err != nil { fmt.Printf(&quot;cannot make request: %s\n&quot;, err) } }"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-k">import</span> ( <span class="pl-s">"fmt"</span> k8sClient <span class="pl-s">"k8s.io/kubernetes/pkg/client/unversioned"</span> <span class="pl-s">"net/http"</span> <span class="pl-s">"time"</span> ) <span class="pl-k">func</span> <span class="pl-en">main</span>() { <span class="pl-s1">client</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">k8sClient</span>.<span class="pl-en">NewInCluster</span>() <span class="pl-k">if</span> <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> { <span class="pl-s1">fmt</span>.<span class="pl-en">Printf</span>(<span class="pl-s">"cannot create client: %s<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">err</span>) <span class="pl-k">return</span> } <span class="pl-s1">httpClient</span>, <span class="pl-s1">ok</span> <span class="pl-c1">:=</span> <span class="pl-s1">client</span>.<span class="pl-c1">RESTClient</span>.<span class="pl-c1">Client</span>.(<span class="pl-c1">*</span>http.<span class="pl-smi">Client</span>) <span class="pl-k">if</span> <span class="pl-c1">!</span><span class="pl-s1">ok</span> { <span class="pl-s1">fmt</span>.<span class="pl-en">Println</span>(<span class="pl-s">"cannot cast k8s client to http client"</span>) } <span class="pl-s1">httpClient</span>.<span class="pl-c1">Timeout</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-c1">Millisecond</span> <span class="pl-c1">*</span> <span class="pl-c1">500</span> <span class="pl-k">if</span> <span class="pl-s1">_</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">client</span>.<span class="pl-en">Services</span>(<span class="pl-s">"default"</span>).<span class="pl-en">Get</span>(<span class="pl-s">"foo"</span>); <span class="pl-s1">err</span> <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> { <span class="pl-s1">fmt</span>.<span class="pl-en">Printf</span>(<span class="pl-s">"cannot make request: %s<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">err</span>) } }</pre></div>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): "scheduledjob", "scheduledjob replace", "scheduledjob not found", "scheduledjob FailedGet"</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong>: BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4+&quot;, GitVersion:&quot;v1.4.0-alpha.3-dirty&quot;, GitCommit:&quot;b44b716965db2d54c8c7dfcdbcb1d54792ab8559&quot;, GitTreeState:&quot;dirty&quot;, BuildDate:&quot;2016-09-27T14:29:43Z&quot;, GoVersion:&quot;go1.7.1&quot;, Compiler:&quot;gc&quot;, Platform:&quot;darwin/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4+&quot;, GitVersion:&quot;v1.4.0-beta.10&quot;, GitCommit:&quot;3aa6d31d3a213ba04b3252cc123ddef26d44cd0e&quot;, GitTreeState:&quot;dirty&quot;, BuildDate:&quot;1970-01-01T00:00:00Z&quot;, GoVersion:&quot;go1.6.2&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.0-alpha.3-dirty", GitCommit:"b44b716965db2d54c8c7dfcdbcb1d54792ab8559", GitTreeState:"dirty", BuildDate:"2016-09-27T14:29:43Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.0-beta.10", GitCommit:"3aa6d31d3a213ba04b3252cc123ddef26d44cd0e", GitTreeState:"dirty", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: Run under minikube v0.10.0 w/ VirtualBox</li> <li><strong>OS</strong> (from /etc/os-release):</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NAME=Boot2Docker VERSION=1.11.1 ID=boot2docker ID_LIKE=tcl VERSION_ID=1.11.1"><pre class="notranslate"><code class="notranslate">NAME=Boot2Docker VERSION=1.11.1 ID=boot2docker ID_LIKE=tcl VERSION_ID=1.11.1 </code></pre></div> <ul dir="auto"> <li><strong>Kernel</strong> (<code class="notranslate">uname -a</code>):<br> <code class="notranslate">Linux minikube 4.4.14-boot2docker #1 SMP Fri Jul 1 21:46:36 UTC 2016 x86_64 GNU/Linux</code></li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto"><em>The period of the scheduled jobs: 1 minute</em></p> <p dir="auto">If running a scheduled job with the <strong>Replace</strong> concurrencyPolicy option, and if the first job is replaced by a new one that was supposed to start, then no new jobs (after the second one) are created. <strong>The second job finishes successfully</strong>.</p> <p dir="auto">In addition, the first job and pod disappear and cannot be accessed using <code class="notranslate">kubectl logs</code>, <code class="notranslate">kubectl get job</code> etc. with the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl logs pyserv-1857390410-of6ut Error from server: pods &quot;pyserv-1857390410-of6ut&quot; not found"><pre class="notranslate"><code class="notranslate">$ kubectl logs pyserv-1857390410-of6ut Error from server: pods "pyserv-1857390410-of6ut" not found </code></pre></div> <p dir="auto">The template used:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: pyserv spec: schedule: 0/1 * * * ? concurrencyPolicy: Replace jobTemplate: spec: template: spec: containers: - name: pyserv image: adrian/ubuntu:v3 args: - python2.7 - /app/server.py restartPolicy: OnFailure"><pre class="notranslate"><code class="notranslate">apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: pyserv spec: schedule: 0/1 * * * ? concurrencyPolicy: Replace jobTemplate: spec: template: spec: containers: - name: pyserv image: adrian/ubuntu:v3 args: - python2.7 - /app/server.py restartPolicy: OnFailure </code></pre></div> <p dir="auto">Upon inspection of the scheduled job I get the following warning:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 3m 3m 1 {scheduled-job-controller } Normal SuccessfulCreate Created job pyserv-1857390410 2m 2m 1 {scheduled-job-controller } Normal SuccessfulDelete Deleted job pyserv-1857390410 2m 2m 1 {scheduled-job-controller } Normal SuccessfulCreate Created job pyserv-2009171792 1m 8s 7 {scheduled-job-controller } Warning FailedGet Get job: jobs.batch &quot;pyserv-1857390410&quot; not found"><pre class="notranslate"><code class="notranslate"> FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 3m 3m 1 {scheduled-job-controller } Normal SuccessfulCreate Created job pyserv-1857390410 2m 2m 1 {scheduled-job-controller } Normal SuccessfulDelete Deleted job pyserv-1857390410 2m 2m 1 {scheduled-job-controller } Normal SuccessfulCreate Created job pyserv-2009171792 1m 8s 7 {scheduled-job-controller } Warning FailedGet Get job: jobs.batch "pyserv-1857390410" not found </code></pre></div> <p dir="auto">The count of the failed event keeps increasing and after a while, the jobs disappear and the only thing remaining is this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1h 5s 457 {scheduled-job-controller } Warning FailedGet Get job: jobs.batch &quot;pyserv-1857390410&quot; not found"><pre class="notranslate"><code class="notranslate"> FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1h 5s 457 {scheduled-job-controller } Warning FailedGet Get job: jobs.batch "pyserv-1857390410" not found </code></pre></div> <p dir="auto"><strong>What you expected to happen</strong>:</p> <ol dir="auto"> <li>For the scheduled jobs to still run</li> <li>For the first job to still exist</li> </ol> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <ol dir="auto"> <li>Start minikube <code class="notranslate">minikube start --kubernetes-version="v1.4.0-beta.10" --vm-driver=virtualbox</code></li> <li>Create a ScheduledJob with the concurrencyPolicy set to Replace that runs a script that lasts more than 1 minute, with the following schedule: <code class="notranslate">schedule: 0/1 * * * ?</code></li> </ol>
0
<p dir="auto">We <a href="https://github.com/Microsoft/vscode/blob/master/src/vs/base/browser/htmlContentRenderer.ts#L283">have</a> a little markdown renderer that support bold, italic, and link but I think it wrong wrt to bold and italic. It uses <code class="notranslate">*</code> and <code class="notranslate">_</code> instead of <code class="notranslate">**</code> or <code class="notranslate">__</code> (bold) and <code class="notranslate">*</code> or <code class="notranslate">_</code> (italic). I might be wrong but at least it isn't consistent with markdown here on github.</p>
<p dir="auto">In case of an exception while debugging code you have the chance to jump to the line of the source code by clicking on the underlined text in red.</p> <p dir="auto">That feature is not available in a hove message but it might be a good idea to allow the user to click on a link in a hover message and "do something" like opening the link on a side editor instead of in the current editor.</p> <p dir="auto">In order to easily implement the following proposal might work:</p> <ol dir="auto"> <li>extend the MarkedString to allow links (using the markdown syntax would be fine)</li> <li>add an event to MarkedString to be notified when the user clicks on a link inside the rendered text. the link uri shall be received as the event parameter</li> </ol>
1
<p dir="auto"><strong>I'm submitting a ...</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">Using NgClass on an svg element throws an error in Internet Explorer 11.</p> <blockquote> <p dir="auto">Unable to get property 'add' of undefined.</p> </blockquote> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1056684/17893594/e90784f6-690b-11e6-850c-290b587fb481.png"><img src="https://cloud.githubusercontent.com/assets/1056684/17893594/e90784f6-690b-11e6-850c-290b587fb481.png" alt="ie10-error-ngclass" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected/desired behavior</strong></p> <p dir="auto">Using NgClass on svg should not throw an error in Internet Explorer 11.</p> <p dir="auto"><strong>Reproduction of the problem</strong></p> <p dir="auto"><strong>Example:</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import {Component, NgModule, NgClass} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' @Component({ selector: 'my-app', template: ` &lt;svg height=&quot;100&quot; width=&quot;100&quot; [ngClass]=&quot;svgClass&quot;&gt; &lt;circle cx=&quot;50&quot; cy=&quot;50&quot; r=&quot;40&quot; stroke=&quot;black&quot; stroke-width=&quot;3&quot; fill=&quot;red&quot; /&gt; &lt;/svg&gt; ` }) export class App { constructor() { this.name = 'Angular2 (Release Candidate!)' } get svgClass() { return 'test'; } } @NgModule({ imports: [ BrowserModule ], declarations: [ App ], bootstrap: [ App ] }) export class AppModule {}"><pre class="notranslate"><code class="notranslate">import {Component, NgModule, NgClass} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' @Component({ selector: 'my-app', template: ` &lt;svg height="100" width="100" [ngClass]="svgClass"&gt; &lt;circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /&gt; &lt;/svg&gt; ` }) export class App { constructor() { this.name = 'Angular2 (Release Candidate!)' } get svgClass() { return 'test'; } } @NgModule({ imports: [ BrowserModule ], declarations: [ App ], bootstrap: [ App ] }) export class AppModule {} </code></pre></div> <p dir="auto"><strong>DEMO:</strong></p> <p dir="auto"><a href="https://plnkr.co/edit/7sE32rIrE4aiWdWe2D8d?p=preview" rel="nofollow">https://plnkr.co/edit/7sE32rIrE4aiWdWe2D8d?p=preview</a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">The expected behavior is to have a css class applied to the svg element.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">N/A</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.4 or 2.0.0-rc.5</li> <li><strong>Browser:</strong> IE 11</li> <li><strong>Language:</strong> TypeScript 1.8.10 or 2.0.0 | ES6/7 | ES5</li> </ul>
<p dir="auto">That means <code class="notranslate">NgClass</code> is broken.</p> <p dir="auto">The reason is annoyingly that IE 11 <a href="https://connect.microsoft.com/IE/feedback/details/1046039/classlist-not-working-on-svg-elements" rel="nofollow">doesn't support <code class="notranslate">classList</code> on SVG elements</a>, so <code class="notranslate">add</code>ing to <code class="notranslate">undefined</code> in the BrowserDomAdapter throws.</p>
1
<p dir="auto">Example PR:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="146042379" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23876" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23876/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23876">#23876</a></p> <p dir="auto">/cc @kubernetes/goog-node <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/smarterclayton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/smarterclayton">@smarterclayton</a></p>
<p dir="auto">FYI. I just noticed this when I am working with several PRs, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143085160" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23400" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23400/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23400">#23400</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143721586" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23521" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23521/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23521">#23521</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="143473044" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/23473" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/23473/hovercard" href="https://github.com/kubernetes/kubernetes/pull/23473">#23473</a> I think this needs to be fixed asap.</p>
1
<p dir="auto">Hi,</p> <p dir="auto">Prior to the changes I was able to press the Run Code 1x and received my positive feedback and move to the next challenge. Now I have to press it after I receive my postive feedback to go to the next challenge. Was this intentionally done?</p> <p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-add-different-margins-to-each-side-of-an-element" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-add-different-margins-to-each-side-of-an-element</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Victoria</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-iterate-over-arrays-with-map" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-iterate-over-arrays-with-map</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Even though the assertions are right, you need to hit the run code button twice to advance in the waypoints in the "Object Oriented and Functional Programming" section. It isn't really a major issue, just a mild annoyance.</p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such package 'base': BUILD file not found on package path and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such package 'base': BUILD file not found on package path and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such target '//tensorflow/core:android_tensorflow_lib_lite_no_rtti_lite_runtime': target 'android_tensorflow_lib_lite_no_rtti_lite_runtime' not declared in package 'tensorflow/core' defined by /home/wenjian/pkgs/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such target '//tensorflow/core:android_proto_lib_no_rtti_lite_runtime': target 'android_proto_lib_no_rtti_lite_runtime' not declared in package 'tensorflow/core' defined by /home/wenjian/pkgs/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: Evaluation of query &quot;deps((//... union @bazel_tools//tools/jdk:toolchain))&quot; failed: errors were encountered while computing transitive closure. "><pre class="notranslate"><code class="notranslate">ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such package 'base': BUILD file not found on package path and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such package 'base': BUILD file not found on package path and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such target '//tensorflow/core:android_tensorflow_lib_lite_no_rtti_lite_runtime': target 'android_tensorflow_lib_lite_no_rtti_lite_runtime' not declared in package 'tensorflow/core' defined by /home/wenjian/pkgs/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: /home/wenjian/pkgs/tensorflow/tensorflow/core/kernels/BUILD:2207:1: no such target '//tensorflow/core:android_proto_lib_no_rtti_lite_runtime': target 'android_proto_lib_no_rtti_lite_runtime' not declared in package 'tensorflow/core' defined by /home/wenjian/pkgs/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/core/kernels:android_tensorflow_kernels_no_rtti_lite_runtime'. ERROR: Evaluation of query "deps((//... union @bazel_tools//tools/jdk:toolchain))" failed: errors were encountered while computing transitive closure. </code></pre></div>
<p dir="auto">I am having trouble configuring the latest master branch (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/dbe7ee0dfa9e5ab26284522379f2747510fc267b/hovercard" href="https://github.com/tensorflow/tensorflow/commit/dbe7ee0dfa9e5ab26284522379f2747510fc267b"><tt>dbe7ee0</tt></a>). When I run <code class="notranslate">./configure</code>, I get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: Evaluation of query &quot;deps((//... union @bazel_tools//tools/jdk:toolchain))&quot; failed: errors were encountered while computing transitive closure. Configuration finished"><pre class="notranslate"><code class="notranslate">ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:213:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:signature'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:meta_graph_portable_proto': target 'meta_graph_portable_proto' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: [...]/tensorflow/tensorflow/contrib/session_bundle/BUILD:107:1: no such target '//tensorflow/core:android_lib_lite': target 'android_lib_lite' not declared in package 'tensorflow/core' defined by [...]/tensorflow/tensorflow/core/BUILD and referenced by '//tensorflow/contrib/session_bundle:session_bundle'. ERROR: Evaluation of query "deps((//... union @bazel_tools//tools/jdk:toolchain))" failed: errors were encountered while computing transitive closure. Configuration finished </code></pre></div> <p dir="auto">To summarize, the dependencies that are included inside the <code class="notranslate">if_android</code> and <code class="notranslate">if_ios</code> are not found. They don't exist in the repository, so that is not that surprising. What is more surprising though is that my vanilla installation is not returning empty lists when <code class="notranslate">if_android</code> is called. I haven't looked into how those functions work, so not sure why that is happening.</p> <h3 dir="auto">Environment info</h3> <p dir="auto">Setup: CentOS, Bazel 0.3.1, CUDA 7.5, CuDNN 5.1, Tensorflow master (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/dbe7ee0dfa9e5ab26284522379f2747510fc267b/hovercard" href="https://github.com/tensorflow/tensorflow/commit/dbe7ee0dfa9e5ab26284522379f2747510fc267b"><tt>dbe7ee0</tt></a>)</p> <p dir="auto">I run <code class="notranslate">configure</code> and set it up for GPU support. Actually, I don't think this is criticial, but first I had to open up <code class="notranslate">configure</code> and add <code class="notranslate">--output_base=...</code> on the two calls to <code class="notranslate">bazel</code>, since my setup requires a custom cache directory.</p> <h3 dir="auto">Fix</h3> <p dir="auto">The <code class="notranslate">if_...</code> lines were added in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/ed87884e50e1a50f7dc7b36dc7a7ff225442bee0/hovercard" href="https://github.com/tensorflow/tensorflow/commit/ed87884e50e1a50f7dc7b36dc7a7ff225442bee0"><tt>ed87884</tt></a>, so a fix that I know works is to use its parent commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/tensorflow/tensorflow/commit/7705791619f5e851687e9a63b4315087e189f8be/hovercard" href="https://github.com/tensorflow/tensorflow/commit/7705791619f5e851687e9a63b4315087e189f8be"><tt>7705791</tt></a>.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.x</li> <li>Operating System version: *nix</li> <li>Java version: 1.7</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/2881751/63033889-f3989a80-beea-11e9-8d7a-7b54021aa7cd.png"><img src="https://user-images.githubusercontent.com/2881751/63033889-f3989a80-beea-11e9-8d7a-7b54021aa7cd.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">What actually happens?</p> <p dir="auto">We can see code like this</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @Override public void create(String path, boolean ephemeral) { if (!ephemeral) { if (checkExists(path)) { return; } } int i = path.lastIndexOf('/'); if (i &gt; 0) { create(path.substring(0, i), false); } if (ephemeral) { createEphemeral(path); } else { createPersistent(path); } }"><pre class="notranslate"> <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-s1">create</span>(<span class="pl-smi">String</span> <span class="pl-s1">path</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">ephemeral</span>) { <span class="pl-k">if</span> (!<span class="pl-s1">ephemeral</span>) { <span class="pl-k">if</span> (<span class="pl-en">checkExists</span>(<span class="pl-s1">path</span>)) { <span class="pl-k">return</span>; } } <span class="pl-smi">int</span> <span class="pl-s1">i</span> = <span class="pl-s1">path</span>.<span class="pl-en">lastIndexOf</span>(<span class="pl-s">'/'</span>); <span class="pl-k">if</span> (<span class="pl-s1">i</span> &gt; <span class="pl-c1">0</span>) { <span class="pl-en">create</span>(<span class="pl-s1">path</span>.<span class="pl-en">substring</span>(<span class="pl-c1">0</span>, <span class="pl-s1">i</span>), <span class="pl-c1">false</span>); } <span class="pl-k">if</span> (<span class="pl-s1">ephemeral</span>) { <span class="pl-en">createEphemeral</span>(<span class="pl-s1">path</span>); } <span class="pl-k">else</span> { <span class="pl-en">createPersistent</span>(<span class="pl-s1">path</span>); } }</pre></div> <p dir="auto">You can see recursive here.<br> If we have a lot of dubbo reference or service.<br> This method would execute too many times and cost a large time.<br> In fact , if dubbo group is same then the path may no need to check every time</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.0</li> <li>Operating System version: MAC</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>update dubbo to 2.7.0</li> <li>update edas-dubbo-extension to 1.0.4</li> <li>start app</li> </ol> <h3 dir="auto">Expected Result</h3> <p dir="auto">services successfully registery to edas config center</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">java.lang.IllegalStateException: Failed to load extension class(interface: interface org.apache.dubbo.registry.RegistryFactory, class line: com.alibaba.edas.dubbo.EdasRegistryFactory) in jar, cause: com.alibaba.dubbo.registry.support.AbstractRegistryFactory</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: Failed to load extension class(interface: interface org.apache.dubbo.registry.RegistryFactory, class line: com.alibaba.edas.dubbo.EdasRegistryFactory) in jar:file:/Users/nobody/.m2/repository/com/alibaba/edas/edas-dubbo-extension/1.0.4/edas-dubbo-extension-1.0.4.jar!/META-INF/dubbo/com.alibaba.dubbo.registry.RegistryFactory, cause: com.alibaba.dubbo.registry.support.AbstractRegistryFactory at org.apache.dubbo.common.extension.ExtensionLoader.loadResource(ExtensionLoader.java:675) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.loadDirectory(ExtensionLoader.java:643) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.loadExtensionClasses(ExtensionLoader.java:624) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getExtensionClasses(ExtensionLoader.java:595) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getSupportedExtensions(ExtensionLoader.java:373) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.factory.SpiExtensionFactory.getExtension(SpiExtensionFactory.java:32) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory.getExtension(AdaptiveExtensionFactory.java:47) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.injectExtension(ExtensionLoader.java:562) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:529) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:344) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:553) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:402) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:363) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:345) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:318) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:112) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:58) ~[dubbo-2.7.0.jar:2.7.0] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at com.copote.nstamp.AuthRpcServiceApplication.main(AuthRpcServiceApplication.java:25) [classes/:na] Caused by: java.lang.NoClassDefFoundError: com.alibaba.dubbo.registry.support.AbstractRegistryFactory at java.lang.Class.forName0(Native Method) ~[na:1.8.0_192] at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_192] at org.apache.dubbo.common.extension.ExtensionLoader.loadResource(ExtensionLoader.java:672) ~[dubbo-2.7.0.jar:2.7.0] ... 29 common frames omitted"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: Failed to load extension class(interface: interface org.apache.dubbo.registry.RegistryFactory, class line: com.alibaba.edas.dubbo.EdasRegistryFactory) in jar:file:/Users/nobody/.m2/repository/com/alibaba/edas/edas-dubbo-extension/1.0.4/edas-dubbo-extension-1.0.4.jar!/META-INF/dubbo/com.alibaba.dubbo.registry.RegistryFactory, cause: com.alibaba.dubbo.registry.support.AbstractRegistryFactory at org.apache.dubbo.common.extension.ExtensionLoader.loadResource(ExtensionLoader.java:675) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.loadDirectory(ExtensionLoader.java:643) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.loadExtensionClasses(ExtensionLoader.java:624) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getExtensionClasses(ExtensionLoader.java:595) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getSupportedExtensions(ExtensionLoader.java:373) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.factory.SpiExtensionFactory.getExtension(SpiExtensionFactory.java:32) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.factory.AdaptiveExtensionFactory.getExtension(AdaptiveExtensionFactory.java:47) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.injectExtension(ExtensionLoader.java:562) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:529) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:344) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:553) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:402) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:363) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:345) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:318) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:112) ~[dubbo-2.7.0.jar:2.7.0] at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:58) ~[dubbo-2.7.0.jar:2.7.0] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE] at com.copote.nstamp.AuthRpcServiceApplication.main(AuthRpcServiceApplication.java:25) [classes/:na] Caused by: java.lang.NoClassDefFoundError: com.alibaba.dubbo.registry.support.AbstractRegistryFactory at java.lang.Class.forName0(Native Method) ~[na:1.8.0_192] at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_192] at org.apache.dubbo.common.extension.ExtensionLoader.loadResource(ExtensionLoader.java:672) ~[dubbo-2.7.0.jar:2.7.0] ... 29 common frames omitted </code></pre></div>
0
<h3 dir="auto">Describe your issue.</h3> <p dir="auto">About a year ago (commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scipy/scipy/commit/6b08e087171479b30fc2dc015d2074a24844789e/hovercard" href="https://github.com/scipy/scipy/commit/6b08e087171479b30fc2dc015d2074a24844789e"><tt>6b08e08</tt></a>) the <code class="notranslate">optimize.tnc</code> module gained some deprecation warnings, indicating that symbols of the form <code class="notranslate">optimze.tnc.&lt;SYM&gt;</code> were deprecated, use instead <code class="notranslate">optimize.&lt;SYM&gt;</code>. Since none of these symbols exist in optimize directly, doing as suggested generates <code class="notranslate">ImportError</code>.</p> <h3 dir="auto">Reproducing Code Example</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ python -c 'from scipy.optimize.tnc import RCSTRINGS ; from scipy.optimize import RCSTRINGS'"><pre class="notranslate">$ <span class="pl-s1">python</span> <span class="pl-c1">-</span><span class="pl-s1">c</span> <span class="pl-s">'from scipy.optimize.tnc import RCSTRINGS ; from scipy.optimize import RCSTRINGS'</span></pre></div> <h3 dir="auto">Error message</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;string&gt;:1: DeprecationWarning: Please use `RCSTRINGS` from the `scipy.optimize` namespace, the `scipy.optimize.tnc` namespace is deprecated. Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt; ImportError: cannot import name 'RCSTRINGS' from 'scipy.optimize' (C:\Program Files\Python310\lib\site-packages\scipy\optimize\__init__.py)"><pre class="notranslate"><span class="pl-k">&lt;</span>string<span class="pl-k">&gt;</span>:1: DeprecationWarning: Please use <span class="pl-s"><span class="pl-pds">`</span>RCSTRINGS<span class="pl-pds">`</span></span> from the <span class="pl-s"><span class="pl-pds">`</span>scipy.optimize<span class="pl-pds">`</span></span> namespace, the <span class="pl-s"><span class="pl-pds">`</span>scipy.optimize.tnc<span class="pl-pds">`</span></span> namespace is deprecated. Traceback (most recent call last): File <span class="pl-s"><span class="pl-pds">"</span>&lt;string&gt;<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span> ImportError: cannot import name <span class="pl-s"><span class="pl-pds">'</span>RCSTRINGS<span class="pl-pds">'</span></span> from <span class="pl-s"><span class="pl-pds">'</span>scipy.optimize<span class="pl-pds">'</span></span> (C:<span class="pl-cce">\P</span>rogram Files<span class="pl-cce">\P</span>ython310<span class="pl-cce">\l</span>ib<span class="pl-cce">\s</span>ite-packages<span class="pl-cce">\s</span>cipy<span class="pl-cce">\o</span>ptimize<span class="pl-cce">\_</span>_init__.py)</pre></div> <h3 dir="auto">SciPy/NumPy/Python version information</h3> <p dir="auto">1.9.3 1.24.1 sys.version_info(major=3, minor=10, micro=7, releaselevel='final', serial=0)</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/645" rel="nofollow">http://projects.scipy.org/scipy/ticket/645</a> on 2008-04-19 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nilswagner01/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nilswagner01">@nilswagner01</a>, assigned to unknown.</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; numpy.__version__ '1.1.0.dev5046' &gt;&gt;&gt; scipy.__version__ '0.7.0.dev4152' ====================================================================== FAIL: test_gammaincinv (test_basic.TestGamma) ---------------------------------------------------------------------- Traceback (most recent call last): File &quot;/usr/lib/python2.4/site-packages/scipy/special/tests/test_basic.py&quot;, line 1056, in test_gammaincinv assert_almost_equal(0.05, x, decimal=10) File &quot;/usr/lib/python2.4/site-packages/numpy/testing/utils.py&quot;, line 158, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 0.050000000000000003 DESIRED: 0.0"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; numpy.__version__ '1.1.0.dev5046' &gt;&gt;&gt; scipy.__version__ '0.7.0.dev4152' ====================================================================== FAIL: test_gammaincinv (test_basic.TestGamma) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/scipy/special/tests/test_basic.py", line 1056, in test_gammaincinv assert_almost_equal(0.05, x, decimal=10) File "/usr/lib/python2.4/site-packages/numpy/testing/utils.py", line 158, in assert_almost_equal assert round(abs(desired - actual),decimal) == 0, msg AssertionError: Items are not equal: ACTUAL: 0.050000000000000003 DESIRED: 0.0 </code></pre></div>
0
<p dir="auto">persist datasource implementation YAML in registry center like this is not good:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ds_0: !!org.apache.commons.dbcp.BasicDataSource accessToUnderlyingConnectionAllowed: false defaultAutoCommit: true defaultReadOnly: false defaultTransactionIsolation: -1 driverClassName: com.mysql.jdbc.Driver initialSize: 0 logAbandoned: false maxActive: 8 maxIdle: 8 maxOpenPreparedStatements: -1 maxWait: -1 minEvictableIdleTimeMillis: 1800000 minIdle: 0 numTestsPerEvictionRun: 3 password: '' poolPreparedStatements: false removeAbandoned: false removeAbandonedTimeout: 300 testOnBorrow: false testOnReturn: false testWhileIdle: false timeBetweenEvictionRunsMillis: -1 url: jdbc:mysql://localhost:3306/demo_ds_0 username: root validationQueryTimeout: -1 ds_1: !!org.apache.commons.dbcp.BasicDataSource accessToUnderlyingConnectionAllowed: false defaultAutoCommit: true defaultReadOnly: false defaultTransactionIsolation: -1 driverClassName: com.mysql.jdbc.Driver initialSize: 0 logAbandoned: false maxActive: 8 maxIdle: 8 maxOpenPreparedStatements: -1 maxWait: -1 minEvictableIdleTimeMillis: 1800000 minIdle: 0 numTestsPerEvictionRun: 3 password: '' poolPreparedStatements: false removeAbandoned: false removeAbandonedTimeout: 300 testOnBorrow: false testOnReturn: false testWhileIdle: false timeBetweenEvictionRunsMillis: -1 url: jdbc:mysql://localhost:3306/demo_ds_1 username: root validationQueryTimeout: -1"><pre class="notranslate"><span class="pl-ent">ds_0</span>: <span class="pl-s">!!org.apache.commons.dbcp.BasicDataSource</span> <span class="pl-ent">accessToUnderlyingConnectionAllowed</span>: <span class="pl-c1">false</span> <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span> <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span> <span class="pl-ent">defaultTransactionIsolation</span>: <span class="pl-c1">-1</span> <span class="pl-ent">driverClassName</span>: <span class="pl-s">com.mysql.jdbc.Driver</span> <span class="pl-ent">initialSize</span>: <span class="pl-c1">0</span> <span class="pl-ent">logAbandoned</span>: <span class="pl-c1">false</span> <span class="pl-ent">maxActive</span>: <span class="pl-c1">8</span> <span class="pl-ent">maxIdle</span>: <span class="pl-c1">8</span> <span class="pl-ent">maxOpenPreparedStatements</span>: <span class="pl-c1">-1</span> <span class="pl-ent">maxWait</span>: <span class="pl-c1">-1</span> <span class="pl-ent">minEvictableIdleTimeMillis</span>: <span class="pl-c1">1800000</span> <span class="pl-ent">minIdle</span>: <span class="pl-c1">0</span> <span class="pl-ent">numTestsPerEvictionRun</span>: <span class="pl-c1">3</span> <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span> <span class="pl-ent">poolPreparedStatements</span>: <span class="pl-c1">false</span> <span class="pl-ent">removeAbandoned</span>: <span class="pl-c1">false</span> <span class="pl-ent">removeAbandonedTimeout</span>: <span class="pl-c1">300</span> <span class="pl-ent">testOnBorrow</span>: <span class="pl-c1">false</span> <span class="pl-ent">testOnReturn</span>: <span class="pl-c1">false</span> <span class="pl-ent">testWhileIdle</span>: <span class="pl-c1">false</span> <span class="pl-ent">timeBetweenEvictionRunsMillis</span>: <span class="pl-c1">-1</span> <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/demo_ds_0</span> <span class="pl-ent">username</span>: <span class="pl-s">root</span> <span class="pl-ent">validationQueryTimeout</span>: <span class="pl-c1">-1</span> <span class="pl-ent">ds_1</span>: <span class="pl-s">!!org.apache.commons.dbcp.BasicDataSource</span> <span class="pl-ent">accessToUnderlyingConnectionAllowed</span>: <span class="pl-c1">false</span> <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span> <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span> <span class="pl-ent">defaultTransactionIsolation</span>: <span class="pl-c1">-1</span> <span class="pl-ent">driverClassName</span>: <span class="pl-s">com.mysql.jdbc.Driver</span> <span class="pl-ent">initialSize</span>: <span class="pl-c1">0</span> <span class="pl-ent">logAbandoned</span>: <span class="pl-c1">false</span> <span class="pl-ent">maxActive</span>: <span class="pl-c1">8</span> <span class="pl-ent">maxIdle</span>: <span class="pl-c1">8</span> <span class="pl-ent">maxOpenPreparedStatements</span>: <span class="pl-c1">-1</span> <span class="pl-ent">maxWait</span>: <span class="pl-c1">-1</span> <span class="pl-ent">minEvictableIdleTimeMillis</span>: <span class="pl-c1">1800000</span> <span class="pl-ent">minIdle</span>: <span class="pl-c1">0</span> <span class="pl-ent">numTestsPerEvictionRun</span>: <span class="pl-c1">3</span> <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span> <span class="pl-ent">poolPreparedStatements</span>: <span class="pl-c1">false</span> <span class="pl-ent">removeAbandoned</span>: <span class="pl-c1">false</span> <span class="pl-ent">removeAbandonedTimeout</span>: <span class="pl-c1">300</span> <span class="pl-ent">testOnBorrow</span>: <span class="pl-c1">false</span> <span class="pl-ent">testOnReturn</span>: <span class="pl-c1">false</span> <span class="pl-ent">testWhileIdle</span>: <span class="pl-c1">false</span> <span class="pl-ent">timeBetweenEvictionRunsMillis</span>: <span class="pl-c1">-1</span> <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/demo_ds_1</span> <span class="pl-ent">username</span>: <span class="pl-s">root</span> <span class="pl-ent">validationQueryTimeout</span>: <span class="pl-c1">-1</span></pre></div> <p dir="auto">Because every time to load YAML from registry center and convert them to object will create new object of database connection pool, it will cost resource of memory and database connection.</p> <p dir="auto">It should persist configuration info only and convert to configuration object when loading from registry center.</p> <p dir="auto">So the tasks should be:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Define connection pool configuration object</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Auto convert from connection pool configuration and connection pool, use reflection</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Replace persist content of Sharding-JDBC's <code class="notranslate">datasource</code> node</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Replace persist content of Sharding-Proxy's <code class="notranslate">datasource</code> node</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Refactor <code class="notranslate">DataSourceParameter</code>, make consist with reflected connection pool configuration</li> </ul>
<h3 dir="auto">Brief description of bug</h3> <h4 dir="auto">Self-Diagnosis</h4> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reviewed the documentation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reviewed the Wiki.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried to use the latest version.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issues for an answer to my question.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the web for an answer to my question.</li> </ul> <h4 dir="auto">Environment</h4> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Operating System: win10</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Plugin version: 5.1<br> Using the JDBC batch function, insert tens of thousands of data, when you do not use ShardingJDBC, it is less than 1s, and the total consumption of 5s after introducing ShardingJDBC</li> </ul>
0
<ul dir="auto"> <li>Electron version: 1.7.3</li> <li>Operating system: Windows 10</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">ipc message from parent to child webview should deliver while both webPreferences['contextIsolation'] = true and webPreferences['sandbox'] = true</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">When both webPreferences['contextIsolation'] = true and webPreferences['sandbox'] = true, the ipc message cant deliver from parent to child webview. However, the ipc message delivers without webPreferences['contextIsolation'] = true</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">main.js =&gt;</p> <p dir="auto">const {app, BrowserWindow, ipcMain} = require('electron')<br> const path = require('path')<br> const url = require('url');</p> <p dir="auto">app.once('ready', () =&gt; {</p> <p dir="auto">let mainWin = new BrowserWindow({<br> show: true<br> });</p> <p dir="auto">mainWin.webContents.on('will-attach-webview', (event, webPreferences, params) =&gt; {<br> // If webPreferences['contextIsolation'] commented out, then you can find the message from child_new.js</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" webPreferences['contextIsolation'] = true; webPreferences['sandbox'] = true;"><pre class="notranslate"><code class="notranslate"> webPreferences['contextIsolation'] = true; webPreferences['sandbox'] = true; </code></pre></div> <p dir="auto">});</p> <p dir="auto">mainWin.loadURL(url.format({<br> pathname: path.join(__dirname, './parent_new.html'),<br> search: 'url=child_new.html',<br> protocol: 'file:',<br> slashes: true<br> }));<br> })</p> <p dir="auto">=&gt; parent_new.html</p> &lt;title&gt;Preload Scripts&lt;/title&gt; Open the webview's dev tools &lt;script&gt; let url = window.location.href; var webview = document.createElement("webview"); document.body.appendChild(webview); webview.setAttribute("id", "webview"); webview.setAttribute("src", url.substring(url.indexOf("=") + 1)); <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" webview.setAttribute(&quot;preload&quot;, &quot;./child_new.js&quot;); require('./child_new'); webview.addEventListener(&quot;ipc-message&quot;, function(event) { console.log('received message from child webview'); // some message received from the webview webview.send('ipc-parent-to-child', event); }); &lt;/script&gt; &lt;/body&gt;"><pre class="notranslate"><code class="notranslate"> webview.setAttribute("preload", "./child_new.js"); require('./child_new'); webview.addEventListener("ipc-message", function(event) { console.log('received message from child webview'); // some message received from the webview webview.send('ipc-parent-to-child', event); }); &lt;/script&gt; &lt;/body&gt; </code></pre></div> <p dir="auto">child_new.js =&gt;</p> <p dir="auto">const { ipcRenderer: ipc } = require('electron');</p> <p dir="auto">console.log('Hey, this is being run in the context of the webview renderer process');</p> <p dir="auto">document.addEventListener('DOMContentLoaded', function(event) {<br> ipc.sendToHost('renderer_to_main',"please find me : child =&gt; parent =&gt; child ");</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ipc.on('ipc-parent-to-child', (event, props) =&gt; { // This message should show while webPreferences['contextIsolation'] = true and webPreferences['sandbox'] = true // But this message show ONLY with webPreferences['sandbox'] = true console.log(`Message received from webview ${JSON.stringify(props)}`); });"><pre class="notranslate"><code class="notranslate">ipc.on('ipc-parent-to-child', (event, props) =&gt; { // This message should show while webPreferences['contextIsolation'] = true and webPreferences['sandbox'] = true // But this message show ONLY with webPreferences['sandbox'] = true console.log(`Message received from webview ${JSON.stringify(props)}`); }); </code></pre></div> <p dir="auto">});</p> <p dir="auto">child_new.html =&gt;</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;p id=&quot;findMe&quot;&gt; Hello from inside the webview. &lt;/p&gt; &lt;/body&gt; &lt;/html&gt;"><pre class="notranslate"><code class="notranslate">&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;p id="findMe"&gt; Hello from inside the webview. &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre></div>
<ul dir="auto"> <li>Electron version: 1.8.2</li> <li>Operating system: MacOS, Windows10</li> </ul> <h3 dir="auto">Expected behavior</h3> <p dir="auto">ipc messages from the main process should be sent to the renderer process when both <code class="notranslate">sandbox</code> and <code class="notranslate">contextIsolation</code> are set.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">ipc messages sent in listeners to webview events are not visible in the renderer process.</p> <h3 dir="auto">How to reproduce</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ git clone https://gist.github.com/4f6c4450cff194838e746ce23e60116d.git $ cd 4f6c4450cff194838e746ce23e60116d/ $ electron main.js "><pre class="notranslate"><code class="notranslate">$ git clone https://gist.github.com/4f6c4450cff194838e746ce23e60116d.git $ cd 4f6c4450cff194838e746ce23e60116d/ $ electron main.js </code></pre></div> <p dir="auto">The devtools will open and the console will log one message. But the second message on the ipc <code class="notranslate">ping</code> channel is not observed.</p> <p dir="auto">Toggling either <code class="notranslate">sandbox</code> or <code class="notranslate">contextIsolation</code> to false allows the <code class="notranslate">ping</code> to travel to the renderer process. In the 1.7.X branch setting both values to true still allows the message to pass through successfully.</p>
1
<p dir="auto">So I have this implementation of a select menu as follows:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import TextField from 'material-ui/TextField'; import { MenuItem } from 'material-ui/Menu'; export default class TestPage extends React.Component { render() { return &lt;div&gt; &lt;TextField fullWidth select value={'CAD'} inputRef={r =&gt; { // Trying to access the ref console.log(r); }} label=&quot;Select&quot; &gt; {['CAD', 'USD'].map(currency =&gt; ( &lt;MenuItem key={currency} value={currency}&gt; {currency} &lt;/MenuItem&gt; ))} &lt;/TextField&gt; &lt;/div&gt; } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">TextField</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/TextField'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">MenuItem</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/Menu'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">TestPage</span> <span class="pl-k">extends</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span> <span class="pl-kos">{</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">TextField</span> <span class="pl-c1">fullWidth</span> <span class="pl-c1">select</span> <span class="pl-c1">value</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s">'CAD'</span><span class="pl-kos">}</span> <span class="pl-c1">inputRef</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">r</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Trying to access the ref</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">r</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Select"</span> <span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s">'CAD'</span><span class="pl-kos">,</span> <span class="pl-s">'USD'</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span><span class="pl-s1">currency</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">MenuItem</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">currency</span><span class="pl-kos">}</span> <span class="pl-c1">value</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">currency</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s1">currency</span><span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">MenuItem</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">TextField</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">The console.log outputs the HTMLInput element</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The console.log outputs some mete object with "node" and "value"<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7451445/33242992-41f4fc56-d2ab-11e7-8de9-a1f350242e84.png"><img src="https://user-images.githubusercontent.com/7451445/33242992-41f4fc56-d2ab-11e7-8de9-a1f350242e84.png" alt="image" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">Here is codesandbox<br> <a href="url">https://codesandbox.io/embed/kv16j7woo</a></p> <h2 dir="auto">Context</h2> <p dir="auto">I need to gain access to the element to get the value of the input box</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0 beta 20</td> </tr> <tr> <td>React</td> <td>16</td> </tr> <tr> <td>browser</td> <td>chrome</td> </tr> </tbody> </table>
<p dir="auto">When writing theme overrides, (following <a href="https://material-ui.com/customization/themes/#the-other-variables" rel="nofollow">https://material-ui.com/customization/themes/#the-other-variables</a>) changing the shadows array doesn't override the default shadow style. Other elements like spacing and typography work fine.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Defining a new shadow table with changed values should override the shadows css.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Material UI ignores the theme's shadow settings and returns the defaults.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">Try it with the following theme <code class="notranslate">default.js</code>. The spacing changes to spec, the palette is defined appropriately, but the shadows do not change. The shadows in the code below are different from the defaults.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { createMuiTheme } from 'material-ui/styles'; import amber from 'material-ui/colors/amber'; import red from 'material-ui/colors/red'; import purple from 'material-ui/colors/purple'; const theme = createMuiTheme({ palette: { primary: purple, secondary: red, error: amber, }, &quot;spacing&quot;: { &quot;unit&quot;: 15 }, &quot;shadows&quot;: [ &quot;none&quot;, &quot;0px 2px 3px 0px rgba(0, 0, 0, 0.3),0px 4px 5px 0px rgba(0, 0, 0, 0.06),0px 2px 1px -1px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 2px 5px 0px rgba(0, 0, 0, 0.3),0px 2px 2px 0px rgba(0, 0, 0, 0.06),0px 3px 1px -2px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 2px 9px 0px rgba(0, 0, 0, 0.3),0px 1px 3px 0px rgba(0, 0, 0, 0.06),0px 3px 3px -2px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 4px 4px -1px rgba(0, 0, 0, 0.3),0px 0px 5px 0px rgba(0, 0, 0, 0.06),0px 1px 10px 0px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 6px 6px -1px rgba(0, 0, 0, 0.3),0px -1px 10px 0px rgba(0, 0, 0, 0.06),0px 1px 14px 0px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 6px 6px -1px rgba(0, 0, 0, 0.3),0px -2px 12px 0px rgba(0, 0, 0, 0.06),0px 1px 18px 0px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 7px 6px -2px rgba(0, 0, 0, 0.3),0px -1px 12px 1px rgba(0, 0, 0, 0.06),0px 2px 16px 1px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 10px 6px -3px rgba(0, 0, 0, 0.3),0px 0px 12px 1px rgba(0, 0, 0, 0.06),0px 3px 14px 2px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 10px 7px -3px rgba(0, 0, 0, 0.3),0px 1px 14px 1px rgba(0, 0, 0, 0.06),0px 3px 16px 2px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 11px 7px -3px rgba(0, 0, 0, 0.3),0px 2px 16px 1px rgba(0, 0, 0, 0.06),0px 4px 18px 3px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 11px 8px -4px rgba(0, 0, 0, 0.3),0px 3px 17px 1px rgba(0, 0, 0, 0.06),0px 4px 20px 3px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 13px 9px -4px rgba(0, 0, 0, 0.3),0px 4px 19px 2px rgba(0, 0, 0, 0.06),0px 5px 22px 4px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 13px 9px -4px rgba(0, 0, 0, 0.3),0px 5px 21px 2px rgba(0, 0, 0, 0.06),0px 5px 24px 4px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 13px 10px -4px rgba(0, 0, 0, 0.3),0px 6px 23px 2px rgba(0, 0, 0, 0.06),0px 5px 26px 4px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 15px 10px -5px rgba(0, 0, 0, 0.3),0px 7px 24px 2px rgba(0, 0, 0, 0.06),0px 6px 28px 5px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 15px 12px -5px rgba(0, 0, 0, 0.3),0px 8px 26px 2px rgba(0, 0, 0, 0.06),0px 6px 30px 5px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 15px 13px -5px rgba(0, 0, 0, 0.3),0px 9px 28px 2px rgba(0, 0, 0, 0.06),0px 6px 32px 5px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 17px 13px -5px rgba(0, 0, 0, 0.3),0px 10px 30px 2px rgba(0, 0, 0, 0.06),0px 7px 34px 6px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 17px 14px -6px rgba(0, 0, 0, 0.3),0px 11px 31px 2px rgba(0, 0, 0, 0.06),0px 7px 36px 6px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 19px 15px -6px rgba(0, 0, 0, 0.3),0px 12px 33px 3px rgba(0, 0, 0, 0.06),0px 8px 38px 7px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 19px 15px -6px rgba(0, 0, 0, 0.3),0px 13px 35px 3px rgba(0, 0, 0, 0.06),0px 8px 40px 7px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 19px 16px -6px rgba(0, 0, 0, 0.3),0px 14px 37px 3px rgba(0, 0, 0, 0.06),0px 8px 42px 7px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 20px 16px -7px rgba(0, 0, 0, 0.3),0px 15px 38px 3px rgba(0, 0, 0, 0.06),0px 9px 44px 8px rgba(0, 0, 0, 0.04)&quot;, &quot;0px 20px 18px -7px rgba(0, 0, 0, 0.3),0px 16px 40px 3px rgba(0, 0, 0, 0.06),0px 9px 46px 8px rgba(0, 0, 0, 0.04)&quot; ], }); export default theme;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">createMuiTheme</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/styles'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">amber</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/colors/amber'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">red</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/colors/red'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">purple</span> <span class="pl-k">from</span> <span class="pl-s">'material-ui/colors/purple'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">theme</span> <span class="pl-c1">=</span> <span class="pl-en">createMuiTheme</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">palette</span>: <span class="pl-kos">{</span> <span class="pl-c1">primary</span>: <span class="pl-s1">purple</span><span class="pl-kos">,</span> <span class="pl-c1">secondary</span>: <span class="pl-s1">red</span><span class="pl-kos">,</span> <span class="pl-c1">error</span>: <span class="pl-s1">amber</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"spacing"</span>: <span class="pl-kos">{</span> <span class="pl-s">"unit"</span>: <span class="pl-c1">15</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"shadows"</span>: <span class="pl-kos">[</span> <span class="pl-s">"none"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 2px 3px 0px rgba(0, 0, 0, 0.3),0px 4px 5px 0px rgba(0, 0, 0, 0.06),0px 2px 1px -1px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 2px 5px 0px rgba(0, 0, 0, 0.3),0px 2px 2px 0px rgba(0, 0, 0, 0.06),0px 3px 1px -2px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 2px 9px 0px rgba(0, 0, 0, 0.3),0px 1px 3px 0px rgba(0, 0, 0, 0.06),0px 3px 3px -2px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 4px 4px -1px rgba(0, 0, 0, 0.3),0px 0px 5px 0px rgba(0, 0, 0, 0.06),0px 1px 10px 0px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 6px 6px -1px rgba(0, 0, 0, 0.3),0px -1px 10px 0px rgba(0, 0, 0, 0.06),0px 1px 14px 0px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 6px 6px -1px rgba(0, 0, 0, 0.3),0px -2px 12px 0px rgba(0, 0, 0, 0.06),0px 1px 18px 0px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 7px 6px -2px rgba(0, 0, 0, 0.3),0px -1px 12px 1px rgba(0, 0, 0, 0.06),0px 2px 16px 1px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 10px 6px -3px rgba(0, 0, 0, 0.3),0px 0px 12px 1px rgba(0, 0, 0, 0.06),0px 3px 14px 2px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 10px 7px -3px rgba(0, 0, 0, 0.3),0px 1px 14px 1px rgba(0, 0, 0, 0.06),0px 3px 16px 2px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 11px 7px -3px rgba(0, 0, 0, 0.3),0px 2px 16px 1px rgba(0, 0, 0, 0.06),0px 4px 18px 3px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 11px 8px -4px rgba(0, 0, 0, 0.3),0px 3px 17px 1px rgba(0, 0, 0, 0.06),0px 4px 20px 3px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 13px 9px -4px rgba(0, 0, 0, 0.3),0px 4px 19px 2px rgba(0, 0, 0, 0.06),0px 5px 22px 4px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 13px 9px -4px rgba(0, 0, 0, 0.3),0px 5px 21px 2px rgba(0, 0, 0, 0.06),0px 5px 24px 4px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 13px 10px -4px rgba(0, 0, 0, 0.3),0px 6px 23px 2px rgba(0, 0, 0, 0.06),0px 5px 26px 4px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 15px 10px -5px rgba(0, 0, 0, 0.3),0px 7px 24px 2px rgba(0, 0, 0, 0.06),0px 6px 28px 5px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 15px 12px -5px rgba(0, 0, 0, 0.3),0px 8px 26px 2px rgba(0, 0, 0, 0.06),0px 6px 30px 5px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 15px 13px -5px rgba(0, 0, 0, 0.3),0px 9px 28px 2px rgba(0, 0, 0, 0.06),0px 6px 32px 5px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 17px 13px -5px rgba(0, 0, 0, 0.3),0px 10px 30px 2px rgba(0, 0, 0, 0.06),0px 7px 34px 6px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 17px 14px -6px rgba(0, 0, 0, 0.3),0px 11px 31px 2px rgba(0, 0, 0, 0.06),0px 7px 36px 6px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 19px 15px -6px rgba(0, 0, 0, 0.3),0px 12px 33px 3px rgba(0, 0, 0, 0.06),0px 8px 38px 7px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 19px 15px -6px rgba(0, 0, 0, 0.3),0px 13px 35px 3px rgba(0, 0, 0, 0.06),0px 8px 40px 7px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 19px 16px -6px rgba(0, 0, 0, 0.3),0px 14px 37px 3px rgba(0, 0, 0, 0.06),0px 8px 42px 7px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 20px 16px -7px rgba(0, 0, 0, 0.3),0px 15px 38px 3px rgba(0, 0, 0, 0.06),0px 9px 44px 8px rgba(0, 0, 0, 0.04)"</span><span class="pl-kos">,</span> <span class="pl-s">"0px 20px 18px -7px rgba(0, 0, 0, 0.3),0px 16px 40px 3px rgba(0, 0, 0, 0.06),0px 9px 46px 8px rgba(0, 0, 0, 0.04)"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">theme</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13400130/31844941-dd38839e-b5b0-11e7-9209-1cbe370d0f90.png"><img src="https://user-images.githubusercontent.com/13400130/31844941-dd38839e-b5b0-11e7-9209-1cbe370d0f90.png" alt="image" style="max-width: 100%;"></a><br> ^ the above shadow is not in my shadow definition override.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v1.0.0-beta.17</td> </tr> </tbody> </table>
0
<p dir="auto"><strong>Glide Version</strong>:<br> 3.7.0</p> <p dir="auto"><strong>Device/Android Version</strong>:<br> Reproduced on Android 7.0 emulator and various 6.0 devices (Nexus 5, Galaxy Note 5, others)</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p> <p dir="auto">Suppose you have two images you want to toggle between in a single, static <code class="notranslate">ImageView</code>. They're both memory-cached and so can theoretically display immediately upon toggle, but to create a nicer user experience, you'd like to fade out the previous image at the same time that you fade in the new image. The resulting animation - composed of two fade animations at the same time - is what most designers refer to as a "crossfade". It looks something like this:</p> <p dir="auto"><a href="https://gfycat.com/WillingInsignificantHypacrosaurus" rel="nofollow">https://gfycat.com/WillingInsignificantHypacrosaurus</a></p> <p dir="auto">Unfortunately, this is not the default behavior of Glide, although it does appear to be the intention. Consider the following Glide load call, where the <code class="notranslate">RequestListener</code> is used to enforce Glide's <code class="notranslate">.crossfade()</code> functionality is used every time (default functionality skips the <code class="notranslate">.crossfade()</code> animation once the image has been memory-cached) :</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" public static void loadWithCrossfadeAlways(@NonNull String path, @NonNull ImageView target) { Glide.with(target.getContext()) .load(path) .listener(new RequestListener&lt;String, GlideDrawable&gt;() { @Override public boolean onException(Exception e, String model, Target&lt;GlideDrawable&gt; target, boolean isFirstResource) { return false; } @Override public boolean onResourceReady(GlideDrawable resource, String model, Target&lt;GlideDrawable&gt; target, boolean isFromMemoryCache, boolean isFirstResource) { ImageViewTarget imTarget = (ImageViewTarget) target; return new DrawableCrossFadeFactory&lt;&gt;() .build(false, isFirstResource) .animate(resource, imTarget); } }) .into(target); }"><pre class="notranslate"> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-s1">loadWithCrossfadeAlways</span>(<span class="pl-c1">@</span><span class="pl-c1">NonNull</span> <span class="pl-smi">String</span> <span class="pl-s1">path</span>, <span class="pl-c1">@</span><span class="pl-c1">NonNull</span> <span class="pl-smi">ImageView</span> <span class="pl-s1">target</span>) { <span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">target</span>.<span class="pl-en">getContext</span>()) .<span class="pl-en">load</span>(<span class="pl-s1">path</span>) .<span class="pl-en">listener</span>(<span class="pl-k">new</span> <span class="pl-smi">RequestListener</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">GlideDrawable</span>&gt;() { <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">onException</span>(<span class="pl-smi">Exception</span> <span class="pl-s1">e</span>, <span class="pl-smi">String</span> <span class="pl-s1">model</span>, <span class="pl-smi">Target</span>&lt;<span class="pl-smi">GlideDrawable</span>&gt; <span class="pl-s1">target</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">isFirstResource</span>) { <span class="pl-k">return</span> <span class="pl-c1">false</span>; } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">boolean</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">GlideDrawable</span> <span class="pl-s1">resource</span>, <span class="pl-smi">String</span> <span class="pl-s1">model</span>, <span class="pl-smi">Target</span>&lt;<span class="pl-smi">GlideDrawable</span>&gt; <span class="pl-s1">target</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">isFromMemoryCache</span>, <span class="pl-smi">boolean</span> <span class="pl-s1">isFirstResource</span>) { <span class="pl-smi">ImageViewTarget</span> <span class="pl-s1">imTarget</span> = (<span class="pl-smi">ImageViewTarget</span>) <span class="pl-s1">target</span>; <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">DrawableCrossFadeFactory</span>&lt;&gt;() .<span class="pl-en">build</span>(<span class="pl-c1">false</span>, <span class="pl-s1">isFirstResource</span>) .<span class="pl-en">animate</span>(<span class="pl-s1">resource</span>, <span class="pl-s1">imTarget</span>); } }) .<span class="pl-en">into</span>(<span class="pl-s1">target</span>); }</pre></div> <p dir="auto">The result does not produce a true crossfade, but instead immediately removes the original image, and fades the new image in over the background of the View:</p> <p dir="auto"><a href="https://gfycat.com/UnfoldedVastAmurstarfish" rel="nofollow">https://gfycat.com/UnfoldedVastAmurstarfish</a></p> <p dir="auto">The reason for this appears to be in <code class="notranslate">ImageViewTarget.onLoadStarted(Drawable placeholder)</code> and <code class="notranslate">ImageViewTarget.onLoadCleared(Drawable placeholder)</code>, both of which contain a single call to <code class="notranslate">ImageView.setImageDrawable(placeholder)</code>. The reasoning for this call's presence is self evident - it's how the specified placeholder image gets rendered - but it prevents a smooth crossfade from occurring, and worse yet, does so <strong>even if <code class="notranslate">placeholder</code> is not specified - i.e, its value is <code class="notranslate">null</code></strong>.</p> <p dir="auto">Ideally, the placeholder would be crossfaded in (as the previous image fades out) and then crossfaded out (as the new image fades in), or in the case of a missing placeholder or memory-cached image, omitted altogether.</p> <p dir="auto">In the meantime, it is possible to work around this by creating an <code class="notranslate">ImageViewTarget</code> subclass that suppresses the above-described <code class="notranslate">setImageDrawable()</code>:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class CrossfadeImageViewTarget extends GlideDrawableImageViewTarget { public CrossfadeImageViewTarget(ImageView view) { super(view); } @Override public void onLoadStarted(Drawable placeholder) { if (placeholder != null) { super.onLoadStarted(placeholder); } } @Override public void onLoadCleared(Drawable placeholder) { if (placeholder != null) { super.onLoadCleared(placeholder); } } }"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">CrossfadeImageViewTarget</span> <span class="pl-k">extends</span> <span class="pl-smi">GlideDrawableImageViewTarget</span> { <span class="pl-k">public</span> <span class="pl-smi">CrossfadeImageViewTarget</span>(<span class="pl-smi">ImageView</span> <span class="pl-s1">view</span>) { <span class="pl-en">super</span>(<span class="pl-s1">view</span>); } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onLoadStarted</span>(<span class="pl-smi">Drawable</span> <span class="pl-s1">placeholder</span>) { <span class="pl-k">if</span> (<span class="pl-s1">placeholder</span> != <span class="pl-c1">null</span>) { <span class="pl-en">super</span>.<span class="pl-en">onLoadStarted</span>(<span class="pl-s1">placeholder</span>); } } <span class="pl-c1">@</span><span class="pl-c1">Override</span> <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onLoadCleared</span>(<span class="pl-smi">Drawable</span> <span class="pl-s1">placeholder</span>) { <span class="pl-k">if</span> (<span class="pl-s1">placeholder</span> != <span class="pl-c1">null</span>) { <span class="pl-en">super</span>.<span class="pl-en">onLoadCleared</span>(<span class="pl-s1">placeholder</span>); } } }</pre></div> <p dir="auto">Using this subclass as the target in the above loader method produces the intended result.</p>
<p dir="auto"><strong>Glide Version</strong>: 4.2.0<br> <strong>Integration libraries</strong>: none</p> <p dir="auto"><strong>Issue details</strong>: I have an <code class="notranslate">ImageView</code> that needs to be refreshed often, but each time there is a change the image <strong>flickers</strong> white (unless it is present in the memory cache).</p> <p dir="auto">This must be the default behavior, as I can see in the basic lifecycle of a <code class="notranslate">Glide</code> request:</p> <ol dir="auto"> <li>Cancel any in progress load for the View and/or <strong>clear out any current image</strong> and recycle its resource.</li> <li>Set the placeholder drawable</li> <li>Start the image load</li> <li>If it completes synchronously (from the memory cache) set the image on the View and do not animate.</li> <li>If it completes asynchronously, set the image on the View and animate.</li> </ol> <p dir="auto">Is there a way to <strong>disable the default clearing</strong> of the <code class="notranslate">ImageView</code> on step 1) <strong>until the next image is loaded</strong> in order to prevent the flicker?</p> <p dir="auto">The following works, but I was wondering if there is a simpler solution, for example by disabling animations. I read something about a <code class="notranslate">dontAnimate()</code> method but can't find it on <code class="notranslate">4.2.0</code>.</p> <div class="highlight highlight-source-kotlin notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide .with(thisActivity) .asBitmap() .load(someUrl) .into(object : SimpleTarget&lt;Bitmap&gt;() { override fun onResourceReady(resource: Bitmap, transition: Transition&lt;in Bitmap&gt;) { imageView.setImageBitmap(resource) } })"><pre class="notranslate"><span class="pl-en">Glide</span> .<span class="pl-c1">with</span>(thisActivity) .asBitmap() .load(someUrl) .into(<span class="pl-k">object</span> <span class="pl-k">:</span> <span class="pl-en">SimpleTarget</span>&lt;<span class="pl-en">Bitmap</span>&gt;() { <span class="pl-k">override</span> <span class="pl-k">fun</span> <span class="pl-en">onResourceReady</span>(<span class="pl-smi">resource</span><span class="pl-k">:</span> <span class="pl-en">Bitmap</span>, <span class="pl-smi">transition</span><span class="pl-k">:</span> <span class="pl-en">Transition</span>&lt;<span class="pl-k">in</span> <span class="pl-en">Bitmap</span>&gt;) { imageView.setImageBitmap(resource) } })</pre></div>
1
<p dir="auto">Describe what you were doing when the bug occurred:</p> <ol dir="auto"> <li>I was debugging one of my react components and found the issue.</li> <li>As soon as I open react dev tools, and scroll I encountered this problem</li> <li></li> </ol> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.11.0-39713716aa</p> <p dir="auto">Call stack: at store_Store.getElementAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22171:35)<br> at store_Store.getElementIDAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22187:26)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29770:63<br> at List.render (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23893:18)<br> at Ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14002:76)<br> at Hi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13993:10)<br> at uk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16728:86)<br> at tk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16245:11)<br> at qk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16237:23)<br> at jk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16221:5)</p> <p dir="auto">Component stack: at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)<br> at div<br> at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)<br> at div<br> at div<br> at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)<br> at div<br> at div<br> at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)<br> at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)<br> at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)<br> at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)<br> at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)<br> at div<br> at div<br> at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)<br> at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)<br> at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)<br> at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)<br> at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong> Feature</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">React dev tools has the very useful "inspect dom node" feature that ties a component in your tree to its particular dom node.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">In e2e testing scenarios using tools such as cypress I often find myself sprinkling data test id attributes throughout my code to select certain elements with which to do various assertions. I've found that these test id attributes closely mirror the component hierarchy. Instead of needing to declare this essentially duplicate information it would be useful if there was a utility which allowed me to programmatically retrieve a dom node that corresponds to a particular component's name for testing purposes. Ideally, this would essentially mirror the functionality of the "inspect dom node" feature in react dev tools.</p>
0
<p dir="auto">I just upgraded to 18.1 w/ conda. I started noticing this problem in some notebooks I created before the upgrade but recently revisited for further analysis.</p> <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import pandas as pd df = pd.DataFrame({'task_complete':['success','success','fail','fail','success','fail','success'], 'value':[np.nan,4.5,5.7,3.0,np.nan,6.7,3.78]})"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'task_complete'</span>:[<span class="pl-s">'success'</span>,<span class="pl-s">'success'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'success'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'success'</span>], <span class="pl-s">'value'</span>:[<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">4.5</span>,<span class="pl-c1">5.7</span>,<span class="pl-c1">3.0</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">6.7</span>,<span class="pl-c1">3.78</span>]})</pre></div> <p dir="auto"><code class="notranslate">df.value.describe()</code> returns a RuntimeWarning from numpy, which then gives this unexpected result for the quantiles:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: df.value.describe() /Users/adrianpalacios/anaconda/lib/python3.4/site-packages/numpy/lib/function_base.py:3403: RuntimeWarning: Invalid value encountered in median RuntimeWarning) Out[5]: count 5.000000 mean 4.736000 std 1.480703 min 3.000000 25% NaN 50% NaN 75% NaN max 6.700000 Name: value, dtype: float64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">value</span>.<span class="pl-en">describe</span>() <span class="pl-c1">/</span><span class="pl-v">Users</span><span class="pl-c1">/</span><span class="pl-s1">adrianpalacios</span><span class="pl-c1">/</span><span class="pl-s1">anaconda</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">4</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">numpy</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">function_base</span>.<span class="pl-s1">py</span>:<span class="pl-c1">3403</span>: <span class="pl-v">RuntimeWarning</span>: <span class="pl-v">Invalid</span> <span class="pl-s1">value</span> <span class="pl-s1">encountered</span> <span class="pl-c1">in</span> <span class="pl-s1">median</span> <span class="pl-v">RuntimeWarning</span>) <span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: <span class="pl-s1">count</span> <span class="pl-c1">5.000000</span> <span class="pl-s1">mean</span> <span class="pl-c1">4.736000</span> <span class="pl-s1">std</span> <span class="pl-c1">1.480703</span> <span class="pl-s1">min</span> <span class="pl-c1">3.000000</span> <span class="pl-c1">25</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-c1">50</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-c1">75</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-s1">max</span> <span class="pl-c1">6.700000</span> <span class="pl-v">Name</span>: <span class="pl-s1">value</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">I got this using a different conda environment that has not been upgraded to latest pandas version:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [5]: df.value.describe() Out[5]: count 5.000000 mean 4.736000 std 1.480703 min 3.000000 25% 3.780000 50% 4.500000 75% 5.700000 max 6.700000 Name: value, dtype: float64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">value</span>.<span class="pl-en">describe</span>() <span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: <span class="pl-s1">count</span> <span class="pl-c1">5.000000</span> <span class="pl-s1">mean</span> <span class="pl-c1">4.736000</span> <span class="pl-s1">std</span> <span class="pl-c1">1.480703</span> <span class="pl-s1">min</span> <span class="pl-c1">3.000000</span> <span class="pl-c1">25</span><span class="pl-c1">%</span> <span class="pl-c1">3.780000</span> <span class="pl-c1">50</span><span class="pl-c1">%</span> <span class="pl-c1">4.500000</span> <span class="pl-c1">75</span><span class="pl-c1">%</span> <span class="pl-c1">5.700000</span> <span class="pl-s1">max</span> <span class="pl-c1">6.700000</span> <span class="pl-v">Name</span>: <span class="pl-s1">value</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <p dir="auto">Dropping the NaN's works in pandas 18.1:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [9]: df.value.dropna().describe() Out[9]: count 5.000000 mean 4.736000 std 1.480703 min 3.000000 25% 3.780000 50% 4.500000 75% 5.700000 max 6.700000 Name: value, dtype: float64"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">9</span>]: <span class="pl-s1">df</span>.<span class="pl-s1">value</span>.<span class="pl-en">dropna</span>().<span class="pl-en">describe</span>() <span class="pl-v">Out</span>[<span class="pl-c1">9</span>]: <span class="pl-s1">count</span> <span class="pl-c1">5.000000</span> <span class="pl-s1">mean</span> <span class="pl-c1">4.736000</span> <span class="pl-s1">std</span> <span class="pl-c1">1.480703</span> <span class="pl-s1">min</span> <span class="pl-c1">3.000000</span> <span class="pl-c1">25</span><span class="pl-c1">%</span> <span class="pl-c1">3.780000</span> <span class="pl-c1">50</span><span class="pl-c1">%</span> <span class="pl-c1">4.500000</span> <span class="pl-c1">75</span><span class="pl-c1">%</span> <span class="pl-c1">5.700000</span> <span class="pl-s1">max</span> <span class="pl-c1">6.700000</span> <span class="pl-v">Name</span>: <span class="pl-s1">value</span>, <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <p dir="auto">However, this work-around is not a great option when multiple columns w/ NaNs are present:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df2 = pd.DataFrame({'task_complete':['success','success','fail','fail','success','fail','success'], 'value':[np.nan,4.5,5.7,3.0,np.nan,6.7,3.78], 'more_values':[8.2,np.nan,np.nan,np.nan,9.4,np.nan,np.nan] }) In [17]: df2[['value','more_values']].dropna().describe() Out[17]: value more_values count 0.0 0.0 mean NaN NaN std NaN NaN min NaN NaN 25% NaN NaN 50% NaN NaN 75% NaN NaN max NaN NaN"><pre class="notranslate"><span class="pl-s1">df2</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'task_complete'</span>:[<span class="pl-s">'success'</span>,<span class="pl-s">'success'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'success'</span>,<span class="pl-s">'fail'</span>,<span class="pl-s">'success'</span>], <span class="pl-s">'value'</span>:[<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">4.5</span>,<span class="pl-c1">5.7</span>,<span class="pl-c1">3.0</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">6.7</span>,<span class="pl-c1">3.78</span>], <span class="pl-s">'more_values'</span>:[<span class="pl-c1">8.2</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-c1">9.4</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>,<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>] }) <span class="pl-v">In</span> [<span class="pl-c1">17</span>]: <span class="pl-s1">df2</span>[[<span class="pl-s">'value'</span>,<span class="pl-s">'more_values'</span>]].<span class="pl-en">dropna</span>().<span class="pl-en">describe</span>() <span class="pl-v">Out</span>[<span class="pl-c1">17</span>]: <span class="pl-s1">value</span> <span class="pl-s1">more_values</span> <span class="pl-s1">count</span> <span class="pl-c1">0.0</span> <span class="pl-c1">0.0</span> <span class="pl-s1">mean</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-s1">std</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-s1">min</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-c1">25</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-c1">50</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-c1">75</span><span class="pl-c1">%</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span> <span class="pl-s1">max</span> <span class="pl-v">NaN</span> <span class="pl-v">NaN</span></pre></div> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.4.4.final.0<br> python-bits: 64<br> OS: Darwin<br> OS-release: 15.4.0<br> machine: x86_64<br> processor: i386<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8</p> <p dir="auto">pandas: 0.18.1<br> nose: 1.3.7<br> pip: 8.1.1<br> setuptools: 20.2.2<br> Cython: 0.22.1<br> numpy: 1.10.4<br> scipy: 0.17.0<br> statsmodels: 0.6.1<br> xarray: None<br> IPython: 4.2.0<br> sphinx: 1.3.1<br> patsy: 0.3.0<br> dateutil: 2.4.2<br> pytz: 2015.7<br> blosc: None<br> bottleneck: 1.0.0<br> tables: 3.2.0<br> numexpr: 2.5<br> matplotlib: 1.5.1<br> openpyxl: 1.8.5<br> xlrd: 0.9.3<br> xlwt: 1.0.0<br> xlsxwriter: 0.7.3<br> lxml: 3.4.4<br> bs4: 4.3.2<br> html5lib: None<br> httplib2: 0.9.1<br> apiclient: None<br> sqlalchemy: 1.0.5<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.8<br> boto: 2.38.0<br> pandas_datareader: None</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy s = pd.Series([1, 2, 3, 4, numpy.nan]) s.quantile(0.5) nan"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">4</span>, <span class="pl-s1">numpy</span>.<span class="pl-s1">nan</span>]) <span class="pl-s1">s</span>.<span class="pl-en">quantile</span>(<span class="pl-c1">0.5</span>) <span class="pl-s1">nan</span></pre></div> <h4 dir="auto">Expected Output</h4> <p dir="auto">I would expect 2.5 as output (as with version 0.17.1).</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <p dir="auto">commit: None<br> python: 2.7.6.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 3.13.0-85-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: de_DE.UTF-8</p> <p dir="auto">pandas: 0.18.1<br> nose: None<br> pip: 1.5.4<br> setuptools: 2.2<br> Cython: None<br> numpy: 1.11.0<br> scipy: 0.16.1<br> statsmodels: None<br> xarray: None<br> IPython: None<br> sphinx: None<br> patsy: None<br> dateutil: 2.5.3<br> pytz: 2016.4<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> matplotlib: 1.5.1<br> openpyxl: 2.3.2<br> xlrd: 0.9.4<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> boto: None<br> pandas_datareader: None</p>
1
<p dir="auto">[Enter steps to reproduce below:]</p> <p dir="auto">I was on a Unsaved File and I used Ctrl+W to close it.</p> <p dir="auto"><strong>Atom Version</strong>: 0.186.0<br> <strong>System</strong>: Mac OS X 10.10.1<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: Cannot find module 'dialog'<br> Error: Cannot find module 'dialog'<br> at Function.Module._resolveFilename (module.js:351:15)<br> at Function.Module._load (module.js:293:25)<br> at Module.require (module.js:380:17)<br> at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79)<br> at EventEmitter.emit (events.js:119:17)<br> at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23)<br> at EventEmitter.emit (events.js:119:17)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77 Error: Cannot find module 'dialog' Error: Cannot find module 'dialog' at Function.Module._resolveFilename (module.js:351:15) at Function.Module._load (module.js:293:25) at Module.require (module.js:380:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79) at EventEmitter.emit (events.js:119:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23) at EventEmitter.emit (events.js:119:17) at metaToValue (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77:15) at Object.exports.require (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:157:34) at Atom.module.exports.Atom.confirm (/Applications/Atom.app/Contents/Resources/app/src/atom.js:705:23) at Pane.module.exports.Pane.promptToSaveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:507:21) at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:456:18) at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:436:12) at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:697:35) at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:741:21) at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:292:30) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)"><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77 Error: Cannot find module 'dialog' Error: Cannot find module 'dialog' at Function.Module._resolveFilename (module.js:351:15) at Function.Module._load (module.js:293:25) at Module.require (module.js:380:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79) at EventEmitter.emit (events.js:119:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23) at EventEmitter.emit (events.js:119:17) at metaToValue (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77:15) at Object.exports.require (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:157:34) at Atom.module.exports.Atom.confirm (/Applications/Atom.app/Contents/Resources/app/src/atom.js:705:23) at Pane.module.exports.Pane.promptToSaveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:507:21) at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:456:18) at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:436:12) at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:697:35) at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:741:21) at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:292:30) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -0:30.4 core:select-all (atom-text-editor.editor.vim-mode.insert-mode.is-focused) -0:30.2 core:copy (atom-text-editor.editor.vim-mode.insert-mode.is-focused) -0:01.8 core:close (atom-text-editor.editor.vim-mode.insert-mode.is-focused)"><pre class="notranslate"><code class="notranslate"> -0:30.4 core:select-all (atom-text-editor.editor.vim-mode.insert-mode.is-focused) -0:30.2 core:copy (atom-text-editor.editor.vim-mode.insert-mode.is-focused) -0:01.8 core:close (atom-text-editor.editor.vim-mode.insert-mode.is-focused) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;atom-dark-syntax&quot; ] }, &quot;editor&quot;: { &quot;invisibles&quot;: {} } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-dark-syntax<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {} } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User autocomplete-plus, v2.4.2 vim-mode, v0.38.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">4</span>.<span class="pl-ii">2</span> vim<span class="pl-k">-</span>mode, v0.<span class="pl-ii">38</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>Right-click a file in the left column. (The file I used was green, not added to Git, and empty.)</li> <li>Click Delete.</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.186.0<br> <strong>System</strong>: Mac OS X 10.10.2<br> <strong>Thrown From</strong>: <a href="https://github.com/atom/tree-view">tree-view</a> package, v0.164.0</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: Cannot find module 'dialog'<br> Error: Cannot find module 'dialog'<br> at Function.Module._resolveFilename (module.js:351:15)<br> at Function.Module._load (module.js:293:25)<br> at Module.require (module.js:380:17)<br> at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79)<br> at EventEmitter.emit (events.js:119:17)<br> at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23)<br> at EventEmitter.emit (events.js:119:17)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At /Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77 Error: Cannot find module 'dialog' Error: Cannot find module 'dialog' at Function.Module._resolveFilename (module.js:351:15) at Function.Module._load (module.js:293:25) at Module.require (module.js:380:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79) at EventEmitter.emit (events.js:119:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23) at EventEmitter.emit (events.js:119:17) at metaToValue (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77:15) at Object.exports.require (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:157:34) at Atom.module.exports.Atom.confirm (/Applications/Atom.app/Contents/Resources/app/src/atom.js:705:23) at TreeView.module.exports.TreeView.removeSelectedEntries (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:895:19) at atom-workspace.disposables.add.atom.commands.add.tree-view:remove (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/main.js:84:39) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29) at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61) at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19) at jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:64:23) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:80:67)"><pre class="notranslate"><code class="notranslate">At /Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77 Error: Cannot find module 'dialog' Error: Cannot find module 'dialog' at Function.Module._resolveFilename (module.js:351:15) at Function.Module._load (module.js:293:25) at Module.require (module.js:380:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/lib/rpc-server.js:128:79) at EventEmitter.emit (events.js:119:17) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/atom/browser/api/lib/web-contents.js:99:23) at EventEmitter.emit (events.js:119:17) at metaToValue (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:77:15) at Object.exports.require (/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/remote.js:157:34) at Atom.module.exports.Atom.confirm (/Applications/Atom.app/Contents/Resources/app/src/atom.js:705:23) at TreeView.module.exports.TreeView.removeSelectedEntries (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:895:19) at atom-workspace.disposables.add.atom.commands.add.tree-view:remove (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/main.js:84:39) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29) at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61) at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19) at jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:64:23) at EventEmitter.&lt;anonymous&gt; (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:80:67) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 6x -4:21.1 core:move-up (atom-text-editor.editor) -4:19.1 core:move-left (atom-text-editor.editor) -4:15.5 core:save (atom-text-editor.editor) -2:19.6 core:backspace (atom-text-editor.editor) 3x -2:17.4 core:move-right (atom-text-editor.editor) 2x -2:07.9 editor:move-to-first-character-of-line (atom-text-editor.editor) -2:07.4 core:select-down (atom-text-editor.editor) -2:06.5 core:copy (atom-text-editor.editor) -2:04.1 core:move-up (atom-text-editor.editor) -2:03.9 core:move-down (atom-text-editor.editor) -2:03.7 core:select-down (atom-text-editor.editor) -2:03.4 core:copy (atom-text-editor.editor) 2x -2:00.7 editor:move-to-first-character-of-line (atom-text-editor.editor) 3x -2:00.3 core:select-down (atom-text-editor.editor) -1:59.8 core:paste (atom-text-editor.editor) 3x -1:58.7 core:save (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> 6x -4:21.1 core:move-up (atom-text-editor.editor) -4:19.1 core:move-left (atom-text-editor.editor) -4:15.5 core:save (atom-text-editor.editor) -2:19.6 core:backspace (atom-text-editor.editor) 3x -2:17.4 core:move-right (atom-text-editor.editor) 2x -2:07.9 editor:move-to-first-character-of-line (atom-text-editor.editor) -2:07.4 core:select-down (atom-text-editor.editor) -2:06.5 core:copy (atom-text-editor.editor) -2:04.1 core:move-up (atom-text-editor.editor) -2:03.9 core:move-down (atom-text-editor.editor) -2:03.7 core:select-down (atom-text-editor.editor) -2:03.4 core:copy (atom-text-editor.editor) 2x -2:00.7 editor:move-to-first-character-of-line (atom-text-editor.editor) 3x -2:00.3 core:select-down (atom-text-editor.editor) -1:59.8 core:paste (atom-text-editor.editor) 3x -1:58.7 core:save (atom-text-editor.editor) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;atom-dark-syntax&quot; ], &quot;destroyEmptyPanes&quot;: false }, &quot;tree-view&quot;: {} }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atom-dark-syntax<span class="pl-pds">"</span></span> ], <span class="pl-ent">"destroyEmptyPanes"</span>: <span class="pl-c1">false</span> }, <span class="pl-ent">"tree-view"</span>: {} }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User language-haml, v0.15.0 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> language<span class="pl-k">-</span>haml, v0.<span class="pl-ii">15</span>.<span class="pl-ii">0</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
1
<p dir="auto">Does anyone have any thoughts?</p> <p dir="auto">The application can be compiled to run on both Android and iOS simulator (and through an attached iPhone in debug mode) - functions as expected. The application has been uploaded to Google Play and functions appropriately. The crash occurs after you have gone through the validation process, released by iOS (the first time it made it through and was crashing and the second time it was rejected because they caught it). The interesting part about this is that its difficult to debug because it crashes only after uploaded, not when debugging locally.</p> <p dir="auto">Dependencies:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="url_launcher: ^3.0.0 shared_preferences: ^0.4.0 cloud_firestore: ^0.4.0"><pre class="notranslate"><span class="pl-ent">url_launcher</span>: <span class="pl-s">^3.0.0</span> <span class="pl-ent">shared_preferences</span>: <span class="pl-s">^0.4.0</span> <span class="pl-ent">cloud_firestore</span>: <span class="pl-s">^0.4.0</span></pre></div> <p dir="auto">There is a warning on iOS build that may be related to the crash but I would think this would cause a crash in development and not just when uploaded:</p> <p dir="auto">4.9.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add <code class="notranslate">[FIRApp configure];</code> (<code class="notranslate">FirebaseApp.configure()</code> in Swift) to your application initialization.</p> <h2 dir="auto">Logs</h2> <p dir="auto">When uploaded to iTunes the application crashes on load with the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;app_name&quot;:&quot;Runner&quot;,&quot;timestamp&quot;:&quot;2018-04-07 22:41:40.96 -0700&quot;,&quot;app_version&quot;:&quot;1.1&quot;,&quot;slice_uuid&quot;:&quot;&quot;,&quot;adam_id&quot;:0,&quot;build_version&quot;:&quot;2&quot;,&quot;bundleID&quot;:&quot;com..rc&quot;,&quot;share_with_app_devs&quot;:false,&quot;is_first_party&quot;:false,&quot;bug_type&quot;:&quot;109&quot;,&quot;os_version&quot;:&quot;iPhone OS 11.2.5 (15D60)&quot;,&quot;incident_id&quot;:&quot;&quot;,&quot;name&quot;:&quot;Runner&quot;} Incident Identifier: C7E34EB2-0AA8-4D95-BBF2-4E323782A535 CrashReporter Key: e7281b7b0d5ea708a1d85030a4736854635fe52e Hardware Model: iPhone9,3 Device Model: D101AP Process: Runner [4283] Path: /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Runner Identifier: com..rc Version: 2 (1.1) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd.development [1] Coalition: com..rc [817] Date/Time: 2018-04-07 22:41:40.8934 -0700 Launch Time: 2018-04-07 22:41:40.3694 -0700 OS Version: iPhone OS 11.2.5 (15D60) Baseband Version: 2.02.04_DEBUG UDID: d33d789e6dcbdf39cd323f95f8c5366344f52ba0 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Symbol not found: _OBJC_CLASS_$_FIRApp | Referenced from: /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Frameworks/cloud_firestore.framework/cloud_firestore | Expected in: flat namespace | in /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Frameworks/cloud_firestore.framework/cloud_firestore Triggered by Thread: 0"><pre lang="log" class="notranslate"><code class="notranslate">{"app_name":"Runner","timestamp":"2018-04-07 22:41:40.96 -0700","app_version":"1.1","slice_uuid":"","adam_id":0,"build_version":"2","bundleID":"com..rc","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 11.2.5 (15D60)","incident_id":"","name":"Runner"} Incident Identifier: C7E34EB2-0AA8-4D95-BBF2-4E323782A535 CrashReporter Key: e7281b7b0d5ea708a1d85030a4736854635fe52e Hardware Model: iPhone9,3 Device Model: D101AP Process: Runner [4283] Path: /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Runner Identifier: com..rc Version: 2 (1.1) Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd.development [1] Coalition: com..rc [817] Date/Time: 2018-04-07 22:41:40.8934 -0700 Launch Time: 2018-04-07 22:41:40.3694 -0700 OS Version: iPhone OS 11.2.5 (15D60) Baseband Version: 2.02.04_DEBUG UDID: d33d789e6dcbdf39cd323f95f8c5366344f52ba0 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Symbol not found: _OBJC_CLASS_$_FIRApp | Referenced from: /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Frameworks/cloud_firestore.framework/cloud_firestore | Expected in: flat namespace | in /private/var/containers/Bundle/Application/CEE81B18-1601-4704-8264-E6223725FE48/Runner.app/Frameworks/cloud_firestore.framework/cloud_firestore Triggered by Thread: 0 </code></pre></div> <p dir="auto">Filtered syslog:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Timestamp Thread Type Activity PID 2018-04-07 22:21:37.2989 -0700 0x868c 1024 0x0 102 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-04-07-222137.tailspin 2018-04-07 22:21:37.2991 -0700 0x868c 1024 0x0 102 hangtracerd: SpringBoard Log credits: 1 -&gt; 0 2018-04-07 22:21:37.2991 -0700 0x868c 1024 0x0 102 hangtracerd: Daily Log credits: 18 -&gt; 17 2018-04-07 22:25:48.7911 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:25:48.8725 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:26:00.0015 -0700 0x9d03 1024 0x0 102 hangtracerd: XPC: Client started new connection: pid 3340 2018-04-07 22:26:00.0023 -0700 0x9d03 1024 0x0 102 hangtracerd: New proc: /private/var/containers/Bundle/Application/AC3B2C52-942C-44FD-A7E1-AEDA81916A25/Halos.app/Halos(3340) 2018-04-07 22:26:00.0023 -0700 0x9d03 1024 0x0 102 hangtracerd: Initialization complete now watching hangs for Halos(3340) | UIKit-runloop 2018-04-07 22:26:42.9680 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:26:43.0596 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:27:02.8876 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:27:02.9051 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:27:11.0515 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:27:11.0719 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:28:17.4558 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard credits increased to: 1 2018-04-07 22:28:24.0847 -0700 0x9d03 1024 0x0 102 hangtracerd: Client disconnected: 3340 2018-04-07 22:30:06.9670 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Hang detected 0.61s (UIKit-runloop) 2018-04-07 22:30:06.9671 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-04-07-223006.tailspin 2018-04-07 22:30:07.0966 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-04-07-223006.tailspin 2018-04-07 22:30:07.0969 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard Log credits: 1 -&gt; 0 2018-04-07 22:30:07.0970 -0700 0x9d03 1024 0x0 102 hangtracerd: Daily Log credits: 17 -&gt; 16 2018-04-07 22:33:43.3368 -0700 0x9d03 1024 0x0 102 hangtracerd: XPC: Client started new connection: pid 3821 2018-04-07 22:33:43.3369 -0700 0x9d03 1024 0x0 102 hangtracerd: New proc: /private/var/containers/Bundle/Application/D9839EC2-CF0D-4A1C-B36B-759650A629FF/All of Us.app/All of Us(3821) 2018-04-07 22:33:43.3371 -0700 0x9d03 1024 0x0 102 hangtracerd: Initialization complete now watching hangs for All of Us(3821) | UIKit-runloop 2018-04-07 22:33:54.6262 -0700 0x9d03 1024 0x2661f 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:33:54.7030 -0700 0x9d03 1024 0x2661f 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:36:13.0167 -0700 0xdaa 1024 0x0 102 hangtracerd: Client disconnected: 3821 2018-04-07 22:37:27.8166 -0700 0xdaa 1024 0x0 102 hangtracerd: SpringBoard: Hang detected 0.73s (UIKit-runloop) Thread 0 Crashed: 0 dyld 0x00000001035daf48 __abort_with_payload + 8 1 dyld 0x00000001035da71c abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:71) 2 dyld 0x00000001035da748 abort_with_payload + 12 (terminate_with_reason.c:93) 3 dyld 0x00000001035b0498 dyld::halt(char const*) + 312 (dyld.cpp:3824) 4 dyld 0x00000001035b3714 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 7376 (dyld.cpp:6202) 5 dyld 0x00000001035ad21c _dyld_start + 68 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016ce26350 x3: 0x00000000000000c8 x4: 0x000000016ce25f50 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x77656d6172662e65 x11: 0x756f6c632f6b726f x12: 0x72662e65726f7473 x13: 0x2f6b726f77656d61 x14: 0x69665f64756f6c63 x15: 0x0065726f74736572 x16: 0x0000000000000209 x17: 0x0000000000000080 x18: 0xfffffff017751260 x19: 0x0000000000000000 x20: 0x000000016ce25f50 x21: 0x00000000000000c8 x22: 0x000000016ce26350 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x0000000102fd8000 x26: 0x00000001035ee000 x27: 0x00000001035edf88 x28: 0x000000016ce27950 fp: 0x000000016ce25f20 lr: 0x00000001035da71c sp: 0x000000016ce25ee0 pc: 0x00000001035daf48 cpsr: 0x00000000"><pre lang="log" class="notranslate"><code class="notranslate">Timestamp Thread Type Activity PID 2018-04-07 22:21:37.2989 -0700 0x868c 1024 0x0 102 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-04-07-222137.tailspin 2018-04-07 22:21:37.2991 -0700 0x868c 1024 0x0 102 hangtracerd: SpringBoard Log credits: 1 -&gt; 0 2018-04-07 22:21:37.2991 -0700 0x868c 1024 0x0 102 hangtracerd: Daily Log credits: 18 -&gt; 17 2018-04-07 22:25:48.7911 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:25:48.8725 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:26:00.0015 -0700 0x9d03 1024 0x0 102 hangtracerd: XPC: Client started new connection: pid 3340 2018-04-07 22:26:00.0023 -0700 0x9d03 1024 0x0 102 hangtracerd: New proc: /private/var/containers/Bundle/Application/AC3B2C52-942C-44FD-A7E1-AEDA81916A25/Halos.app/Halos(3340) 2018-04-07 22:26:00.0023 -0700 0x9d03 1024 0x0 102 hangtracerd: Initialization complete now watching hangs for Halos(3340) | UIKit-runloop 2018-04-07 22:26:42.9680 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:26:43.0596 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:27:02.8876 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:27:02.9051 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:27:11.0515 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:27:11.0719 -0700 0x9d03 1024 0x0 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:28:17.4558 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard credits increased to: 1 2018-04-07 22:28:24.0847 -0700 0x9d03 1024 0x0 102 hangtracerd: Client disconnected: 3340 2018-04-07 22:30:06.9670 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Hang detected 0.61s (UIKit-runloop) 2018-04-07 22:30:06.9671 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-04-07-223006.tailspin 2018-04-07 22:30:07.0966 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-04-07-223006.tailspin 2018-04-07 22:30:07.0969 -0700 0x9d03 1024 0x0 102 hangtracerd: SpringBoard Log credits: 1 -&gt; 0 2018-04-07 22:30:07.0970 -0700 0x9d03 1024 0x0 102 hangtracerd: Daily Log credits: 17 -&gt; 16 2018-04-07 22:33:43.3368 -0700 0x9d03 1024 0x0 102 hangtracerd: XPC: Client started new connection: pid 3821 2018-04-07 22:33:43.3369 -0700 0x9d03 1024 0x0 102 hangtracerd: New proc: /private/var/containers/Bundle/Application/D9839EC2-CF0D-4A1C-B36B-759650A629FF/All of Us.app/All of Us(3821) 2018-04-07 22:33:43.3371 -0700 0x9d03 1024 0x0 102 hangtracerd: Initialization complete now watching hangs for All of Us(3821) | UIKit-runloop 2018-04-07 22:33:54.6262 -0700 0x9d03 1024 0x2661f 102 hangtracerd: HTFenceTracking: Fence begin 2018-04-07 22:33:54.7030 -0700 0x9d03 1024 0x2661f 102 hangtracerd: HTFenceTracking: Fence end 2018-04-07 22:36:13.0167 -0700 0xdaa 1024 0x0 102 hangtracerd: Client disconnected: 3821 2018-04-07 22:37:27.8166 -0700 0xdaa 1024 0x0 102 hangtracerd: SpringBoard: Hang detected 0.73s (UIKit-runloop) Thread 0 Crashed: 0 dyld 0x00000001035daf48 __abort_with_payload + 8 1 dyld 0x00000001035da71c abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:71) 2 dyld 0x00000001035da748 abort_with_payload + 12 (terminate_with_reason.c:93) 3 dyld 0x00000001035b0498 dyld::halt(char const*) + 312 (dyld.cpp:3824) 4 dyld 0x00000001035b3714 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 7376 (dyld.cpp:6202) 5 dyld 0x00000001035ad21c _dyld_start + 68 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000004 x2: 0x000000016ce26350 x3: 0x00000000000000c8 x4: 0x000000016ce25f50 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x77656d6172662e65 x11: 0x756f6c632f6b726f x12: 0x72662e65726f7473 x13: 0x2f6b726f77656d61 x14: 0x69665f64756f6c63 x15: 0x0065726f74736572 x16: 0x0000000000000209 x17: 0x0000000000000080 x18: 0xfffffff017751260 x19: 0x0000000000000000 x20: 0x000000016ce25f50 x21: 0x00000000000000c8 x22: 0x000000016ce26350 x23: 0x0000000000000004 x24: 0x0000000000000006 x25: 0x0000000102fd8000 x26: 0x00000001035ee000 x27: 0x00000001035edf88 x28: 0x000000016ce27950 fp: 0x000000016ce25f20 lr: 0x00000001035da71c sp: 0x000000016ce25ee0 pc: 0x00000001035daf48 cpsr: 0x00000000 </code></pre></div> <h2 dir="auto">Flutter Doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel dev, v0.2.9, on Mac OS X 10.13.4 17E199, locale en-US) • Flutter version 0.2.9 at /Users/wkethman/flutter • Framework revision 487e6bc91e (5 days ago), 2018-04-03 10:59:12 -0700 • Engine revision 04f3c6557c • Dart version 2.0.0-dev.43.0.flutter-52afcba357 [!] Android toolchain - develop for Android devices (Android SDK 26.0.2) • Android SDK at /Users/wkethman/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 26.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) ✗ Android license status unknown. [✓] iOS toolchain - develop for iOS devices (Xcode 9.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.3, Build version 9E145 • ios-deploy 1.9.2 • CocoaPods version 1.4.0 [✓] Android Studio (version 3.1) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) [✓] Connected devices (1 available) • iPhone 6 • 9A7CCBF4-AF4B-415E-BB7E-9E8FAE3FBD78 • ios • iOS 11.3 (simulator)"><pre lang="terminal" class="notranslate"><code class="notranslate">[✓] Flutter (Channel dev, v0.2.9, on Mac OS X 10.13.4 17E199, locale en-US) • Flutter version 0.2.9 at /Users/wkethman/flutter • Framework revision 487e6bc91e (5 days ago), 2018-04-03 10:59:12 -0700 • Engine revision 04f3c6557c • Dart version 2.0.0-dev.43.0.flutter-52afcba357 [!] Android toolchain - develop for Android devices (Android SDK 26.0.2) • Android SDK at /Users/wkethman/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 26.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) ✗ Android license status unknown. [✓] iOS toolchain - develop for iOS devices (Xcode 9.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.3, Build version 9E145 • ios-deploy 1.9.2 • CocoaPods version 1.4.0 [✓] Android Studio (version 3.1) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) [✓] Connected devices (1 available) • iPhone 6 • 9A7CCBF4-AF4B-415E-BB7E-9E8FAE3FBD78 • ios • iOS 11.3 (simulator) </code></pre></div>
<p dir="auto">The method updatePassword(to:..) is missing from the FirebaseAuth.currentUser().</p> <p dir="auto">This means we can not update a authenticated user's password in app. We have have to send a password reset email instead which means the user has to leave the app.<br> This exists on the<a href="https://firebase.google.com/docs/auth/web/manage-users#set_a_users_password" rel="nofollow"> iOS, Android and Web SDK documentation</a></p> <p dir="auto">I am using firebase_auth: "^0.5.5". This affects both iOS and Android</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.8</li> <li>Operating System version: linux</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">服务端经常会报错<br> cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer<br> 服务重器后会好一段时间,时间长了以后就会再次出现</p> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <p dir="auto">What do you expected from the above steps?</p> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="with root cause org.apache.dubbo.remoting.RemotingException: Failed to send response: Response [id=450, version=2.0.2, status=20, event=false, error=null, result=AppResponse [value=null, exception=java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy]], cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:375) at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:411) at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:98) at org.apache.dubbo.common.serialize.ObjectOutput.writeThrowable(ObjectOutput.java:49) at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:207) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:283) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71) at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40) at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:69) at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:302) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) at org.apache.dubbo.remoting.transport.netty4.NettyServerHandler.write(NettyServerHandler.java:104) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748)"><pre class="notranslate"><code class="notranslate">with root cause org.apache.dubbo.remoting.RemotingException: Failed to send response: Response [id=450, version=2.0.2, status=20, event=false, error=null, result=AppResponse [value=null, exception=java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy]], cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/ThrowableSerializer at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:375) at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:411) at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:98) at org.apache.dubbo.common.serialize.ObjectOutput.writeThrowable(ObjectOutput.java:49) at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:207) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:283) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71) at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40) at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:69) at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:302) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) at org.apache.dubbo.remoting.transport.netty4.NettyServerHandler.write(NettyServerHandler.java:104) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4.1</li> <li>Operating System version: windows</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>创建一个dubbo demo项目,提供一个方法,该方法抛出一个自定义的异常例如MyBizException</li> <li>引入http协议,启动项目</li> <li>使用postman之类的工具调用这个方法,它的返回结果如下:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:&quot;1&quot;,&quot;error&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;参数不能为空&quot;,&quot;data&quot;:{&quot;exceptionTypeName&quot;:&quot;com.demo.exception.MyBizException&quot;,&quot;message&quot;:&quot;参数不能为空&quot;}}}"><pre class="notranslate"><code class="notranslate">{"jsonrpc":"2.0","id":"1","error":{"code":0,"message":"参数不能为空","data":{"exceptionTypeName":"com.demo.exception.MyBizException","message":"参数不能为空"}}} </code></pre></div> <p dir="auto">它的error.code错误码一直是0,没法自己指定</p> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <p dir="auto">希望有地方可以指定自己的错误码</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">error.code一直是0</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">no_log</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">2.3</p> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Centos</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Hello, we are using no_log and mysql module and both items are showing passwords in clear text.</p> <p dir="auto">Example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [mysql_users : Grant all privileges to all schemas for REDACTED] ********** 14:04:28 Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/database/mysql/mysql_user.py� &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: REDACTED &lt;127.0.0.1&gt; EXEC /bin/sh -c 'AWS_ACCESS_KEY_ID=REDACTED AWS_SECRET_ACCESS_KEY=REDACTED /usr/bin/python2 &amp;&amp; sleep 0'"><pre class="notranslate"><code class="notranslate">TASK [mysql_users : Grant all privileges to all schemas for REDACTED] ********** 14:04:28 Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/database/mysql/mysql_user.py� &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: REDACTED &lt;127.0.0.1&gt; EXEC /bin/sh -c 'AWS_ACCESS_KEY_ID=REDACTED AWS_SECRET_ACCESS_KEY=REDACTED /usr/bin/python2 &amp;&amp; sleep 0' </code></pre></div> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Tasks with mysql module or shell module with no_log: true are showing passwords</p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">when using mysql module or shell with no_log: true all passwords or logs should be hidden.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">no_log</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">Using Ansible Tower</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ubuntu 14.04.4</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">I want to run some commands using the AWS CLI (in my particular case, creating new access keys for a user and encrypting them). I am storing the AWS Access Keys Ansible will use to use the CLI in a Vault file and including them, then passing them to environment variables:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" - name: &quot;Create a new access key for IAM User {{user}}&quot; shell: cmd: &quot;aws iam create-access-key --user-name {{user}}&quot; environment: AWS_ACCESS_KEY_ID: &quot;{{AUTH_AWS_ACCESS_KEY_ID}}&quot; AWS_SECRET_ACCESS_KEY: &quot;{{AUTH_AWS_SECRET_ACCESS_KEY}}&quot; register: access_key_output no_log: true - name: Parse the output to JSON set_fact: access_key: &quot;{{access_key_output.stdout|from_json}}&quot; no_log: true - name: Extract access key ID and secret set_fact: aws_access_key_id: &quot;{{access_key.AccessKey.AccessKeyId}}&quot; aws_secret_access_key: &quot;{{access_key.AccessKey.SecretAccessKey}}&quot; no_log: true # Now we go on to save the newly-set variables into a template and encrypt it"><pre class="notranslate"><code class="notranslate"> - name: "Create a new access key for IAM User {{user}}" shell: cmd: "aws iam create-access-key --user-name {{user}}" environment: AWS_ACCESS_KEY_ID: "{{AUTH_AWS_ACCESS_KEY_ID}}" AWS_SECRET_ACCESS_KEY: "{{AUTH_AWS_SECRET_ACCESS_KEY}}" register: access_key_output no_log: true - name: Parse the output to JSON set_fact: access_key: "{{access_key_output.stdout|from_json}}" no_log: true - name: Extract access key ID and secret set_fact: aws_access_key_id: "{{access_key.AccessKey.AccessKeyId}}" aws_secret_access_key: "{{access_key.AccessKey.SecretAccessKey}}" no_log: true # Now we go on to save the newly-set variables into a template and encrypt it </code></pre></div> <p dir="auto">I can apply <code class="notranslate">no_log: true</code> to the tasks where there is sensitive output, to hide the values. But there is no mechanism to prevent the values of environment variables being output in verbose logs (see the XXXs on the penultimate line):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [common : Create a new access key for IAM User bob] ***** task path: /path/to/playbook/roles/common/tasks/main.yml:90 &lt;10.0.1.143&gt; ESTABLISH SSH CONNECTION FOR USER: ansible &lt;10.0.1.143&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r 10.0.1.143 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214 `&quot; &amp;&amp; echo ansible-tmp-1475680443.15-122804029783214=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' &lt;10.0.1.143&gt; PUT /tmp/tmpkLWcKJ TO /home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/command &lt;10.0.1.143&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r '[10.0.1.143]' &lt;10.0.1.143&gt; ESTABLISH SSH CONNECTION FOR USER: ansible &lt;10.0.1.143&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r -tt 10.0.1.143 '/bin/sh -c '&quot;'&quot;'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/command; rm -rf &quot;/home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;'' changed: [10.0.1.143] =&gt; {&quot;censored&quot;: &quot;the output has been hidden due to the fact that 'no_log: true' was specified for this result&quot;}"><pre class="notranslate"><code class="notranslate">TASK [common : Create a new access key for IAM User bob] ***** task path: /path/to/playbook/roles/common/tasks/main.yml:90 &lt;10.0.1.143&gt; ESTABLISH SSH CONNECTION FOR USER: ansible &lt;10.0.1.143&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r 10.0.1.143 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214 `" &amp;&amp; echo ansible-tmp-1475680443.15-122804029783214="` echo $HOME/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214 `" ) &amp;&amp; sleep 0'"'"'' &lt;10.0.1.143&gt; PUT /tmp/tmpkLWcKJ TO /home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/command &lt;10.0.1.143&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r '[10.0.1.143]' &lt;10.0.1.143&gt; ESTABLISH SSH CONNECTION FOR USER: ansible &lt;10.0.1.143&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 -o ControlPath=/tmp/ansible_tower_H6lYAD/cp/ansible-ssh-%h-%p-%r -tt 10.0.1.143 '/bin/sh -c '"'"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/command; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1475680443.15-122804029783214/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"'' changed: [10.0.1.143] =&gt; {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"} </code></pre></div> <p dir="auto">Which means that the <em>really</em> sensitive data is still output.</p> <p dir="auto">There are ways I can circumvent this, by exporting the environment variables in the command, or by using an Ansible module (where the functionality is supported). But this issue is not specific to AWS CLI, it applies whenever you have sensitive data in environment variables.</p> <p dir="auto">I believe that setting <code class="notranslate">no_log: true</code> should suppress the output of all verbose logs as well as the 'standard' output. If you're working in verbose mode, you are already debugging/working on a script, so temporarily commenting out the <code class="notranslate">no_log</code> directives should be simple enough.</p> <p dir="auto">Alternatively, am I missing an existing feature?</p>
1
<p dir="auto">The icons from material-ui-icon have no TS typings, so there's no way to import them without getting a (Could not find a declaration module for module FOOBAR) warning.<br> The only workaround is to use an old const AddIcon = require('material-ui-icons/Add').default;</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Icons from the package should have a typing so TS doesn't generate a warning when importing them.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Importing them generates a TS warning, having to resort to require</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><code class="notranslate">import AddIcon from 'material-ui-icons/Add';</code></p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0-beta9</td> </tr> <tr> <td>React</td> <td>15</td> </tr> <tr> <td>browser</td> <td>Chrome 61</td> </tr> <tr> <td>TS</td> <td>2.5.2 on strict mode</td> </tr> </tbody> </table>
<p dir="auto">I am trying to change the default color for the palette for example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { red, grey } from 'material-ui/colors' const theme = createMyTheme({ palette: { primary: red['300'], secondary: grey, }, status: { danger: 'orange', }, });"><pre class="notranslate"><code class="notranslate">import { red, grey } from 'material-ui/colors' const theme = createMyTheme({ palette: { primary: red['300'], secondary: grey, }, status: { danger: 'orange', }, }); </code></pre></div> <p dir="auto">notice the <code class="notranslate">red['300']</code></p> <p dir="auto">I also get a warning on the console for this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Material-UI: primary color is missing the following hues: 50,100,200,300,400,500,600,700,800,900,A100,A200,A400,A700,contrastDefaultColor [1] See the default colors, indigo, or pink, as exported from material-ui/colors."><pre class="notranslate"><code class="notranslate">Warning: Material-UI: primary color is missing the following hues: 50,100,200,300,400,500,600,700,800,900,A100,A200,A400,A700,contrastDefaultColor [1] See the default colors, indigo, or pink, as exported from material-ui/colors. </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.<br> I see that in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="240365404" data-permission-text="Title is private" data-url="https://github.com/mui/material-ui/issues/7332" data-hovercard-type="issue" data-hovercard-url="/mui/material-ui/issues/7332/hovercard" href="https://github.com/mui/material-ui/issues/7332">#7332</a> the <code class="notranslate">palette</code> a collection of <code class="notranslate">hue</code> but if I do the following:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const theme = createMyTheme({ primary: red['100'], palette: { secondary: grey, }, status: { danger: 'orange', }, });"><pre class="notranslate"><code class="notranslate">const theme = createMyTheme({ primary: red['100'], palette: { secondary: grey, }, status: { danger: 'orange', }, }); </code></pre></div> <p dir="auto">The color defaults to original theme color.</p> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I expect it to change the color to the different hue</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">when I have it like <code class="notranslate">red['400']</code> or <code class="notranslate">red[400]</code> I get <code class="notranslate">color is undefined</code></p> <p dir="auto">When I leave it as <code class="notranslate">red</code> it works perfect.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Using <a href="https://github.com/zeit/next.js/">zeit's nextjs</a> with typescript</li> <li>Install material ui following the <a href="https://material-ui-next.com/guides/typescript/#customization-of-theme" rel="nofollow">typescript tutorial</a></li> <li>Try adding <code class="notranslate">primary: red['300']</code> to your color palette</li> <li>??</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">I see that in <a href="https://material-ui-next.com/customization/themes/#the-other-variables" rel="nofollow">theme variables guide</a> you could add:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;primary&quot;: { &quot;50&quot;: &quot;#e3f2fd&quot;, &quot;100&quot;: &quot;#bbdefb&quot;, &quot;200&quot;: &quot;#90caf9&quot;, &quot;300&quot;: &quot;#64b5f6&quot;, &quot;400&quot;: &quot;#42a5f5&quot;, &quot;500&quot;: &quot;#2196f3&quot;, &quot;600&quot;: &quot;#1e88e5&quot;, &quot;700&quot;: &quot;#1976d2&quot;, &quot;800&quot;: &quot;#1565c0&quot;, &quot;900&quot;: &quot;#0d47a1&quot;, &quot;A100&quot;: &quot;#82b1ff&quot;, &quot;A200&quot;: &quot;#448aff&quot;, &quot;A400&quot;: &quot;#2979ff&quot;, &quot;A700&quot;: &quot;#2962ff&quot;, &quot;contrastDefaultColor&quot;: &quot;light&quot; }"><pre class="notranslate"><code class="notranslate"> "primary": { "50": "#e3f2fd", "100": "#bbdefb", "200": "#90caf9", "300": "#64b5f6", "400": "#42a5f5", "500": "#2196f3", "600": "#1e88e5", "700": "#1976d2", "800": "#1565c0", "900": "#0d47a1", "A100": "#82b1ff", "A200": "#448aff", "A400": "#2979ff", "A700": "#2962ff", "contrastDefaultColor": "light" } </code></pre></div> <p dir="auto">And it works, is there a tool to create such variables by selecting, for example, the <code class="notranslate">red</code> color?</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>1.0.0-beta.24</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> <tr> <td>browser</td> <td>firefox, chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">Maybe something like this?</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __extends = (this &amp;&amp; this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) Object.defineProperty(d, p, Object.getOwnPropertyDescriptor(b, p)); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); };"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__extends</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-smi">this</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">__extends</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-k">in</span> <span class="pl-s1">b</span><span class="pl-kos">)</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-en">hasOwnProperty</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">d</span><span class="pl-kos">,</span> <span class="pl-s1">p</span><span class="pl-kos">,</span> <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">getOwnPropertyDescriptor</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">,</span> <span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-c1">__</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">constructor</span> <span class="pl-c1">=</span> <span class="pl-s1">d</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">d</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span> <span class="pl-c1">===</span> <span class="pl-c1">null</span> ? <span class="pl-smi">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-s1">b</span><span class="pl-kos">)</span> : <span class="pl-kos">(</span><span class="pl-c1">__</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-s1">b</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-c1">__</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Or is there a better polyfill around the corner?</p>
<p dir="auto">The following code:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var i = 0, j = 0; class Base { get instanceAccessor() { return ++i; } static get staticAccessor() { return ++j; } toString = () =&gt; 'instance: ' + this.instanceAccessor + ' static: ' + Base.staticAccessor; } class Derived extends Base { toString = () =&gt; 'instance: ' + this.instanceAccessor + ' static: ' + Derived.staticAccessor; } console.log('Base:\n%s\n%s\n%s', new Base(), new Base(), new Base()); console.log('Derived:\n%s\n%s\n%s', new Derived(), new Derived(), new Derived());"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">j</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-k">get</span> <span class="pl-en">instanceAccessor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">++</span><span class="pl-s1">i</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">static</span> <span class="pl-k">get</span> <span class="pl-en">staticAccessor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">++</span><span class="pl-s1">j</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c1">toString</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'instance: '</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">instanceAccessor</span> <span class="pl-c1">+</span> <span class="pl-s">' static: '</span> <span class="pl-c1">+</span> <span class="pl-smi">Base</span><span class="pl-kos">.</span><span class="pl-c1">staticAccessor</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Derived</span> <span class="pl-k">extends</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span> <span class="pl-c1">toString</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'instance: '</span> <span class="pl-c1">+</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">instanceAccessor</span> <span class="pl-c1">+</span> <span class="pl-s">' static: '</span> <span class="pl-c1">+</span> <span class="pl-smi">Derived</span><span class="pl-kos">.</span><span class="pl-c1">staticAccessor</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'Base:\n%s\n%s\n%s'</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Base</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Base</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Base</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'Derived:\n%s\n%s\n%s'</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Derived</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Derived</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-smi">Derived</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">generates the following output (with the v1.3 compiler):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Base: instance: 1 static: 2 instance: 2 static: 3 instance: 3 static: 4 Derived: instance: 4 static: 1 instance: 5 static: 1 instance: 6 static: 1"><pre class="notranslate"><code class="notranslate">Base: instance: 1 static: 2 instance: 2 static: 3 instance: 3 static: 4 Derived: instance: 4 static: 1 instance: 5 static: 1 instance: 6 static: 1 </code></pre></div> <p dir="auto">Clearly <code class="notranslate">Derived.staticAccessor</code> is no longer an accessor, but a 'snapshot' of the value of <code class="notranslate">Base.staticAccessor</code> when the <code class="notranslate">Derived</code> constructor function called <code class="notranslate">__extends</code>.</p> <p dir="auto">Just wondering if this is the expected/correct behaviour?</p> <p dir="auto">PS. I haven't run into this problem 'in the wild' as I rarely use classes or accessors, but merely came across a <a href="http://toshokelectric.com/blog/2013/04/04/why-im-ditching-coffeescript/" rel="nofollow">rant/blog post</a> about another compile-to-JS language doing something similar, and was curious how TypeScript handled it.</p>
1
<p dir="auto">MSRA's deformable Convolution Net needed~<br> i found that it had been implement in pytorch at :<a href="https://github.com/oeway/pytorch-deform-conv">https://github.com/oeway/pytorch-deform-conv</a><br> is there any possiblity add this module into core of pytorch?</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature</h2> <p dir="auto">Exactly as introduced in Microsoft paper : <a href="https://arxiv.org/pdf/1703.06211.pdf" rel="nofollow">https://arxiv.org/pdf/1703.06211.pdf</a></p> <h2 dir="auto">Motivation</h2> <p dir="auto">This operator has great advantages and abilities, and his popularity is increasing.</p> <p dir="auto">I don't think that any further explanation is needed.</p> <p dir="auto">BTW, other frameworks already have this operator, and I'm not talking about private people githubs..</p>
1
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x] bug report [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ x] bug report [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto">I am upgrading from beta.17<br> When using http.get I can give options to access auth-restricted area of my website.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let headers = new Headers({ 'Content-Type': 'application/json', 'Authorization': 'Basic *password*=' }); let options = new RequestOptions({ headers: headers }); return this.http .get(this.callback, options) .map(this.extractData);"><pre class="notranslate"><code class="notranslate">let headers = new Headers({ 'Content-Type': 'application/json', 'Authorization': 'Basic *password*=' }); let options = new RequestOptions({ headers: headers }); return this.http .get(this.callback, options) .map(this.extractData); </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <blockquote> <p dir="auto">Uncaught EXCEPTION: Error in backoffice/funeral-events/event-death.component.html:30:9<br> ORIGINAL EXCEPTION: TypeError: Cannot read property 'toString' of null<br> ORIGINAL STACKTRACE:<br> TypeError: Cannot read property 'toString' of null<br> at Request.Body.text (<a href="http://admin.localhost:4000/@angular/http/http.umd.js:1138:30" rel="nofollow">http://admin.localhost:4000/@angular/http/http.umd.js:1138:30</a>)<br> at Request.getBody (<a href="http://admin.localhost:4000/@angular/http/http.umd.js:1720:33" rel="nofollow">http://admin.localhost:4000/@angular/http/http.umd.js:1720:33</a>)<br> at Observable.eval <a href="http://admin.localhost:4000/@angular/http/http.umd.js:1419:41" rel="nofollow">as _subscribe</a><br> at Observable.subscribe (<a href="http://admin.localhost:4000/rxjs/Observable.js:52:62" rel="nofollow">http://admin.localhost:4000/rxjs/Observable.js:52:62</a>)<br> at Observable._subscribe (<a href="http://admin.localhost:4000/rxjs/Observable.js:109:28" rel="nofollow">http://admin.localhost:4000/rxjs/Observable.js:109:28</a>)<br> at MapOperator.call (<a href="http://admin.localhost:4000/rxjs/operator/map.js:54:23" rel="nofollow">http://admin.localhost:4000/rxjs/operator/map.js:54:23</a>)<br> at Observable.subscribe (<a href="http://admin.localhost:4000/rxjs/Observable.js:52:38" rel="nofollow">http://admin.localhost:4000/rxjs/Observable.js:52:38</a>)<br> at HospitalsComponent.getHospitals (<a href="http://admin.localhost:4000/js/advitam-bo.js:1592:26" rel="nofollow">http://admin.localhost:4000/js/advitam-bo.js:1592:26</a>)<br> at HospitalsComponent.ngOnInit (<a href="http://admin.localhost:4000/js/advitam-bo.js:1584:26" rel="nofollow">http://admin.localhost:4000/js/advitam-bo.js:1584:26</a>)<br> at DebugAppView._View_EventDeathComponent1.detectChangesInternal (EventDeathComponent.ngfactory.js:535:87)<br> ERROR CONTEXT:<br> [object Object]</p> </blockquote> <p dir="auto"><strong>Expected/desired behavior</strong></p> <p dir="auto">I should get an observable I can call subscribe on, and no exception like this one. I had a really hard time to understand why this code failed when upgrading.</p> <p dir="auto">What is strange is that when I remove</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" 'Content-Type': 'application/json',"><pre class="notranslate"><code class="notranslate"> 'Content-Type': 'application/json', </code></pre></div> <p dir="auto">the call is made and I can extract my data.<br> So for now I just remove the <code class="notranslate">application/json</code> part. But I think it's a bug so I report it</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.5</li> <li><strong>Browser:</strong> [all | Chrome ]</li> <li><strong>Language:</strong> [ TypeScript last]</li> </ul>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;a routerLink=&quot;/team&quot; routerLinkActive #rla=&quot;routerLinkActive&quot;&gt;&lt;/a&gt; &lt;p *ngIf=&quot;rla.isActive&quot;&gt;{{rla.isActive}}&lt;/p&gt; &lt;router-outlet&gt;&lt;/router-outlet&gt;"><pre class="notranslate"><code class="notranslate"> &lt;a routerLink="/team" routerLinkActive #rla="routerLinkActive"&gt;&lt;/a&gt; &lt;p *ngIf="rla.isActive"&gt;{{rla.isActive}}&lt;/p&gt; &lt;router-outlet&gt;&lt;/router-outlet&gt; </code></pre></div> <p dir="auto">Throws an exception because the QueryList isn't set when the isActive method is checked <a href="https://github.com/angular/angular/blob/c9f58cf78cce420762c7f8c51172a10a497468ea/modules/%40angular/router/src/directives/router_link_active.ts#L140">here</a>.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Should be able to bind to isActive property</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto">Refer to above code snippet<br> <strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.3.0</li> </ul> <ul dir="auto"> <li><strong>Browser:</strong> [all]</li> </ul> <ul dir="auto"> <li><strong>Language:</strong> [all]</li> </ul>
0
<h3 dir="auto">Description</h3> <p dir="auto">Building a kd-Tree can be done in O(n(k+log(n)) time and should (to my knowledge) not depent on the details of the data. However, the KDTree implementation in scikit-learn shows a really poor scaling behavior for my data. I cannot produce this behavior with data generated by sklearn.datasets.samples_generator.make_blobs</p> <h3 dir="auto">Steps/Code to Reproduce</h3> <p dir="auto">download numpy data (search.npy) from <a href="https://webshare.mpie.de/index.php?6b4495f7e7" rel="nofollow">https://webshare.mpie.de/index.php?6b4495f7e7</a> and run the following code on python 3</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np from sklearn.neighbors import NearestNeighbors from sklearn.datasets.samples_generator import make_blobs from scipy.spatial import KDTree as KDTree_Scipy from sklearn.neighbors import KDTree as KDTree_Sklearn from time import sleep, perf_counter as pc search_raw_artificial, dev_null = make_blobs(n_samples=6830160,n_features=5,centers=1000,cluster_std=0.4,random_state=0) search_raw_real = np.load('search.npy') N = [240000,2400000,4800000,6000000] for search_raw in [search_raw_artificial,search_raw_real]: for i,n in enumerate(N): search = search_raw[0:n,:] print('data shape',search.shape) print('delta',np.amax(search,0)-np.amin(search,0)) t0 = pc() neigh = NearestNeighbors(algorithm='ball_tree').fit(search) print('sklearn.neighbors (ball_tree) build finished in {}s'.format(pc()-t0)) t0 = pc() neigh = NearestNeighbors(algorithm='kd_tree').fit(search) print(' sklearn.neighbors (kd_tree) build finished in {}s'.format(pc()-t0)) t0 = pc() neigh = KDTree_Sklearn(search) print(' sklearn.neighbors KD tree build finished in {}s'.format(pc()-t0)) t0 = pc() neigh = KDTree_Scipy(search) print(' scipy.spatial KD tree build finished in {}s'.format(pc()-t0)) print('')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">neighbors</span> <span class="pl-k">import</span> <span class="pl-v">NearestNeighbors</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">datasets</span>.<span class="pl-s1">samples_generator</span> <span class="pl-k">import</span> <span class="pl-s1">make_blobs</span> <span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">spatial</span> <span class="pl-k">import</span> <span class="pl-v">KDTree</span> <span class="pl-k">as</span> <span class="pl-v">KDTree_Scipy</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">neighbors</span> <span class="pl-k">import</span> <span class="pl-v">KDTree</span> <span class="pl-k">as</span> <span class="pl-v">KDTree_Sklearn</span> <span class="pl-k">from</span> <span class="pl-s1">time</span> <span class="pl-k">import</span> <span class="pl-s1">sleep</span>, <span class="pl-s1">perf_counter</span> <span class="pl-k">as</span> <span class="pl-s1">pc</span> <span class="pl-s1">search_raw_artificial</span>, <span class="pl-s1">dev_null</span> <span class="pl-c1">=</span> <span class="pl-en">make_blobs</span>(<span class="pl-s1">n_samples</span><span class="pl-c1">=</span><span class="pl-c1">6830160</span>,<span class="pl-s1">n_features</span><span class="pl-c1">=</span><span class="pl-c1">5</span>,<span class="pl-s1">centers</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>,<span class="pl-s1">cluster_std</span><span class="pl-c1">=</span><span class="pl-c1">0.4</span>,<span class="pl-s1">random_state</span><span class="pl-c1">=</span><span class="pl-c1">0</span>) <span class="pl-s1">search_raw_real</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">load</span>(<span class="pl-s">'search.npy'</span>) <span class="pl-v">N</span> <span class="pl-c1">=</span> [<span class="pl-c1">240000</span>,<span class="pl-c1">2400000</span>,<span class="pl-c1">4800000</span>,<span class="pl-c1">6000000</span>] <span class="pl-k">for</span> <span class="pl-s1">search_raw</span> <span class="pl-c1">in</span> [<span class="pl-s1">search_raw_artificial</span>,<span class="pl-s1">search_raw_real</span>]: <span class="pl-k">for</span> <span class="pl-s1">i</span>,<span class="pl-s1">n</span> <span class="pl-c1">in</span> <span class="pl-en">enumerate</span>(<span class="pl-v">N</span>): <span class="pl-s1">search</span> <span class="pl-c1">=</span> <span class="pl-s1">search_raw</span>[<span class="pl-c1">0</span>:<span class="pl-s1">n</span>,:] <span class="pl-en">print</span>(<span class="pl-s">'data shape'</span>,<span class="pl-s1">search</span>.<span class="pl-s1">shape</span>) <span class="pl-en">print</span>(<span class="pl-s">'delta'</span>,<span class="pl-s1">np</span>.<span class="pl-en">amax</span>(<span class="pl-s1">search</span>,<span class="pl-c1">0</span>)<span class="pl-c1">-</span><span class="pl-s1">np</span>.<span class="pl-en">amin</span>(<span class="pl-s1">search</span>,<span class="pl-c1">0</span>)) <span class="pl-s1">t0</span> <span class="pl-c1">=</span> <span class="pl-en">pc</span>() <span class="pl-s1">neigh</span> <span class="pl-c1">=</span> <span class="pl-v">NearestNeighbors</span>(<span class="pl-s1">algorithm</span><span class="pl-c1">=</span><span class="pl-s">'ball_tree'</span>).<span class="pl-en">fit</span>(<span class="pl-s1">search</span>) <span class="pl-en">print</span>(<span class="pl-s">'sklearn.neighbors (ball_tree) build finished in {}s'</span>.<span class="pl-en">format</span>(<span class="pl-en">pc</span>()<span class="pl-c1">-</span><span class="pl-s1">t0</span>)) <span class="pl-s1">t0</span> <span class="pl-c1">=</span> <span class="pl-en">pc</span>() <span class="pl-s1">neigh</span> <span class="pl-c1">=</span> <span class="pl-v">NearestNeighbors</span>(<span class="pl-s1">algorithm</span><span class="pl-c1">=</span><span class="pl-s">'kd_tree'</span>).<span class="pl-en">fit</span>(<span class="pl-s1">search</span>) <span class="pl-en">print</span>(<span class="pl-s">' sklearn.neighbors (kd_tree) build finished in {}s'</span>.<span class="pl-en">format</span>(<span class="pl-en">pc</span>()<span class="pl-c1">-</span><span class="pl-s1">t0</span>)) <span class="pl-s1">t0</span> <span class="pl-c1">=</span> <span class="pl-en">pc</span>() <span class="pl-s1">neigh</span> <span class="pl-c1">=</span> <span class="pl-v">KDTree_Sklearn</span>(<span class="pl-s1">search</span>) <span class="pl-en">print</span>(<span class="pl-s">' sklearn.neighbors KD tree build finished in {}s'</span>.<span class="pl-en">format</span>(<span class="pl-en">pc</span>()<span class="pl-c1">-</span><span class="pl-s1">t0</span>)) <span class="pl-s1">t0</span> <span class="pl-c1">=</span> <span class="pl-en">pc</span>() <span class="pl-s1">neigh</span> <span class="pl-c1">=</span> <span class="pl-v">KDTree_Scipy</span>(<span class="pl-s1">search</span>) <span class="pl-en">print</span>(<span class="pl-s">' scipy.spatial KD tree build finished in {}s'</span>.<span class="pl-en">format</span>(<span class="pl-en">pc</span>()<span class="pl-c1">-</span><span class="pl-s1">t0</span>)) <span class="pl-en">print</span>(<span class="pl-s">''</span>)</pre></div> <h3 dir="auto">Expected Results</h3> <p dir="auto">Time complexity scaling of scikit-learn KDTree should be similar to scaling of scipy.spatial KDTree</p> <h3 dir="auto">Actual Results</h3> <h4 dir="auto">Artificial Data, scikit-learn outperforms scipy.spatial</h4> <p dir="auto">data shape (240000, 5)<br> delta [ 22.7311549 22.61482157 22.57353059 22.65385101 22.77163478]<br> sklearn.neighbors (ball_tree) build finished in 0.1524970519822091s<br> sklearn.neighbors (kd_tree) build finished in 0.17296032601734623s<br> sklearn.neighbors KD tree build finished in 0.172917598974891s<br> scipy.spatial KD tree build finished in 2.265735782973934s</p> <p dir="auto">data shape (2400000, 5)<br> delta [ 23.38025743 23.22174801 22.88042798 22.8831237 23.31696732]<br> sklearn.neighbors (ball_tree) build finished in 3.462802237016149s<br> sklearn.neighbors (kd_tree) build finished in 3.7110973289818503s<br> sklearn.neighbors KD tree build finished in 3.5682168990024365s<br> scipy.spatial KD tree build finished in 19.92274082399672s</p> <p dir="auto">data shape (4800000, 5)<br> delta [ 23.38025743 23.26302877 23.22210673 22.97866792 23.31696732]<br> sklearn.neighbors (ball_tree) build finished in 8.922708058031276s<br> sklearn.neighbors (kd_tree) build finished in 9.238389031030238s<br> sklearn.neighbors KD tree build finished in 8.879073369025718s<br> scipy.spatial KD tree build finished in 38.43681587401079s</p> <p dir="auto">data shape (6000000, 5)<br> delta [ 23.42236957 23.26302877 23.22210673 23.20207953 23.31696732]<br> sklearn.neighbors (ball_tree) build finished in 12.75000820402056s<br> sklearn.neighbors (kd_tree) build finished in 13.30022174998885s<br> sklearn.neighbors KD tree build finished in 12.794657755992375s<br> scipy.spatial KD tree build finished in 48.33784791099606s</p> <h4 dir="auto">My Data, scipy.spatial outperforms scikit-learn for increasing data size</h4> <p dir="auto">data shape (240000, 5)<br> delta [ 2.14487407 2.14472508 2.14499087 8.86612151 0.15491879]<br> sklearn.neighbors (ball_tree) build finished in 0.39374090504134074s<br> sklearn.neighbors (kd_tree) build finished in 0.21525143302278593s<br> sklearn.neighbors KD tree build finished in 0.21449304796988145s<br> scipy.spatial KD tree build finished in 2.244567967019975s</p> <p dir="auto">data shape (2400000, 5)<br> delta [ 2.14502773 2.14502543 2.14502904 8.86612151 1.59685522]<br> sklearn.neighbors (ball_tree) build finished in 4.199425678991247s<br> sklearn.neighbors (kd_tree) build finished in 4.40237572795013s<br> sklearn.neighbors KD tree build finished in 4.295626600971445s<br> scipy.spatial KD tree build finished in 26.322200270951726s</p> <p dir="auto">data shape (4800000, 5)<br> delta [ 2.14502773 2.14502864 2.14502904 8.86612151 3.19371044]<br> sklearn.neighbors (ball_tree) build finished in 110.31694995303405s<br> sklearn.neighbors (kd_tree) build finished in 112.8703724470106s<br> sklearn.neighbors KD tree build finished in 114.07325625402154s<br> scipy.spatial KD tree build finished in 51.79352715797722s</p> <p dir="auto">data shape (6000000, 5)<br> delta [ 2.14502838 2.14502902 2.14502914 8.86612151 3.99213804]<br> sklearn.neighbors (ball_tree) build finished in 2458.668528069975s<br> sklearn.neighbors (kd_tree) build finished in 2451.2438263060176s<br> sklearn.neighbors KD tree build finished in 2801.8054143560003s<br> scipy.spatial KD tree build finished in 62.066240190993994s</p> <h4 dir="auto">Comments</h4> <p dir="auto">cKDTree from scipy.spatial behaves even better<br> I cannot use cKDTree/KDTree from scipy.spatial because calculating a sparse distance matrix (sparse_distance_matrix function) is extremely slow compared to neighbors.radius_neighbors_graph/neighbors.kneighbors_graph and I need a sparse distance matrix for DBSCAN on large datasets (n_samples &gt;10 mio) with low dimensionality (n_features = 5 or 6)</p> <h3 dir="auto">Versions</h3> <p dir="auto">Linux-4.7.6-1-ARCH-x86_64-with-arch<br> Python 3.5.2 (default, Jun 28 2016, 08:46:01) [GCC 6.1.1 20160602]<br> NumPy 1.11.2<br> SciPy 0.18.1<br> Scikit-Learn 0.18</p>
<p dir="auto">I don't know if this is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125766835" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/6147" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/6147/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/6147">#6147</a>. I am using "<em>The scikit-learn version is 0.18.dev0</em>" and I have no exception though, so this is different.</p> <p dir="auto">In any case, this is my code (the data I am using is the same as the data for the Santander kaggle competition, too big to attach).</p> <p dir="auto"><code class="notranslate">alg = XGBClassifier(max_depth=4, min_child_weight = 1, n_estimators=1000, learning_rate=0.0202, gamma=0, nthread=4, subsample=0.6815, colsample_bytree=0.701, seed=1, silent=False)</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="param_test1 = { 'max_depth':range(3,10,2), 'min_child_weight':range(1,10,2) } gsearch1 = GridSearchCV(estimator = alg, param_grid = param_test1, scoring='roc_auc', iid=False, n_jobs=4, cv=5) gsearch1.fit(train_data[predictors].as_matrix(),train_data[target].as_matrix())"><pre class="notranslate"><code class="notranslate">param_test1 = { 'max_depth':range(3,10,2), 'min_child_weight':range(1,10,2) } gsearch1 = GridSearchCV(estimator = alg, param_grid = param_test1, scoring='roc_auc', iid=False, n_jobs=4, cv=5) gsearch1.fit(train_data[predictors].as_matrix(),train_data[target].as_matrix()) </code></pre></div> <p dir="auto">The program will not crash, will not throw an exception, but will not do anything (activity monitor shows no activity). Quick debugging shows the program enters <code class="notranslate">_fit</code> in <code class="notranslate">grid_search.py</code> but never reaches line 564. I did not debug further. A quick search brought me to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125766835" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/6147" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/6147/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/6147">#6147</a> and tried removing the <code class="notranslate">n_jobs</code>variable.</p> <p dir="auto">Removing<code class="notranslate">n_jobs</code> from the <code class="notranslate">GridSearchCV</code> call solves the issue.</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.7</li> <li>Operating System version: Mac</li> <li>Java version: jdk 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>configure consumer in xml file<br> &lt;dubbo:reference id="demoServieRpc" interface="com.aop.demo.demo.dubbo.DemoService" group="ceshi" retries="1"&gt;<br> &lt;dubbo:parameter key="hide" value="1" hide="true"/&gt;<br> &lt;/dubbo:reference&gt;</li> </ol> <p dir="auto">public interface DemoService {<br> String sayHello();<br> }</p> <ol start="2" dir="auto"> <li> <p dir="auto">define a filter in provider side<br> <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/activate/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/activate">@activate</a>(group = "provider")<br> public class HideParameterFilter implements Filter {<br> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/OverRide/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/OverRide">@OverRide</a><br> public Result invoke(Invoker&lt;?&gt; invoker, Invocation invocation) throws RpcException {<br> String hide = invoker.getUrl().getParameter("hide");<br> System.out.println("context" + RpcContext.getContext().getAttachment("hide"));<br> System.out.println("隐式参数" + hide);<br> return invoker.invoke(invocation);<br> }<br> }<br> and we also create a file named "org.apache.dubbo.rpc.Filter" under META-INF/dubbo folder, and file content is<br> hideParameterFilter=com.aop.demo.demo.dubbo.HideParameterFilter</p> </li> <li> <p dir="auto">configure service in provider side<br> &lt;dubbo:service interface="com.aop.demo.demo.dubbo.DemoService"<br> ref="demoService" executes="10" group="ceshi" filter="hideParameterFilter"/&gt;</p> </li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">then consumer invode sayHello(), in provider side, hideParameterFilter should print 1.</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">hideParameterFilter print null.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">SOFARegistry is a production-level, low-latency, high-availability service registry. Can we integrate with it?</p>
0
<p dir="auto">It is very common to add statistical annotations when comparing boxplots or barplots. See the screenshot for an example.</p> <p dir="auto">(A) Are there any plans to include a similar feature or (B) to at least facilitate the addition of such annotations?</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11406002/84556825-a2814f00-ad25-11ea-9db9-9a8044e6221f.png"><img src="https://user-images.githubusercontent.com/11406002/84556825-a2814f00-ad25-11ea-9db9-9a8044e6221f.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">So far, it's rather difficult to add such annotations because seaborn's <code class="notranslate">boxplot()</code> and <code class="notranslate">barplot()</code> don't expose the boxes and bars they draw. One could grab the matplotlib artists and try to reverse engineer the plot content, but this is way too difficult.</p> <p dir="auto">I've found <a href="https://github.com/webermarcolivier/statannot">statannot</a>, a great attempt to work around this missing feature. But the solution re-implements some of seaborn's code and recreates the plots internally. Also, the annotation logic was not matching my needs perfectly. Before digging into statannot, I thought to check first why seaborn is not offering that feature in first place.</p> <p dir="auto">Thanks!</p>
<p dir="auto">Seems like there is something preventing heatmap annotation but I'm not sure what. To reproduce this just run the example <a href="http://stanford.edu/~mwaskom/software/seaborn/examples/heatmap_annotation.html?highlight=heatmap" rel="nofollow">here</a>.</p> <p dir="auto">This is what I get:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8889265/12174877/35b63cf4-b52d-11e5-8e03-4c59fddc666d.png"><img src="https://cloud.githubusercontent.com/assets/8889265/12174877/35b63cf4-b52d-11e5-8e03-4c59fddc666d.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">I'm using the most up to date version of seaborn on conda (0.6.0).</p> <p dir="auto">Also in the example the ticklabels are horizontal. For some reason I have to rotate them 360 degrees to get them back horizontal.</p>
0
<p dir="auto">Does anyone thought about adding support for fluent API (something similar/same as Dart does)?</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class A { k = 10; constructor(private n) { } run(): void { ... } test(): void { ... } } new A(2) ..k = 20 ..run() ..test();"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span> <span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">10</span><span class="pl-kos">;</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-k">private</span> <span class="pl-s1">n</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-kos">{</span> ... <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">new</span> <span class="pl-smi">A</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span> <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">this could be translated to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var a = new A(2); a.k = 20; a.run(); a.test();"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">A</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-c1">k</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span><span class="pl-kos">;</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">run</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">a</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">That would simplify a lot writing A class in a way fluent API is supported.</p>
<p dir="auto">With <code class="notranslate">noImplicitAny: true</code> set, the following should fail, but it doesn't:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const x = ({ f }) =&gt; 1;"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-en">x</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> f <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">1</span><span class="pl-kos">;</span></pre></div> <p dir="auto">TS 1.8.7</p>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: @....</li> </ul> </li> </ul> <p dir="auto">Hello,</p> <p dir="auto">I just upgraded my <code class="notranslate">@types/react</code> from <code class="notranslate">^16.0.1</code> to <code class="notranslate">^16.0.2</code> and now I'm seeing this typing conflict with <code class="notranslate">@types/react-router-dom</code> version <code class="notranslate">^4.0.7</code>. I am using CRA with the latest <code class="notranslate">react-scripts-ts</code> which I believe uses <code class="notranslate">tsc</code> version <code class="notranslate">2.4.2</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts (3558,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'td' must be of type 'DetailedHTMLProps&lt;TdHTMLAttributes&lt;HTMLTableDataCellElement&gt;, HTMLTableDataCellElement&gt;', but here has type 'DetailedHTMLProps&lt;TdHTMLAttributes&lt;HTMLTableDataCellElement&gt;, HTMLTableDataCellElement&gt;"><pre class="notranslate"><code class="notranslate">.../node_modules/@types/react-router-dom/node_modules/@types/react/index.d.ts (3558,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'td' must be of type 'DetailedHTMLProps&lt;TdHTMLAttributes&lt;HTMLTableDataCellElement&gt;, HTMLTableDataCellElement&gt;', but here has type 'DetailedHTMLProps&lt;TdHTMLAttributes&lt;HTMLTableDataCellElement&gt;, HTMLTableDataCellElement&gt; </code></pre></div> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/richseviora/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/richseviora">@richseviora</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/onigoetz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/onigoetz">@onigoetz</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DovydasNavickas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DovydasNavickas">@DovydasNavickas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/morcerf/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/morcerf">@morcerf</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ericanderson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ericanderson">@ericanderson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/digiguru/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/digiguru">@digiguru</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pzavolinsky/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pzavolinsky">@pzavolinsky</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bbenezech/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bbenezech">@bbenezech</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tdreyno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tdreyno">@tdreyno</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tdreyno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tdreyno">@tdreyno</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johnnyreilly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johnnyreilly">@johnnyreilly</a></p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/huy-nguyen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/huy-nguyen">@huy-nguyen</a></p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/react</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/richseviora/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/richseviora">@richseviora</a></li> </ul> </li> </ul> <p dir="auto">I am grateful to the team that maintains these - please keep up the good work.</p> <p dir="auto">The <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/types/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/types">@types</a> definitions for React 16 are getting into the wild too soon causing errors in TypeScript builds.</p> <p dir="auto">Even though I have projects that depend on "15.6.0" in order lock-in the version of @types/react, the "*" dependencies in projects like @types/react-dom and @types/react-virtualized seem to allow npm to resolve it all to 16.0.1, which causes builds to break.</p> <p dir="auto">React itself is pushing its @16.x.x builds to npm with the <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/next/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/next">@next</a> tag so that builds that want <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/latest/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/latest">@latest</a> don't inadvertently update to the React 16 betas. The matching <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/types/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/types">@types</a> should do the same.</p> <p dir="auto">Here is the resulting error (one for each React.DOM item):<br> ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:3458:13<br> TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'DetailedHTMLProps&lt;AnchorHTMLAttributes, HTMLAnchorElement&gt;', but here has type 'DetailedHTMLProps&lt;AnchorHTMLAttributes, HTMLAnchorElement&gt;'.</p> <p dir="auto">If I hand-edit package-lock.json to make sure that the various dependencies don't resolve to @types/react 16.x.x, the errors go away.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4</li> <li>Operating System version: Darwin Kernel Version 18.7.0</li> <li>Java version: 1.8.0_181-b13)</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>invoke <code class="notranslate">StringUtils.split("d,1,2,4", 'a')</code></li> <li>invoke <code class="notranslate">"d,1,2,4".split("a")</code></li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto"><code class="notranslate">StringUtils.split("d,1,2,4", 'a')</code> should return <code class="notranslate">["d,1,2,4"]</code> just like <code class="notranslate">"d,1,2,4".split("a")</code>.</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">empty array.</p>
<p dir="auto">There is a difference between timeout and network timeout. In FailoverClusterInvoker, whether it is timeout or network timeout, it is ignored. If it is a business timeout, then two retry attempts will cause an avalanche effect. In FailfastClusterInvoker, there is no fault tolerance for network timeouts. If it is a network partition, the SLA will inevitably fall. I think the implementation of these two Invokers must include the processing of the network timeout, otherwise the implementation is not correct.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.5</li> <li>Operating System version: centos 7.2</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>xxx</li> <li>xxx</li> <li>xxx</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">What do you expected from the above steps?</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">What actually happens?</p> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here! </code></pre></div>
0
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.0</p> <h3 dir="auto">What happened</h3> <p dir="auto">Hello!</p> <p dir="auto">I'm using taskflow api for my dag and was trying to run the last task even if the previous task failed, I used <code class="notranslate">@task(trigger_rule=TriggerRule.ALL_DONE)</code> but i still got the ending task failed too.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38496723/170526480-131e6ed4-e2a0-4711-9328-2326f94885e3.png"><img width="213" alt="image" src="https://user-images.githubusercontent.com/38496723/170526480-131e6ed4-e2a0-4711-9328-2326f94885e3.png" style="max-width: 100%;"></a></p> <p dir="auto">The UI confirms that I declared the trigger_rule "all_done"<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/38496723/170526766-72ba0eb7-2525-4d60-a8c3-ab3dd700d88b.png"><img width="218" alt="image" src="https://user-images.githubusercontent.com/38496723/170526766-72ba0eb7-2525-4d60-a8c3-ab3dd700d88b.png" style="max-width: 100%;"></a></p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">This is the whole code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import logging import pendulum from airflow.decorators import task, dag from airflow.utils.trigger_rule import TriggerRule @dag( schedule_interval=None, start_date=pendulum.datetime(2021, 5, 10, tz=&quot;UTC&quot;), catchup=False, ) def taskflow_trigger(): @task() def first_task(): return &quot;first_task&quot; @task def second_task(value): return &quot;second_task&quot; @task def task_to_fail(value): data = {&quot;test&quot;: 1} val = data[&quot;not_here&quot;] return val @task(trigger_rule=TriggerRule.ALL_DONE) def end(value): return &quot;yes&quot; op_1 = first_task() op_3 = task_to_fail(op_1) op_2 = second_task(op_1) end([op_3, op_2]) taskflow_trigger = taskflow_trigger()"><pre class="notranslate"><code class="notranslate">import logging import pendulum from airflow.decorators import task, dag from airflow.utils.trigger_rule import TriggerRule @dag( schedule_interval=None, start_date=pendulum.datetime(2021, 5, 10, tz="UTC"), catchup=False, ) def taskflow_trigger(): @task() def first_task(): return "first_task" @task def second_task(value): return "second_task" @task def task_to_fail(value): data = {"test": 1} val = data["not_here"] return val @task(trigger_rule=TriggerRule.ALL_DONE) def end(value): return "yes" op_1 = first_task() op_3 = task_to_fail(op_1) op_2 = second_task(op_1) end([op_3, op_2]) taskflow_trigger = taskflow_trigger() </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">"Debian GNU/Linux 11 (bullseye)</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Docker-Compose</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.2 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">Using TaskFlow API and have 2 tasks that lead to the same downstream task. These tasks check for new data and when found will set an XCom entry of the new filename for the downstream to handle. If no data is found the upstream tasks raise a skip exception.<br> The downstream task has the trigger_rule = none_failed_min_one_success.</p> <p dir="auto">Problem is that a task which is set to Skip doesn't set any XCom. When the downstream task starts it raises the error:<br> <code class="notranslate">airflow.exceptions.AirflowException: XComArg result from task2 at airflow_2_3_xcomarg_render_error with key="return_value" is not found!</code></p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">Based on trigger rule of "none_failed_min_one_success", expectation is that an upstream task should be allowed to skip and the downstream task will still run. While the downstream does try to start based on trigger rules, it never really gets to run since the error is raised when rendering the arguments.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Example dag will generate the error if run.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from airflow.decorators import dag, task from airflow.exceptions import AirflowSkipException @task def task1(): return &quot;example.csv&quot; @task def task2(): raise AirflowSkipException() @task(trigger_rule=&quot;none_failed_min_one_success&quot;) def downstream_task(t1, t2): print(&quot;task ran&quot;) @dag( default_args={&quot;owner&quot;: &quot;Airflow&quot;, &quot;start_date&quot;: &quot;2022-06-07&quot;}, schedule_interval=None, ) def airflow_2_3_xcomarg_render_error(): t1 = task1() t2 = task2() downstream_task(t1, t2) example_dag = airflow_2_3_xcomarg_render_error()"><pre class="notranslate"><code class="notranslate">from airflow.decorators import dag, task from airflow.exceptions import AirflowSkipException @task def task1(): return "example.csv" @task def task2(): raise AirflowSkipException() @task(trigger_rule="none_failed_min_one_success") def downstream_task(t1, t2): print("task ran") @dag( default_args={"owner": "Airflow", "start_date": "2022-06-07"}, schedule_interval=None, ) def airflow_2_3_xcomarg_render_error(): t1 = task1() t2 = task2() downstream_task(t1, t2) example_dag = airflow_2_3_xcomarg_render_error() </code></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu 20.04.4 LTS</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Virtualenv installation</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
1
<h5 dir="auto">Description of the problem</h5> <p dir="auto">I have an issue when I export a JSON file from Maya using the JSONExporter. I have been trying to export a character with morph targets, but can see no option for this on export and no field for 'Morph Targets' in the JSON file after export.</p> <p dir="auto">I have searched all over for an answer to this and posted a question to StackOverflow, still with no solution (<a href="http://stackoverflow.com/questions/36773360/how-do-i-export-a-json-file-with-morph-targets-from-maya" rel="nofollow">http://stackoverflow.com/questions/36773360/how-do-i-export-a-json-file-with-morph-targets-from-maya</a>) leading me to believe that this is an issue.</p> <p dir="auto">Another issue with the JSON export from Maya is that when I import my character into my Three.js scene and move a bone, there seems to be a duplicate mesh underneath that doesn't move. This does not occur when I export from Blender. I'm not sure if this issue is related to the one I am posting about.</p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r76</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> IOS</li> </ul>
<p dir="auto"><a href="http://browserify.org/" rel="nofollow">Browserify</a><br> Moving to this architecture has advantages and disadvantages. Please add your thoughts.</p> <p dir="auto">Note: this does not require three.js consumers to use browserify.</p>
0
<p dir="auto">We are building a Numpy python wheel from source, and binding it to a version of MKL that is installed on our cluster. Since Numpy 1.19, a single test fails when running <code class="notranslate">numpy.test()</code> :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; assert info.get_lib_dirs() == lib_dirs E AssertionError: assert ['/cvmfs/soft.../lib/intel64'] == ['/tmp/tmpwmv.../tmprf9ssim6'] E At index 0 diff: '/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/2019.2.187/mkl/lib/intel64' != '/tmp/tmpwmvc9p10' E Right contains one more item: '/tmp/tmprf9ssim6' E Full diff: E - ['/tmp/tmpwmvc9p10', '/tmp/tmprf9ssim6'] E + ['/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/2019.2.187/mkl/lib/intel64']"><pre class="notranslate"><code class="notranslate">&gt; assert info.get_lib_dirs() == lib_dirs E AssertionError: assert ['/cvmfs/soft.../lib/intel64'] == ['/tmp/tmpwmv.../tmprf9ssim6'] E At index 0 diff: '/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/2019.2.187/mkl/lib/intel64' != '/tmp/tmpwmvc9p10' E Right contains one more item: '/tmp/tmprf9ssim6' E Full diff: E - ['/tmp/tmpwmvc9p10', '/tmp/tmprf9ssim6'] E + ['/cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/2019.2.187/mkl/lib/intel64'] </code></pre></div> <p dir="auto">Now, obviously, the path returned by <code class="notranslate">info.get_lib_dirs()</code> is the correct one, it should not find libraries in <code class="notranslate">/tmp/...</code>.</p> <p dir="auto">Why is this test failing ?</p> <p dir="auto">Note that 10895 other tests pass correctly.</p>
<p dir="auto">python-3.8.3, numpy 1.19.0</p> <p dir="auto">numpy is compiled against intel mkl 2018.2.199 (newer versions of mkl + numpy =&gt; nvidia's nvblas no longer work )</p> <p dir="auto">OS ubuntu linux.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt;np.show_config() blas_mkl_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] blas_opt_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] lapack_mkl_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] lapack_opt_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] &gt;&gt;&gt; np.__version__ '1.19.0'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt;np.show_config() blas_mkl_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] blas_opt_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] lapack_mkl_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] lapack_opt_info: libraries = ['mkl_rt', 'pthread'] library_dirs = ['/opt/intel/mkl/lib/intel64/'] define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)] include_dirs = ['/opt/intel/mkl/include'] &gt;&gt;&gt; np.__version__ '1.19.0' </code></pre></div> <p dir="auto">Running np.test() produces one error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TestSystemInfoReading.test_overrides _____________________ self = &lt;numpy.distutils.tests.test_system_info.TestSystemInfoReading object at 0x7f36d855d640&gt; def test_overrides(self): previousDir = os.getcwd() cfg = os.path.join(self._dir1, 'site.cfg') shutil.copy(self._sitecfg, cfg) try: os.chdir(self._dir1) # Check that the '[ALL]' section does not override # missing values from other sections info = mkl_info() lib_dirs = info.cp['ALL']['library_dirs'].split(os.pathsep) assert info.get_lib_dirs() != lib_dirs # But if we copy the values to a '[mkl]' section the value # is correct with open(cfg, 'r') as fid: mkl = fid.read().replace('ALL', 'mkl') with open(cfg, 'w') as fid: fid.write(mkl) info = mkl_info() assert info.get_lib_dirs() == lib_dirs # Also, the values will be taken from a section named '[DEFAULT]' with open(cfg, 'r') as fid: dflt = fid.read().replace('mkl', 'DEFAULT') with open(cfg, 'w') as fid: fid.write(dflt) info = mkl_info() &gt; assert info.get_lib_dirs() == lib_dirs E AssertionError: assert ['/opt/intel/...lib/intel64/'] == ['/tmp/tmp_gt.../tmp0ntuctr2'] E At index 0 diff: '/opt/intel/mkl/lib/intel64/' != '/tmp/tmp_gtgtt2a' E Right contains one more item: '/tmp/tmp0ntuctr2' E Full diff: E - ['/tmp/tmp_gtgtt2a', '/tmp/tmp0ntuctr2'] E + ['/opt/intel/mkl/lib/intel64/'] cfg = '/tmp/tmp_gtgtt2a/site.cfg' dflt = '\n[DEFAULT]\nlibrary_dirs = /tmp/tmp_gtgtt2a:/tmp/tmp0ntuctr2\nlibraries = /tmp/tmp_gtgtt2a/libfoo.so,/tmp/tmp0ntuctr.../tmp0ntuctr2\n\n[duplicate_options]\nmylib_libs = /tmp/tmp_gtgtt2a/libfoo.so\nlibraries = /tmp/tmp0ntuctr2/libbar.so\n' fid = &lt;_io.TextIOWrapper name='/tmp/tmp_gtgtt2a/site.cfg' mode='w' encoding='UTF-8'&gt; info = &lt;numpy.distutils.system_info.mkl_info object at 0x7f36d8570be0&gt; lib_dirs = ['/tmp/tmp_gtgtt2a', '/tmp/tmp0ntuctr2'] mkl = '\n[mkl]\nlibrary_dirs = /tmp/tmp_gtgtt2a:/tmp/tmp0ntuctr2\nlibraries = /tmp/tmp_gtgtt2a/libfoo.so,/tmp/tmp0ntuctr2/li.../tmp0ntuctr2\n\n[duplicate_options]\nmylib_libs = /tmp/tmp_gtgtt2a/libfoo.so\nlibraries = /tmp/tmp0ntuctr2/libbar.so\n' previousDir = '/home/bernard/opt/python38' self = &lt;numpy.distutils.tests.test_system_info.TestSystemInfoReading object at 0x7f36d855d640&gt; lib/python3.8/site-packages/numpy/distutils/tests/test_system_info.py:284: AssertionError"><pre class="notranslate"><code class="notranslate">TestSystemInfoReading.test_overrides _____________________ self = &lt;numpy.distutils.tests.test_system_info.TestSystemInfoReading object at 0x7f36d855d640&gt; def test_overrides(self): previousDir = os.getcwd() cfg = os.path.join(self._dir1, 'site.cfg') shutil.copy(self._sitecfg, cfg) try: os.chdir(self._dir1) # Check that the '[ALL]' section does not override # missing values from other sections info = mkl_info() lib_dirs = info.cp['ALL']['library_dirs'].split(os.pathsep) assert info.get_lib_dirs() != lib_dirs # But if we copy the values to a '[mkl]' section the value # is correct with open(cfg, 'r') as fid: mkl = fid.read().replace('ALL', 'mkl') with open(cfg, 'w') as fid: fid.write(mkl) info = mkl_info() assert info.get_lib_dirs() == lib_dirs # Also, the values will be taken from a section named '[DEFAULT]' with open(cfg, 'r') as fid: dflt = fid.read().replace('mkl', 'DEFAULT') with open(cfg, 'w') as fid: fid.write(dflt) info = mkl_info() &gt; assert info.get_lib_dirs() == lib_dirs E AssertionError: assert ['/opt/intel/...lib/intel64/'] == ['/tmp/tmp_gt.../tmp0ntuctr2'] E At index 0 diff: '/opt/intel/mkl/lib/intel64/' != '/tmp/tmp_gtgtt2a' E Right contains one more item: '/tmp/tmp0ntuctr2' E Full diff: E - ['/tmp/tmp_gtgtt2a', '/tmp/tmp0ntuctr2'] E + ['/opt/intel/mkl/lib/intel64/'] cfg = '/tmp/tmp_gtgtt2a/site.cfg' dflt = '\n[DEFAULT]\nlibrary_dirs = /tmp/tmp_gtgtt2a:/tmp/tmp0ntuctr2\nlibraries = /tmp/tmp_gtgtt2a/libfoo.so,/tmp/tmp0ntuctr.../tmp0ntuctr2\n\n[duplicate_options]\nmylib_libs = /tmp/tmp_gtgtt2a/libfoo.so\nlibraries = /tmp/tmp0ntuctr2/libbar.so\n' fid = &lt;_io.TextIOWrapper name='/tmp/tmp_gtgtt2a/site.cfg' mode='w' encoding='UTF-8'&gt; info = &lt;numpy.distutils.system_info.mkl_info object at 0x7f36d8570be0&gt; lib_dirs = ['/tmp/tmp_gtgtt2a', '/tmp/tmp0ntuctr2'] mkl = '\n[mkl]\nlibrary_dirs = /tmp/tmp_gtgtt2a:/tmp/tmp0ntuctr2\nlibraries = /tmp/tmp_gtgtt2a/libfoo.so,/tmp/tmp0ntuctr2/li.../tmp0ntuctr2\n\n[duplicate_options]\nmylib_libs = /tmp/tmp_gtgtt2a/libfoo.so\nlibraries = /tmp/tmp0ntuctr2/libbar.so\n' previousDir = '/home/bernard/opt/python38' self = &lt;numpy.distutils.tests.test_system_info.TestSystemInfoReading object at 0x7f36d855d640&gt; lib/python3.8/site-packages/numpy/distutils/tests/test_system_info.py:284: AssertionError </code></pre></div>
1
<p dir="auto">Starting the 0.3 pre-release binary on Mac 10.8.5 and also another machine with 10.9.1 just stops after the the call</p> <p dir="auto">"exec '/Users/.../.../julia.app/Contents/Resources/julia/bin/julia'</p> <p dir="auto">[Process completed]</p> <p dir="auto">0.2 works.</p>
<p dir="auto">Julia-0.3.0-prerelease-d2d9bd93ed for OSX 10.6 64-bit crashes instantly at launch on an iMac model iMac10,1 with Mac OS X 10.6.8 processor Intel Core 2 Duo 3.06 GHz</p> <p dir="auto">I don't have any debug tools on this machine but I think it is an illegal instruction.</p> <p dir="auto">Julia 0.2 for OSX 10.6 64-bit works.</p>
1
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>11.0.0-beta1</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Windows 10 (18363.1379)</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>10.4.0</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Some events like <code class="notranslate">input</code>,<code class="notranslate">keydown</code>,<code class="notranslate">keyup</code>,<code class="notranslate">compositionstart</code>,<code class="notranslate">compositionupdate</code>,<code class="notranslate">compositionend</code> would be fired correctly.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">Some input IMEs like Sogou Pinyin would never trigger the event like <code class="notranslate">keydown</code> when they are inputing.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto">for windows:</p> <ol dir="auto"> <li>download the Sogou IME installer from <a href="https://pinyin.sogou.com/" rel="nofollow">https://pinyin.sogou.com/</a></li> <li>try to input Chinese words or Japanese words in integrated terminal of vscode</li> </ol> <h3 dir="auto">Screenshots</h3> <h3 dir="auto">Additional Information</h3>
<p dir="auto">Before I begin, I am aware that this is a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135753957" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/4583" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/4583/hovercard" href="https://github.com/electron/electron/issues/4583">#4583</a>, but I couldn't find sufficient troubleshooting info.<br> <strong>Reproductional Steps:</strong></p> <ol dir="auto"> <li>Download YakYak for Linux from <a href="https://github.com/yakyak/yakyak">the GitHub Repo</a> and extract it to the /opt directory for installation</li> <li>Open the Bash terminal and run <code class="notranslate">yakyak.</code> You can also use the run dialogue, but this allows for output.</li> </ol>
0
<p dir="auto">When a site redirects to an URL containing "/../", requests passes it verbatim instead of interpreting it.</p> <h2 dir="auto">Expected Result</h2> <p dir="auto">requests should remove the ".." component and the previous component, by interpreting the ".." as meaning "parent folder".<br> All real browsers do it. libcurl/curl (and wget) does it too.<br> Test for example <a href="https://httpbin.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Ffoo%2F%2E%2E%2Fget" rel="nofollow">https://httpbin.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Ffoo%2F%2E%2E%2Fget</a></p> <h2 dir="auto">Actual Result</h2> <p dir="auto">requests fails to interpret it like other HTTP clients do and passes the "/../" verbatim, leading to errors on servers, ranging from 500 errors to 404 errors (as for httpbin).</p> <h2 dir="auto">Reproduction Steps</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests r = requests.get('https://httpbin.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Ffoo%2F%2E%2E%2Fget') print(r.status_code, r.url)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span> <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s">'https://httpbin.org/redirect-to?url=https%3A%2F%2Fhttpbin.org%2Ffoo%2F%2E%2E%2Fget'</span>) <span class="pl-en">print</span>(<span class="pl-s1">r</span>.<span class="pl-s1">status_code</span>, <span class="pl-s1">r</span>.<span class="pl-s1">url</span>)</pre></div> <h2 dir="auto">System Information</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;chardet&quot;: { &quot;version&quot;: &quot;3.0.4&quot; }, &quot;cryptography&quot;: { &quot;version&quot;: &quot;&quot; }, &quot;idna&quot;: { &quot;version&quot;: &quot;2.6&quot; }, &quot;implementation&quot;: { &quot;name&quot;: &quot;CPython&quot;, &quot;version&quot;: &quot;2.7.15&quot; }, &quot;platform&quot;: { &quot;release&quot;: &quot;4.15.0-1-amd64&quot;, &quot;system&quot;: &quot;Linux&quot; }, &quot;pyOpenSSL&quot;: { &quot;openssl_version&quot;: &quot;&quot;, &quot;version&quot;: null }, &quot;requests&quot;: { &quot;version&quot;: &quot;2.18.4&quot; }, &quot;system_ssl&quot;: { &quot;version&quot;: &quot;1010008f&quot; }, &quot;urllib3&quot;: { &quot;version&quot;: &quot;1.22&quot; }, &quot;using_pyopenssl&quot;: false }"><pre class="notranslate"><code class="notranslate">{ "chardet": { "version": "3.0.4" }, "cryptography": { "version": "" }, "idna": { "version": "2.6" }, "implementation": { "name": "CPython", "version": "2.7.15" }, "platform": { "release": "4.15.0-1-amd64", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.18.4" }, "system_ssl": { "version": "1010008f" }, "urllib3": { "version": "1.22" }, "using_pyopenssl": false } </code></pre></div>
<p dir="auto">Browser &amp; other tools seem to ignore trailing dot in the URL. Unfortunately <code class="notranslate">requests</code> does not.</p> <p dir="auto">Compare</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -s https://github.com/. -o /dev/null -w &quot;%{http_code}&quot;; echo 200"><pre class="notranslate"><code class="notranslate">$ curl -s https://github.com/. -o /dev/null -w "%{http_code}"; echo 200 </code></pre></div> <p dir="auto">With</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -c 'import requests; print(requests.get(&quot;https://github.com/.&quot;).status_code)' 404"><pre class="notranslate"><code class="notranslate">$ python -c 'import requests; print(requests.get("https://github.com/.").status_code)' 404 </code></pre></div>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=youngm" rel="nofollow">Mike Youngstrom</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3370?redirect=false" rel="nofollow">SPR-3370</a></strong> and commented</p> <p dir="auto">There are cases where PersistenceAnnotationBeanPostProcessor doesn't find lazy loaded EMFs. I think it's because in findNamedEntityManagerFactory it uses beanFactory.isTypeMatch() to find EMFs that implement EntityManagerFactoryInfo and isTypeMatch() only matches cached singletons.</p> <p dir="auto">This is probably a known limitation so it may only require a documentation mention in PersistenceAnnotationBeanPostProcessor.</p> <p dir="auto">For anyone experiencing this problem the solution is to just make your EMF non lazy.</p> <p dir="auto">Mike</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.4</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398077649" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8117" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8117/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8117">#8117</a> PersistenceAnnotationBeanPostProcessor fails to find EMFBs (<em><strong>"is duplicated by"</strong></em>)</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=prickus" rel="nofollow">Osvaldas Grigas</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8269?redirect=false" rel="nofollow">SPR-8269</a></strong> and commented</p> <p dir="auto">When using AnnotationConfigApplicationContext, if I declare at least one <code class="notranslate">@Bean</code> of type BeanFactoryPostProcessor (even if it's a stub that doesn't do anything), this breaks default post-processing of the <code class="notranslate">@Configuration</code> bean, meaning that <code class="notranslate">@Autowired</code> fields are no longer injected, <code class="notranslate">@PostConstruct</code> methods are not called, etc.</p> <p dir="auto">I'm attaching a test case to prove my point.</p> <p dir="auto">A workaround is to manually add the relevant BeanPostProcessors (like AutowiredAnnotationBeanPostProcessor and CommonAnnotationBeanPostProcessor) to BeanFactory.</p> <p dir="auto">Same thing happens in web app when I use ContextLoaderInitializer to load <code class="notranslate">@Configuration</code> classes or define them through XML config. My particular case is that I use MyBatis-Spring integration and I cannot declare a <code class="notranslate">@Bean</code> of type org.mybatis.spring.mapper.MapperScannerConfigurer using annotation config, because this bean is a BeanFactoryPostProcessor and thus breaks autowiring of <code class="notranslate">@Configuration</code> class.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1 M1</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/19013/org.mybatis.spring.sample.zip" rel="nofollow">org.mybatis.spring.sample.zip</a> (<em>8.37 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/18060/testcase.zip" rel="nofollow">testcase.zip</a> (<em>1.98 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398111848" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12905" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12905/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12905">#12905</a> <code class="notranslate">@PostConstruct</code> and PropertyPlaceholderConfigurer do not work together in AnnotationConfigApplicationContext (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398109541" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12525" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12525/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12525">#12525</a> BeanDefinitionRegistryPostProcessor registered via <code class="notranslate">@Bean</code> will not be invoked</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398150911" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14099" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14099/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14099">#14099</a> Method postProcessBeanDefinitionRegistry is not called if the bean implements BeanDefinitionRegistryPostProcessor</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398192895" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/18808" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/18808/hovercard" href="https://github.com/spring-projects/spring-framework/issues/18808">#18808</a> Warn about non-static BeanDefinitionRegistryPostProcessor declarations on <code class="notranslate">@Configuration</code> classes</li> </ul> <p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/52bef0b7b024e794186437dee78945fbb5bd209a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/52bef0b7b024e794186437dee78945fbb5bd209a"><tt>52bef0b</tt></a></p>
0
<p dir="auto">...to have a better visual separation from files</p>
<p dir="auto">Can you please add file icons support in the tree view?</p> <p dir="auto">I know that access from extension to the DOM is restricted. But it will be good to add some language-id attribute to the tree-view element. For example in the <a href="https://github.com/Microsoft/vscode/blob/master/src/vs/base/parts/tree/browser/treeView.ts#L219">render function</a>. So it will be easy to modify view of files with different types with CSS, without modifying DOM.</p> <p dir="auto">And also It will be nice to add possibility to add/modify directly CSS from extension.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">Create a nested navigator. The top level navigator handles back just fine, but a WillPopScope within the inner navigator is completely ignored.</p> <p dir="auto">This is still the case if a WidgetsBindingObserver is used with the inner navigator.</p> <h2 dir="auto">Discussion...</h2> <p dir="auto">I've debugged through and the reason this seems to happen is that WidgetsBinding.handlePopRoute iterates forward through the list of WidgetsBindingObservers. This means observers that are registered later are lower down the list so never get called if the first layer can perform a pop. This causes a problem - if I have a nested structure, I want the lower level to be able to decide whether or not to pop before the decision is passed up the structure. But because the top level decides first, I'm going to have to write all my own wiring to propagate the decision downwards through a lower navigator.</p> <p dir="auto">I think that a simple fix would be to simply reverse the iteration through the list of WidgetBindingObservers in WidgetsBinding, but I realize that change could cause problems for existing projects (although theoretically if people are following the basic 'flutter' way of doing things, they would only have the one WidgetBindingObserver from the WidgetsApp making pop decisions so maybe it wouldn't cause too many problems).</p> <p dir="auto">I also recognize that through what I've seen in other issues &amp; threads, flutter doesn't really want to support nested navigators. However, I think that as adoption grows you're going to see a lot more people attempting to do it as there is nothing that prohibits it, and some of the documentaiton/code make it seem like it should work (i.e. in navigator has a 'bubble RoutePopDisposition' - on close inspection it says it bubbles to the system navigator but I initially assumed it bubbled from navigator to navigator). I personally am using nested navigators because I have an app with multiple sections, and some of the sections have navigational behaviour that are quite different than others, so it made sense to create different navigators (with extra classes for the specific behaviour). And even just for code cleanliness, it's nice to be able to split up functionality into of pages that are handled individually.</p> <h2 dir="auto">Logs</h2> <p dir="auto">N/A</p> <h2 dir="auto">Flutter Doctor</h2> <p dir="auto">N/A really - this is with the most recent flutter &amp; dart but is reproducible with older versions as well as the relevant code hasn't changed.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="• Flutter at C:\VirtualDrives\Programs\flutter • Framework revision 8cf109d20f (15 hours ago), 2018-01-11 23:21:53 -0800 • Engine revision 05fe72d068 • Tools Dart version 2.0.0-dev.16.0 • Engine Dart version 2.0.0-edge.28757928b47b192efcec082c78258102beb03f78"><pre class="notranslate"><code class="notranslate">• Flutter at C:\VirtualDrives\Programs\flutter • Framework revision 8cf109d20f (15 hours ago), 2018-01-11 23:21:53 -0800 • Engine revision 05fe72d068 • Tools Dart version 2.0.0-dev.16.0 • Engine Dart version 2.0.0-edge.28757928b47b192efcec082c78258102beb03f78 </code></pre></div>
<p dir="auto"><a href="https://docs.google.com/document/d/1Q0jx0l4-xymph9O6zLaOY4d_f7YFpNWX_eGbzYxr9wY/edit#heading=h.l6kdsrb6j9id" rel="nofollow">Design doc</a></p> <p dir="auto">The goal for this refactoring:</p> <ul class="contains-task-list"> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 1. Refactor the imperative api to continue working in the new navigation system</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 2. Introduce new page api to Navigator widget for more flexible navigator history modification</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 3. Implement Router widget for a more convenience api which wraps navigator widget and utilize the new page api.</p> </li> </ul>
1
<p dir="auto"><strong>Apache Airflow version</strong>:<br> 2.1.0</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>:</li> <li>AWS ECS EC2 mode. RDS PostgreSQL for DB.</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> <li>RedHat</li> <li> <ul dir="auto"> <li><strong>Other</strong></li> </ul> </li> <li>LDAP authentication enabled</li> </ul> <p dir="auto"><strong>What happened</strong>:<br> We upgraded from 2.0.1 to 2.1.0 and now when i go to Users view (as admin). I cannot see delete/edit/add buttons - if i try to simply navigate by chaniging url from Users/list to Users/edit/1 for example I get Access Denied as per FAB.<br> I checked underlying permission tables and from what i can see Admin Role does not have those permissions anymore there.</p> <p dir="auto">I tried deleting all permissions and with :</p> <div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="delete from dbo.ab_permission_view_role delete from &quot;dbo&quot;.&quot;ab_permission_view&quot; "><pre class="notranslate"><span class="pl-k">delete</span> <span class="pl-k">from</span> <span class="pl-c1">dbo</span>.<span class="pl-c1">ab_permission_view_role</span> <span class="pl-k">delete</span> <span class="pl-k">from</span> <span class="pl-s"><span class="pl-pds">"</span>dbo<span class="pl-pds">"</span></span>.<span class="pl-s"><span class="pl-pds">"</span>ab_permission_view<span class="pl-pds">"</span></span> </pre></div> <p dir="auto">and then re-run airflow sync-perms<br> this did not help.</p> <p dir="auto">loks like the default permissions settings are now defaulting to read-only even for admin on users tab.</p> <p dir="auto">the following query:</p> <div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="select abv.permission_id, abv.view_menu_id, avm.name as view_name, ap.name as permission_name from &quot;dbo&quot;.&quot;ab_permission_view&quot; abv inner join dbo.ab_view_menu avm on abv.view_menu_id = avm.id inner join dbo.ab_permission ap on abv.permission_id = ap.id WHERE avm.name = 'Users'"><pre class="notranslate"><span class="pl-k">select</span> <span class="pl-c1">abv</span>.<span class="pl-c1">permission_id</span>, <span class="pl-c1">abv</span>.<span class="pl-c1">view_menu_id</span>, <span class="pl-c1">avm</span>.<span class="pl-c1">name</span> <span class="pl-k">as</span> view_name, <span class="pl-c1">ap</span>.<span class="pl-c1">name</span> <span class="pl-k">as</span> permission_name <span class="pl-k">from</span> <span class="pl-s"><span class="pl-pds">"</span>dbo<span class="pl-pds">"</span></span>.<span class="pl-s"><span class="pl-pds">"</span>ab_permission_view<span class="pl-pds">"</span></span> abv <span class="pl-k">inner join</span> <span class="pl-c1">dbo</span>.<span class="pl-c1">ab_view_menu</span> avm <span class="pl-k">on</span> <span class="pl-c1">abv</span>.<span class="pl-c1">view_menu_id</span> <span class="pl-k">=</span> <span class="pl-c1">avm</span>.<span class="pl-c1">id</span> <span class="pl-k">inner join</span> <span class="pl-c1">dbo</span>.<span class="pl-c1">ab_permission</span> ap <span class="pl-k">on</span> <span class="pl-c1">abv</span>.<span class="pl-c1">permission_id</span> <span class="pl-k">=</span> <span class="pl-c1">ap</span>.<span class="pl-c1">id</span> <span class="pl-k">WHERE</span> <span class="pl-c1">avm</span>.<span class="pl-c1">name</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">'</span>Users<span class="pl-pds">'</span></span></pre></div> <p dir="auto">returns only one row with can_read under permission_name</p> <p dir="auto">not sure if this is related, but i can see this change in 2.1.0<br> <a href="https://github.com/apache/airflow/pull/13856/commits">https://github.com/apache/airflow/pull/13856/commits</a></p> <p dir="auto"><strong>What you expected to happen</strong>:<br> Users with Admin role can still fully edit Users view.</p> <p dir="auto"><strong>How to reproduce it</strong>:<br> Best i can say: just upgrade from 2.0.1 to 2.1.0</p>
<p dir="auto"><strong>Apache Airflow version</strong>: 2.1.0</p> <p dir="auto"><strong>Browsers</strong>: Chrome and Firefox</p> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">Before upgrading to 2.1.0</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14293802/120359517-c1ca1100-c2d5-11eb-95ba-58ccc0a3ac37.png"><img src="https://user-images.githubusercontent.com/14293802/120359517-c1ca1100-c2d5-11eb-95ba-58ccc0a3ac37.png" alt="before" style="max-width: 100%;"></a></p> <p dir="auto">After upgrading to 2.1.0</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/14293802/120359528-c4c50180-c2d5-11eb-8e04-f34846ea2736.png"><img src="https://user-images.githubusercontent.com/14293802/120359528-c4c50180-c2d5-11eb-8e04-f34846ea2736.png" alt="after" style="max-width: 100%;"></a></p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">Show/Edit/Delete under Security -&gt; Users are available</p> <p dir="auto"><strong>How to reproduce it</strong>:</p> <p dir="auto">Go to Security -&gt; Users (as an admin of course)</p>
1
<p dir="auto">If you know how to fix the issue, make a pull request instead.</p> <ul class="contains-task-list"> <li>[x ] I tried using the <code class="notranslate">@types/node</code> package and had problems.</li> <li>[ x] I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li>[ x] <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jkomyno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jkomyno">@jkomyno</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-tarasyuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-tarasyuk">@a-tarasyuk</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/r3nya/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/r3nya">@r3nya</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BrentDouglas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BrentDouglas">@BrentDouglas</a></li> </ul> </li> </ul> <p dir="auto">If you do not mention the authors the issue will be ignored.</p> <p dir="auto">I'm seeing the below issue pop up now that a new package (13.13.1) was released 4 hours ago. These types seem to be a dependency for a lot of the packages that I'm using in my project. Itw as working before, but then I just did a clean build of my project and it upgraded the package.</p> <p dir="auto">There are many many more authors on this module - please feel free to tag the appropriate party.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in .../node_modules/@types/node/globals.d.ts(1075,15): TS2430: Interface 'Require' incorrectly extends interface 'RequireFunction'. Types of property 'cache' are incompatible. Type 'Dict&lt;NodeModule&gt;' is not assignable to type '{ [id: string]: NodeModule; }'. Index signatures are incompatible. Type 'NodeModule | undefined' is not assignable to type 'NodeModule'. Type 'undefined' is not assignable to type 'NodeModule'."><pre class="notranslate"><code class="notranslate">ERROR in .../node_modules/@types/node/globals.d.ts(1075,15): TS2430: Interface 'Require' incorrectly extends interface 'RequireFunction'. Types of property 'cache' are incompatible. Type 'Dict&lt;NodeModule&gt;' is not assignable to type '{ [id: string]: NodeModule; }'. Index signatures are incompatible. Type 'NodeModule | undefined' is not assignable to type 'NodeModule'. Type 'undefined' is not assignable to type 'NodeModule'. </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond. <ul dir="auto"> <li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bczengel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bczengel">@bczengel</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/chrootsu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/chrootsu">@chrootsu</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stepancar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stepancar">@stepancar</a></li> </ul> </li> </ul> <p dir="auto">The following code:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="studentSolutionGroups[index] = { ...group, solutions: uniqBy(group.solutions), };"><pre class="notranslate"><span class="pl-s1">studentSolutionGroups</span><span class="pl-kos">[</span><span class="pl-s1">index</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> ...<span class="pl-s1">group</span><span class="pl-kos">,</span> <span class="pl-c1">solutions</span>: <span class="pl-en">uniqBy</span><span class="pl-kos">(</span><span class="pl-s1">group</span><span class="pl-kos">.</span><span class="pl-c1">solutions</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Generates the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TS2554: Expected 2 arguments, but got 1. array.d.ts(1723, 54): An argument for 'iteratee' was not provided"><pre class="notranslate"><code class="notranslate">TS2554: Expected 2 arguments, but got 1. array.d.ts(1723, 54): An argument for 'iteratee' was not provided </code></pre></div> <p dir="auto"><strong>But the <code class="notranslate">iteratee</code> should be optional.</strong></p> <blockquote> <p dir="auto">[iteratee=_.identity] (Function): The iteratee invoked per element.</p> </blockquote> <p dir="auto">Doc: <a href="https://lodash.com/docs/4.17.15#uniqBy" rel="nofollow">https://lodash.com/docs/4.17.15#uniqBy</a></p> <hr> <p dir="auto">index.d.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Type definitions for lodash.uniqBy 4.7 // Project: https://lodash.com // Definitions by: Brian Zengel &lt;https://github.com/bczengel&gt;, Ilya Mochalov &lt;https://github.com/chrootsu&gt;, Stepan Mikhaylyuk &lt;https://github.com/stepancar&gt; // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 // Generated from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/lodash/scripts/generate-modules.ts import { uniqBy } from &quot;lodash&quot;; export = uniqBy; "><pre class="notranslate"><span class="pl-c">// Type definitions for lodash.uniqBy 4.7</span> <span class="pl-c">// Project: https://lodash.com</span> <span class="pl-c">// Definitions by: Brian Zengel &lt;https://github.com/bczengel&gt;, Ilya Mochalov &lt;https://github.com/chrootsu&gt;, Stepan Mikhaylyuk &lt;https://github.com/stepancar&gt;</span> <span class="pl-c">// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped</span> <span class="pl-c">// TypeScript Version: 2.8</span> <span class="pl-c">// Generated from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/lodash/scripts/generate-modules.ts</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">uniqBy</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"lodash"</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-c1">=</span> <span class="pl-s1">uniqBy</span><span class="pl-kos">;</span></pre></div> <p dir="auto">@types/lodash/common/array.d.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" interface LoDashStatic { /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. The iteratee is invoked with one argument: (value). * * @category Array * @param array The array to inspect. * @param [iteratee=_.identity] The iteratee invoked per element. * @returns Returns the new duplicate free array. * @example * * _.uniqBy([2.1, 1.2, 2.3], Math.floor); * // =&gt; [2.1, 1.2] * * // using the `_.property` iteratee shorthand * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // =&gt; [{ 'x': 1 }, { 'x': 2 }] */ uniqBy&lt;T&gt;( array: List&lt;T&gt; | null | undefined, iteratee: ValueIteratee&lt;T&gt; ): T[]; }"><pre class="notranslate"> <span class="pl-k">interface</span> <span class="pl-smi">LoDashStatic</span> <span class="pl-kos">{</span> <span class="pl-c">/**</span> <span class="pl-c"> * This method is like `_.uniq` except that it accepts `iteratee` which is</span> <span class="pl-c"> * invoked for each element in `array` to generate the criterion by which</span> <span class="pl-c"> * uniqueness is computed. The iteratee is invoked with one argument: (value).</span> <span class="pl-c"> *</span> <span class="pl-c"> * <span class="pl-k">@category</span> Array</span> <span class="pl-c"> * <span class="pl-k">@param</span> array The array to inspect.</span> <span class="pl-c"> * <span class="pl-k">@param</span> [iteratee=_.identity] The iteratee invoked per element.</span> <span class="pl-c"> * <span class="pl-k">@returns</span> Returns the new duplicate free array.</span> <span class="pl-c"> * <span class="pl-k">@example</span></span> <span class="pl-c"> *</span> <span class="pl-c"> * _.uniqBy([2.1, 1.2, 2.3], Math.floor);</span> <span class="pl-c"> * // =&gt; [2.1, 1.2]</span> <span class="pl-c"> *</span> <span class="pl-c"> * // using the `_.property` iteratee shorthand</span> <span class="pl-c"> * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');</span> <span class="pl-c"> * // =&gt; [{ 'x': 1 }, { 'x': 2 }]</span> <span class="pl-c"> */</span> <span class="pl-c1">uniqBy</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span> <span class="pl-s1">array</span>: <span class="pl-smi">List</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span> <span class="pl-c1">|</span> <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-s1">iteratee</span>: <span class="pl-smi">ValueIteratee</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
0
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No</li> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10</li> <li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A</li> <li>TensorFlow installed from (source or binary): binary</li> <li>TensorFlow version (use command below): 1.12</li> <li>Python version: 3.6.5</li> <li>Bazel version (if compiling from source): N/A</li> <li>GCC/Compiler version (if compiling from source): N/A</li> <li>CUDA/cuDNN version: N/A</li> <li>GPU model and memory: N/A</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> Running below code that I found in many pages on the net, I faced some problems:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import json import os import tensorflow as tf from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets data_dir = '.\\MNIST_data' log_dir = '.\log_dist' batch_size = 512 tf.logging.set_verbosity(tf.logging.INFO) def keras_model(lr, decay): &quot;&quot;&quot;Return a CNN Keras model&quot;&quot;&quot; input_tensor = tf.keras.layers.Input(shape=(784,), name='input') temp = tf.keras.layers.Reshape([28, 28, 1], name='input_image')(input_tensor) for i, n_units in enumerate([32, 64]): temp = tf.keras.layers.Conv2D(n_units, kernel_size=3, strides=(2, 2), activation='relu', name='cnn'+str(i))(temp) temp = tf.keras.layers.Dropout(0.5, name='dropout'+str(i))(temp) temp = tf.keras.layers.GlobalAvgPool2D(name='average')(temp) output = tf.keras.layers.Dense(10, activation='softmax', name='output')(temp) model = tf.keras.models.Model(inputs=input_tensor, outputs=output) optimizer = tf.keras.optimizers.Adam(lr=lr, decay=decay) model.compile(optimizer=optimizer, loss='sparse_categorical_crossentropy', metrics=['accuracy']) print(model.summary()) return model def main(): &quot;&quot;&quot;Main function&quot;&quot;&quot; data = read_data_sets(data_dir, one_hot=False, fake_data=False) model = keras_model(lr=0.001, decay=0.001) config = tf.estimator.RunConfig( model_dir=log_dir, save_summary_steps=1, save_checkpoints_steps=100) estimator = tf.keras.estimator.model_to_estimator(model, model_dir=log_dir, config=config) train_input_fn = tf.estimator.inputs.numpy_input_fn( x={'input': data.train.images}, y=data.train.labels, num_epochs=None, # run forever batch_size=batch_size, shuffle=True) eval_input_fn = tf.estimator.inputs.numpy_input_fn( x={'input': data.test.images}, y=data.test.labels, num_epochs=1, shuffle=False) train_spec = tf.estimator.TrainSpec(input_fn=train_input_fn, max_steps=2000) eval_spec = tf.estimator.EvalSpec(input_fn=eval_input_fn, #throttle_secs=1, steps=None # until the end of evaluation data ) evaluate_result = tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec) print(&quot;Evaluation results:&quot;) for key in evaluate_result[0].keys(): print(&quot; {}: {}&quot;.format(key, evaluate_result[0][key]))"><pre class="notranslate"><code class="notranslate">import json import os import tensorflow as tf from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets data_dir = '.\\MNIST_data' log_dir = '.\log_dist' batch_size = 512 tf.logging.set_verbosity(tf.logging.INFO) def keras_model(lr, decay): """Return a CNN Keras model""" input_tensor = tf.keras.layers.Input(shape=(784,), name='input') temp = tf.keras.layers.Reshape([28, 28, 1], name='input_image')(input_tensor) for i, n_units in enumerate([32, 64]): temp = tf.keras.layers.Conv2D(n_units, kernel_size=3, strides=(2, 2), activation='relu', name='cnn'+str(i))(temp) temp = tf.keras.layers.Dropout(0.5, name='dropout'+str(i))(temp) temp = tf.keras.layers.GlobalAvgPool2D(name='average')(temp) output = tf.keras.layers.Dense(10, activation='softmax', name='output')(temp) model = tf.keras.models.Model(inputs=input_tensor, outputs=output) optimizer = tf.keras.optimizers.Adam(lr=lr, decay=decay) model.compile(optimizer=optimizer, loss='sparse_categorical_crossentropy', metrics=['accuracy']) print(model.summary()) return model def main(): """Main function""" data = read_data_sets(data_dir, one_hot=False, fake_data=False) model = keras_model(lr=0.001, decay=0.001) config = tf.estimator.RunConfig( model_dir=log_dir, save_summary_steps=1, save_checkpoints_steps=100) estimator = tf.keras.estimator.model_to_estimator(model, model_dir=log_dir, config=config) train_input_fn = tf.estimator.inputs.numpy_input_fn( x={'input': data.train.images}, y=data.train.labels, num_epochs=None, # run forever batch_size=batch_size, shuffle=True) eval_input_fn = tf.estimator.inputs.numpy_input_fn( x={'input': data.test.images}, y=data.test.labels, num_epochs=1, shuffle=False) train_spec = tf.estimator.TrainSpec(input_fn=train_input_fn, max_steps=2000) eval_spec = tf.estimator.EvalSpec(input_fn=eval_input_fn, #throttle_secs=1, steps=None # until the end of evaluation data ) evaluate_result = tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec) print("Evaluation results:") for key in evaluate_result[0].keys(): print(" {}: {}".format(key, evaluate_result[0][key])) </code></pre></div> <p dir="auto">And then the rest of the code just included the TF_CONFIG definition for chief, worker and ps. I faced below issues:</p> <ul dir="auto"> <li>I was able to run this code on Tensorflow 1.12 but not on Tensorflow 1.13, where I got the error <code class="notranslate">ValueError: Can not squeeze dim[1], expected a dimension of 1, got 10 for 'metrics/acc/remove_squeezable_dimensions/Squeeze' (op: 'Squeeze') with input shapes: [512,10]</code>. What is the reason?</li> <li>I could get evaluation results printed at the end of training when I was running program in non-distributed mode, but I get below error when it tries to print the final evaluation results in distributed mode:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;mnist_estimator.py&quot;, line 81, in &lt;module&gt; main() File &quot;mnist_estimator.py&quot;, line 62, in main for key in evaluate_result[0].keys(): TypeError: 'NoneType' object is not subscriptable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "mnist_estimator.py", line 81, in &lt;module&gt; main() File "mnist_estimator.py", line 62, in main for key in evaluate_result[0].keys(): TypeError: 'NoneType' object is not subscriptable </code></pre></div> <ul dir="auto"> <li>The final loss for distributed learning was higher than non-distributed learning (for the same number of training steps). What can be the reason? Is it the nature of distribution?</li> <li>When running in distributed mode, the chief or worker are not waiting for the other party to start and immediately starts training (when the other party joins they do the task together, though). I thought they should wait for each other to be ready (as it was in my previous experiences with Tensorflow distributed training), isn't it?</li> <li>What I read in Tensorflow-related pages about data-parallelism is that there are the same copies of code for different servers except in assignment in TF_CONFIG. The chief synchronizes the parameters update and parameter servers keeps the parameters, but I don't clearly understand who split the data between different workers. Is there just one copy at the chief server and it will split the data and send batches to the workers, or the workers each have a local copy of data and do the splitting and skip some data themselves?</li> </ul>
<p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes</li> <li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10</li> <li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A</li> <li>TensorFlow installed from (source or binary): binary</li> <li>TensorFlow version (use command below): 1.12 &amp; 1.13</li> <li>Python version: 3.6.5</li> <li>Bazel version (if compiling from source): N/A</li> <li>GCC/Compiler version (if compiling from source): N/A</li> <li>CUDA/cuDNN version: N/A</li> <li>GPU model and memory: N/A</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> I am working on distributed learning in tensorflow through estimators API using below simple code template:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="runConfig = tf.estimator.RunConfig(session_config=config, model_dir=log_dir, save_summary_steps=1, save_checkpoints_steps=train_steps) estimator = tf.keras.estimator.model_to_estimator(model, model_dir=log_dir, config=runConfig) train_spec = tf.estimator.TrainSpec(input_fn=lambda: read_dataset(...), max_steps=...) eval_spec = tf.estimator.EvalSpec(input_fn=lambda: read_dataset(...), start_delay_secs=1, throttle_secs=1, steps=None) tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)"><pre class="notranslate"><code class="notranslate">runConfig = tf.estimator.RunConfig(session_config=config, model_dir=log_dir, save_summary_steps=1, save_checkpoints_steps=train_steps) estimator = tf.keras.estimator.model_to_estimator(model, model_dir=log_dir, config=runConfig) train_spec = tf.estimator.TrainSpec(input_fn=lambda: read_dataset(...), max_steps=...) eval_spec = tf.estimator.EvalSpec(input_fn=lambda: read_dataset(...), start_delay_secs=1, throttle_secs=1, steps=None) tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec) </code></pre></div> <p dir="auto">My model is defined as a simple 2-layer LSTM model in keras, and read_dataset() functions return datasets that I use for training and validation purposes. The training/validation data files and model directory are set in a shared place available to all workers. The whole code is exactly the same for servers (ps, chief, and worker) except the task setting in TF_CONFIG.<br> When I train model in single-worker configuration, the loss graph I see in tensorboard is gradually downward and reasonable.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17579773/65541564-975a6a80-dedb-11e9-9a56-f77d2b5906a8.jpg"><img src="https://user-images.githubusercontent.com/17579773/65541564-975a6a80-dedb-11e9-9a56-f77d2b5906a8.jpg" alt="single" style="max-width: 100%;"></a></p> <p dir="auto">When using two machines of one chief and one worker, the total run time is less (as expected) but the loss graph is very noisy and higher than single-server case.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/17579773/65541692-d092da80-dedb-11e9-96bc-a3a3b0f0d92e.jpg"><img src="https://user-images.githubusercontent.com/17579773/65541692-d092da80-dedb-11e9-96bc-a3a3b0f0d92e.jpg" alt="double" style="max-width: 100%;"></a></p> <p dir="auto">I expected to see the same performance in both cases, but it seems that training in the second server ruins the situation. Is there any special provision/setting/additional code that I should include in my work?</p>
1
<h1 dir="auto">Bug report</h1> <p dir="auto">We have a multi-page website that uses Webpack v4. Some pages have entry files. All pages have UI that needs JS to run.</p> <p dir="auto">In the past, we have had an entry that acts as a global JS initializer. This contains code for the site navigation, modernizr, and other global utilities. This is site level, consider it page agnostic code.</p> <p dir="auto">Additionally, we have entries for some pages that have additional JS driven UI. The entry files are not mapped to all pages though, so some pages will not have an entry.</p> <p dir="auto">When we build our &lt;script&gt; tags, we used to do something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;script src='global.bundle.js' /&gt; &lt;script src='mypage.bundle.js' /&gt;"><pre class="notranslate"><code class="notranslate">&lt;script src='global.bundle.js' /&gt; &lt;script src='mypage.bundle.js' /&gt; </code></pre></div> <p dir="auto">Stack Overflow discussion here: <a href="https://stackoverflow.com/questions/54795391/webpack-v4-with-multiple-entries-on-a-single-page-chunks-are-duplicated-unneces?noredirect=1" rel="nofollow">https://stackoverflow.com/questions/54795391/webpack-v4-with-multiple-entries-on-a-single-page-chunks-are-duplicated-unneces?noredirect=1</a></p> <p dir="auto"><strong>What is the current behavior?</strong><br> We are encountering a bug in Webpack v4 where chunks that are shared between <strong>global</strong> and <strong>mypage</strong> are redundantly included in each bundle. Webpack is not aware that these files exist on the same page together, so it treats them as if they do not have access to eachother. We have been unable to locate a configuration that creates this link.</p> <p dir="auto">We need this link because we cannot make an entry for each page that imports an init file from <strong>global.js</strong>, and even if we could, it would cause unnecessary overhead. A clear separation of concerns is ideal, where global actions and page-specific actions live in different files and do not reference each other.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br> Create a config with more than one entry, and include both in the same page. Add some imports to files that are used on both entries. Analyze the bundle and you'll find the same chunks in both files.</p> <p dir="auto">Example config file here: <a href="https://gist.github.com/lostPixels/fef3f0cc4a3e99bf526249c605c2096f">https://gist.github.com/lostPixels/fef3f0cc4a3e99bf526249c605c2096f</a></p> <p dir="auto"><strong>What is the expected behavior?</strong><br> Webpack should optimize the entries to include only one chunk, and share it across multiple entries that live together in one HTML document. The config should offer a way to describe these connections, and not assume that a page can only contain one entry file.</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 4.28.4<br> Node.js version: 9.3.0<br> Operating System: OSX<br> Additional tools: Salesforce Commerce Cloud Ecommerce platform</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/niieani/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/niieani">@niieani</a></p> <ul class="contains-task-list"> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">afterAll</code> and <code class="notranslate">beforeAll</code> are called even if the test cases are skipped</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> running test suites with all test cases skipped takes very long time</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">yarn test:integration -t runtime-chunk --watch</code> on node.js v10.0.0 (windows) causes this:</p> </li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[6904]: src\fs_event_wrap.cc:90: Assertion `wrap != nullptr' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: node::Start 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::Object::ToInt32 8: v8::internal::Object::GetProperty 9: v8::internal::NativesCollection&lt;0&gt;::GetScriptsSource 10: v8::internal::NativesCollection&lt;0&gt;::GetScriptsSource 11: 0000022CAD704281 error Command failed with exit code 134."><pre class="notranslate"><code class="notranslate">[6904]: src\fs_event_wrap.cc:90: Assertion `wrap != nullptr' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: node::Start 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::Object::ToInt32 8: v8::internal::Object::GetProperty 9: v8::internal::NativesCollection&lt;0&gt;::GetScriptsSource 10: v8::internal::NativesCollection&lt;0&gt;::GetScriptsSource 11: 0000022CAD704281 error Command failed with exit code 134. </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> The WatchDetection suite cause jest crashing in watch mode</li> </ul> <p dir="auto">Investigation: When running jest in watch mode and running the WatchDetection test, sane emits EPERM errors on windows. <code class="notranslate">sane</code> doesn't seem to check the ignore list when directories are added (<a href="https://github.com/amasad/sane/blob/master/src/node_watcher.js#L310">https://github.com/amasad/sane/blob/master/src/node_watcher.js#L310</a>) and reading the stats from a removed file seem to cause an EPERM error here (<a href="https://github.com/amasad/sane/blob/master/src/node_watcher.js#L306">https://github.com/amasad/sane/blob/master/src/node_watcher.js#L306</a>). I believe it's an sane issue. Although it would also be great if watcher errors would be catched (via <code class="notranslate">watcher.on("error")</code>) in jest-haste-map.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="events.js:183 throw er; // Unhandled 'error' event ^ Error: EPERM: operation not permitted, lstat 'D:\Repos\webpack\test\fixtures\temp-1600\file2.js' error Command failed with exit code 1."><pre class="notranslate"><code class="notranslate">events.js:183 throw er; // Unhandled 'error' event ^ Error: EPERM: operation not permitted, lstat 'D:\Repos\webpack\test\fixtures\temp-1600\file2.js' error Command failed with exit code 1. </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> random error in watch mode, occurred only once</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\Repos\webpack\node_modules\jest-runtime\build\index.js:581 const wrapper = this._environment.runScript(transformedFile.script)[ ^ TypeError: Cannot read property 'Object.&lt;anonymous&gt;' of null at Runtime._execModule (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:581:72) at Runtime.requireModule (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:365:14) at Runtime.requireModuleOrMock (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:449:19) at readdir (D:\Repos\webpack\node_modules\readdirp\readdirp.js:55:25) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:356:5) at FSWatcher.Object.&lt;anonymous&gt;.NodeFsHandler._handleDir (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:407:18) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:456:19) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:461:16) at D:\Repos\webpack\node_modules\graceful-fs\polyfills.js:287:18 at FSReqWrap.oncomplete (fs.js:153:5)"><pre class="notranslate"><code class="notranslate">D:\Repos\webpack\node_modules\jest-runtime\build\index.js:581 const wrapper = this._environment.runScript(transformedFile.script)[ ^ TypeError: Cannot read property 'Object.&lt;anonymous&gt;' of null at Runtime._execModule (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:581:72) at Runtime.requireModule (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:365:14) at Runtime.requireModuleOrMock (D:\Repos\webpack\node_modules\jest-runtime\build\index.js:449:19) at readdir (D:\Repos\webpack\node_modules\readdirp\readdirp.js:55:25) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:356:5) at FSWatcher.Object.&lt;anonymous&gt;.NodeFsHandler._handleDir (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:407:18) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:456:19) at FSWatcher.&lt;anonymous&gt; (D:\Repos\webpack\node_modules\chokidar\lib\nodefs-handler.js:461:16) at D:\Repos\webpack\node_modules\graceful-fs\polyfills.js:287:18 at FSReqWrap.oncomplete (fs.js:153:5) </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> CI is hanging</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(node:2612) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'spies' of undefined (node:2612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:2612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code."><pre class="notranslate"><code class="notranslate">(node:2612) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'spies' of undefined (node:2612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:2612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. </code></pre></div> <p dir="auto">Could be related to jest-jasmine2...</p> <p dir="auto"><a href="https://travis-ci.org/webpack/webpack/jobs/374782908" rel="nofollow">https://travis-ci.org/webpack/webpack/jobs/374782908</a><br> <a href="https://travis-ci.org/webpack/webpack/jobs/374782909" rel="nofollow">https://travis-ci.org/webpack/webpack/jobs/374782909</a><br> <a href="https://ci.appveyor.com/project/sokra/webpack/build/1.0.7531/job/7m1jbsafpkt4sh5o" rel="nofollow">https://ci.appveyor.com/project/sokra/webpack/build/1.0.7531/job/7m1jbsafpkt4sh5o</a></p> <p dir="auto"><code class="notranslate">forceExit: true</code> didn't help</p> <ul class="contains-task-list"> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> There is no shortcut for <code class="notranslate">--testPathPattern</code> i. e. <code class="notranslate">-p</code> similar to <code class="notranslate">-t</code></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> watch mode with single test suite and a lot of skipped test cases is very spammy</p> </li> </ul> <p dir="auto">Example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn test:integration -t runtime-chunk --watch --testPathPattern ConfigTestCases"><pre class="notranslate"><code class="notranslate">yarn test:integration -t runtime-chunk --watch --testPathPattern ConfigTestCases </code></pre></div> <p dir="auto">Prints:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" PASS test\ConfigTestCases.test.js ConfigTestCases additional-pass simple ○ skipped 1 test async-commons-chunk all-selected ○ skipped 1 test duplicate ○ skipped 1 test existing-name ○ skipped 1 test nested ○ skipped 1 test node ○ skipped 1 test simple ○ skipped 1 test code-generation require-context-id ○ skipped 1 test use-strict ○ skipped 1 test ... (many many lines) runtime-chunk √ runtime-chunk should compile (754ms) exported tests √ should be able to load the split chunk on demand (6ms) runtime-chunk-no-async √ runtime-chunk-no-async should compile (105ms) exported tests √ should compile and evaluate fine target buffer ○ skipped 1 test buffer-default ○ skipped 1 test ... (some more lines)"><pre class="notranslate"><code class="notranslate"> PASS test\ConfigTestCases.test.js ConfigTestCases additional-pass simple ○ skipped 1 test async-commons-chunk all-selected ○ skipped 1 test duplicate ○ skipped 1 test existing-name ○ skipped 1 test nested ○ skipped 1 test node ○ skipped 1 test simple ○ skipped 1 test code-generation require-context-id ○ skipped 1 test use-strict ○ skipped 1 test ... (many many lines) runtime-chunk √ runtime-chunk should compile (754ms) exported tests √ should be able to load the split chunk on demand (6ms) runtime-chunk-no-async √ runtime-chunk-no-async should compile (105ms) exported tests √ should compile and evaluate fine target buffer ○ skipped 1 test buffer-default ○ skipped 1 test ... (some more lines) </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This message appears:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;transformIgnorePatterns&quot;: [ &quot;&lt;rootDir&gt;/&quot; ]"><pre class="notranslate"><code class="notranslate"> "transformIgnorePatterns": [ "&lt;rootDir&gt;/" ] </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[BABEL] Note: The code generator has deoptimised the styling of &quot;/home/travis/build/webpack/webpack/node_modules/text-encoding/lib/encoding-indexes.js&quot; as it exceeds the max of &quot;500KB&quot;."><pre class="notranslate"><code class="notranslate">[BABEL] Note: The code generator has deoptimised the styling of "/home/travis/build/webpack/webpack/node_modules/text-encoding/lib/encoding-indexes.js" as it exceeds the max of "500KB". </code></pre></div>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.6-SNAPSHOT</li> </ul> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" synchronized (parameterClassName.intern()) { CtClass ctClass = null; try {"><pre class="notranslate"> <span class="pl-k">synchronized</span> (<span class="pl-s1">parameterClassName</span>.<span class="pl-en">intern</span>()) { <span class="pl-smi">CtClass</span> <span class="pl-s1">ctClass</span> = <span class="pl-c1">null</span>; <span class="pl-k">try</span> {</pre></div> <p dir="auto"><a href="https://github.com/apache/dubbo/blob/master/dubbo-filter/dubbo-filter-validation/src/main/java/org/apache/dubbo/validation/support/jvalidation/JValidator.java#L135">https://github.com/apache/dubbo/blob/master/dubbo-filter/dubbo-filter-validation/src/main/java/org/apache/dubbo/validation/support/jvalidation/JValidator.java#L135</a></p> <blockquote> <p dir="auto">Code should not synchronize on a variable or field of a boxed type (for example Integer, Boolean) or of type String since it is likely to contain an object that is used throughout the program. For example, Boolean.TRUE holds a single instance that will be used in many places throughout the program: whenever true is autoboxed or a call to Boolean.valueOf is made with true as an argument the same instance of Boolean is returned. It is therefore likely that two classes synchronizing on a field of type Boolean will end up synchronizing on the same object. This may lead to deadlock or threads being blocked unnecessarily.</p> </blockquote> <h3 dir="auto">References</h3> <p dir="auto"><a href="https://wiki.sei.cmu.edu/confluence/display/java/LCK01-J.+Do+not+synchronize+on+objects+that+may+be+reused" rel="nofollow">https://wiki.sei.cmu.edu/confluence/display/java/LCK01-J.+Do+not+synchronize+on+objects+that+may+be+reused</a><br> <a href="https://cwe.mitre.org/data/definitions/662.html" rel="nofollow">https://cwe.mitre.org/data/definitions/662.html</a></p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.X</li> <li>Operating System version: win10</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>dubbo method A B C on different dubbo server</li> <li>A call B, B call C</li> <li>In B MonitorFilter.MonitorListener.onResponse RpcContext.getContext().getRemoteHost() is null</li> </ol> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <p dir="auto">RpcContext.getContext().getRemoteHost() is not null</p> <h3 dir="auto">Actual Result</h3> <p dir="auto">RpcContext.getContext().getRemoteHost() is null</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/6637227/68356710-00c1d000-014e-11ea-972a-db2bb4a75a3d.png"><img src="https://user-images.githubusercontent.com/6637227/68356710-00c1d000-014e-11ea-972a-db2bb4a75a3d.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">Hi, I would like to have an option to be able to add an apiPort, same as baseUrl to playwright.config what could possibly improve the way I can manage the projects - also helping to handle api testing.</p>
<p dir="auto">Let us know what functionality you'd like to see in Playwright and what your use case is.<br> Do you think others might benefit from this as well? <strong>Yes</strong></p> <p dir="auto">From time to time, we like to test our API as well with Playwright. Sometimes the format is different from the baseUrl, that's why an <code class="notranslate">apiEndpoint</code> might be beneficial. Of course, there are some workarounds, but they are less neath than how baseUrl works. (and <code class="notranslate">apiEndpoint</code> should work)</p> <p dir="auto">My example: (is configured as baseUrl)<br> Web application URL: <code class="notranslate">https://practicesoftwaretesting.com</code></p> <p dir="auto">API endpoint: <code class="notranslate">https://api.practicesoftwaretesting.com</code></p> <p dir="auto">The various API request function should try to get the value of <code class="notranslate">apiEndpoint</code> first and then append what is left.. ( similar to <code class="notranslate">.goto()</code>)</p> <p dir="auto">Responds with a thumbs up if you like this addition.</p>
1
<p dir="auto">When running the following query:</p> <div class="highlight highlight-source-cypher notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="FOREACH ( n0 IN [] | CREATE ()&lt;-[x:A]-(), ({n1:endNode(x).n2}) )"><pre class="notranslate"><span class="pl-k">FOREACH</span> ( <span class="pl-smi">n0</span> <span class="pl-k">IN</span> [] | <span class="pl-k">CREATE</span> ()<span class="pl-c1">&lt;-</span><span class="pl-k">[</span><span class="pl-smi">x</span><span class="pl-en"><span class="pl-k">:</span><span class="pl-en">A</span></span><span class="pl-k">]</span><span class="pl-c1">-</span>(), (<span class="pl-s1"><span class="pl-k">{</span><span class="pl-smi">n1</span><span class="pl-k">:</span><span class="pl-smi">endNode</span>(<span class="pl-smi">x</span>).<span class="pl-smi">n2</span><span class="pl-k">}</span></span>) )</pre></div> <p dir="auto">I encountered the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Neo4jError: Neo.DatabaseError.Statement.ExecutionFailed (Index 3 out of bounds for length 0)"><pre class="notranslate"><code class="notranslate">Neo4jError: Neo.DatabaseError.Statement.ExecutionFailed (Index 3 out of bounds for length 0) </code></pre></div> <p dir="auto">I believe the query mentioned above is semantically and syntactically correct and thus no error should be thrown here.</p> <p dir="auto">I encountered this issue when testing queries against the <strong>Neo4j 5.6.0 enterprise version</strong> in a Docker container running <strong>alpine v.3</strong>.<br> While the error message is similar to the one from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1660869754" data-permission-text="Title is private" data-url="https://github.com/neo4j/neo4j/issues/13129" data-hovercard-type="issue" data-hovercard-url="/neo4j/neo4j/issues/13129/hovercard" href="https://github.com/neo4j/neo4j/issues/13129">#13129</a>, this bug only arises in the enterprise edition, while the one from the mentioned issue only triggers in the community edition.</p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Run the following queries and observe it throws an error:</p> <div class="highlight highlight-source-cypher notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="FOREACH ( n0 IN [] | CREATE ()&lt;-[x:A]-(), ({n1:endNode(x).n2}) )"><pre class="notranslate"><span class="pl-k">FOREACH</span> ( <span class="pl-smi">n0</span> <span class="pl-k">IN</span> [] | <span class="pl-k">CREATE</span> ()<span class="pl-c1">&lt;-</span><span class="pl-k">[</span><span class="pl-smi">x</span><span class="pl-en"><span class="pl-k">:</span><span class="pl-en">A</span></span><span class="pl-k">]</span><span class="pl-c1">-</span>(), (<span class="pl-s1"><span class="pl-k">{</span><span class="pl-smi">n1</span><span class="pl-k">:</span><span class="pl-smi">endNode</span>(<span class="pl-smi">x</span>).<span class="pl-smi">n2</span><span class="pl-k">}</span></span>) )</pre></div> <h3 dir="auto">Expected behavior</h3> <p dir="auto">The query should run successfully</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">The query fails with the error message <code class="notranslate">Neo4jError: Neo.DatabaseError.Statement.ExecutionFailed (Index 3 out of bounds for length 0)</code></p>
<p dir="auto">Attempting to create a uniqueness constraint causes Neo4J to hang.</p> <p dir="auto"><strong>Neo4j Version:</strong> 3.2.6<br> <strong>Operating System:</strong> Ubuntu 16.04<br> <strong>API:</strong> Cypher in web interface, also occurs from Py2Neo</p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>With new, empty graph, enter in web interface<br> <code class="notranslate">CREATE CONSTRAINT ON (book:Book) ASSERT book.isbn IS UNIQUE</code></li> </ol> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Constraint should be created</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">Neo4J server hangs, apparently while trying to create an index. The request, and all other requests in the web interface, are just met with a spinner.<br> From debug.log:</p> <p dir="auto"><code class="notranslate">2017-10-12 13:29:17.245+0000 INFO [o.n.k.i.DiagnosticsManager] --- SERVER STARTED END --- 2017-10-12 13:29:56.701+0000 INFO [o.n.k.i.a.i.IndexPopulationJob] Index population started: [:Book(isbn) [provider: {key=lucene, version=1.0}]] 2017-10-12 13:29:57.088+0000 INFO [o.n.k.i.a.i.IndexPopulationJob] Completed node store scan. Flushing all pending updates. BatchingMultipleIndexPopulator{activeTasks=0, executor=java.util.concurrent.ThreadPoolExecutor@1cf9354b[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], batchedUpdates = [], queuedUpdates = 0} 2017-10-12 13:29:57.088+0000 INFO [o.n.k.i.a.i.IndexPopulationJob] Shutting down executor. BatchingMultipleIndexPopulator{activeTasks=0, executor=java.util.concurrent.ThreadPoolExecutor@1cf9354b[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], batchedUpdates = [], queuedUpdates = 0} 2017-10-12 13:51:15.551+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by scheduler for time threshold [4]: Starting check pointing... 2017-10-12 13:51:15.552+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by scheduler for time threshold [4]: Starting store flush...</code></p> <p dir="auto">Discussed on <a href="https://stackoverflow.com/questions/46710894/uniqueness-constraint-causes-neo4j-to-hang" rel="nofollow">stackoverflow</a></p>
0
<p dir="auto">I did some work in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="189329851" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/259" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/259/hovercard" href="https://github.com/vercel/next.js/pull/259">#259</a> in prep for this, e.g., pulling in <code class="notranslate">cross-env</code> and removing a few <code class="notranslate">&amp;&amp;</code> operators. There's probably a bit more work to be done, but it would be lovely to have this framework support Windows users.</p>
<p dir="auto">Repo will add CI for automatic testing when have new pull request ?</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7(dev-metadata)</li> <li>Operating System version: Mac</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ReferenceConfig&lt;GenericService&gt; reference = new ReferenceConfig&lt;&gt;(); reference.setGeneric(true); RegistryConfig registryConfig = new RegistryConfig(); registryConfig.setAddress(registry.getUrl().getProtocol() + &quot;://&quot; + registry.getUrl().getAddress()); ApplicationConfig applicationConfig = new ApplicationConfig(); applicationConfig.setName(&quot;dubbo-admin&quot;); applicationConfig.setRegistry(registryConfig); reference.setApplication(applicationConfig); reference.setInterface(service); GenericService genericService = reference.get(); return genericService.$invoke(method, parameterTypes, params);"><pre class="notranslate"><span class="pl-smi">ReferenceConfig</span>&lt;<span class="pl-smi">GenericService</span>&gt; <span class="pl-s1">reference</span> = <span class="pl-k">new</span> <span class="pl-smi">ReferenceConfig</span>&lt;&gt;(); <span class="pl-s1">reference</span>.<span class="pl-en">setGeneric</span>(<span class="pl-c1">true</span>); <span class="pl-smi">RegistryConfig</span> <span class="pl-s1">registryConfig</span> = <span class="pl-k">new</span> <span class="pl-smi">RegistryConfig</span>(); <span class="pl-s1">registryConfig</span>.<span class="pl-en">setAddress</span>(<span class="pl-s1">registry</span>.<span class="pl-en">getUrl</span>().<span class="pl-en">getProtocol</span>() + <span class="pl-s">"://"</span> + <span class="pl-s1">registry</span>.<span class="pl-en">getUrl</span>().<span class="pl-en">getAddress</span>()); <span class="pl-smi">ApplicationConfig</span> <span class="pl-s1">applicationConfig</span> = <span class="pl-k">new</span> <span class="pl-smi">ApplicationConfig</span>(); <span class="pl-s1">applicationConfig</span>.<span class="pl-en">setName</span>(<span class="pl-s">"dubbo-admin"</span>); <span class="pl-s1">applicationConfig</span>.<span class="pl-en">setRegistry</span>(<span class="pl-s1">registryConfig</span>); <span class="pl-s1">reference</span>.<span class="pl-en">setApplication</span>(<span class="pl-s1">applicationConfig</span>); <span class="pl-s1">reference</span>.<span class="pl-en">setInterface</span>(<span class="pl-s1">service</span>); <span class="pl-smi">GenericService</span> <span class="pl-s1">genericService</span> = <span class="pl-s1">reference</span>.<span class="pl-en">get</span>(); <span class="pl-k">return</span> <span class="pl-s1">genericService</span>.<span class="pl-en">$invoke</span>(<span class="pl-s1">method</span>, <span class="pl-s1">parameterTypes</span>, <span class="pl-s1">params</span>);</pre></div> <h3 dir="auto">Expected Result</h3> <h3 dir="auto">Actual Result</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR handler.CustomExceptionHandler - [DUBBO] [SystemException]Exception:, dubbo version: 2.7.0-SNAPSHOT, current host: 192.168.93.10 org.apache.dubbo.rpc.RpcException: Failed to invoke the method $invoke in the service org.apache.dubbo.rpc.service.GenericService. No provider available for the service org.apache.dubbo.demo.api.DemoService from registry 127.0.0.1:2181 on the consumer 192.168.93.10 using the dubbo version 2.7.0-SNAPSHOT. Please check if the providers have been started and registered. at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:266) at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:57) at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242) at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75) at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:70) at org.apache.dubbo.common.bytecode.proxy0.$invoke(proxy0.java) at org.apache.dubbo.admin.service.impl.GenericServiceImpl.invoke(GenericServiceImpl.java:40) at org.apache.dubbo.admin.controller.ServiceTestController.test(ServiceTestController.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)"><pre class="notranslate"><code class="notranslate">ERROR handler.CustomExceptionHandler - [DUBBO] [SystemException]Exception:, dubbo version: 2.7.0-SNAPSHOT, current host: 192.168.93.10 org.apache.dubbo.rpc.RpcException: Failed to invoke the method $invoke in the service org.apache.dubbo.rpc.service.GenericService. No provider available for the service org.apache.dubbo.demo.api.DemoService from registry 127.0.0.1:2181 on the consumer 192.168.93.10 using the dubbo version 2.7.0-SNAPSHOT. Please check if the providers have been started and registered. at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:266) at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:57) at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:242) at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75) at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:70) at org.apache.dubbo.common.bytecode.proxy0.$invoke(proxy0.java) at org.apache.dubbo.admin.service.impl.GenericServiceImpl.invoke(GenericServiceImpl.java:40) at org.apache.dubbo.admin.controller.ServiceTestController.test(ServiceTestController.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) </code></pre></div>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.4.9</li> <li>Operating System version: Linux</li> <li>Java version: 1.8</li> </ul> <h3 dir="auto">场景</h3> <p dir="auto">现在有3个服务提供者,分别是A、B、C, 消费者D启动,会去链接ABC,由于网络问题,D和A是链接不上的,这个时候会导致项目启动不起来,不知道后续版本有没有优化这里呢</p>
0
<p dir="auto">I'm doing</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" def start_requests(self): while 1: words = read_a_list_wanna_crawl() ips = get_a_ip_list() if words.count() &gt; 0: for _, __ in zip(words, ips): print('do while') yield scrapy.Request(processed_url, self.html_parse, meta={'proxy': ip, ...})"><pre class="notranslate"><code class="notranslate"> def start_requests(self): while 1: words = read_a_list_wanna_crawl() ips = get_a_ip_list() if words.count() &gt; 0: for _, __ in zip(words, ips): print('do while') yield scrapy.Request(processed_url, self.html_parse, meta={'proxy': ip, ...}) </code></pre></div> <p dir="auto">but when len(zip(words, ips)) == 1, scrapy print do while forever(Infinite loop) and never download any requests.<br> but if len(zip(words, ips)) &gt; 1, scrapy will not go in to infinite loop.</p> <p dir="auto">is this a bug? can scrapy handle this?</p> <p dir="auto">ps: (another way to solve this)<br> Is it able to create a fake scrapy.Request() that don't do request but do the callback to finish this kind control flow in scrapy?</p>
<p dir="auto">Hey, I'm wondering what would be the correct way of suspending the crawler in a scenario like this:</p> <ul dir="auto"> <li>Crawl a table page per page</li> <li>Stop once an item on the page has already been processed</li> </ul> <p dir="auto">Let's say I have 5 pages defined in the start_urls, these pages urls look something like:</p> <ul dir="auto"> <li>target.com/list-0</li> <li>target.com/list-50</li> <li>target.com/list-100</li> <li>target.com/list-150</li> <li>target.com/list-200</li> </ul> <p dir="auto">The items on the pages change over time, the number means "0 to 49 most recent", "50 to 99 most recent", and so on.</p> <p dir="auto">Assuming the last processed item is on page 100, should I check for duplicates in the item Pipeline and stop the crawler there? To avoid the older page's items from being processed and not wasting the target's resources.</p>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2753.png">❓</g-emoji> Questions and Help</h2> <h3 dir="auto">Please note that this issue tracker is not a help form and this issue will be closed.</h3> <p dir="auto">We have a set of <a href="https://pytorch.org/resources" rel="nofollow">listed resources available on the website</a>. Our primary means of support is our discussion forum:</p> <ul dir="auto"> <li><a href="https://discuss.pytorch.org/" rel="nofollow">Discussion Forum</a></li> </ul> <p dir="auto">Hi,</p> <p dir="auto">I am building libtorch for windows from build_windows.bat and build_libtorch.py, it stuck over 12 hours without any verbose log from console.</p> <p dir="auto">Is there any log file can help troubleshoot what's the root cause behind this?</p> <p dir="auto">disabling CUDA because NOT USE_CUDA is set<br> -- CuDNN not found. Compiling without CuDNN support<br> disabling ROCM because NOT USE_ROCM is set<br> -- MIOpen not found. Compiling without MIOpen support<br> disabling MKLDNN because USE_MKLDNN is not set<br> -- Performing Test C_HAS_THREAD<br> -- Performing Test C_HAS_THREAD - Success<br> -- don't use NUMA</p>
<p dir="auto">Going through the code, I see there is already support for ROI Pooling CUDA kernels. It would be great to have support for various ROI Pooling operations as easy to add layers to facilitate research in object detection and semantic/instance segmentation.</p> <p dir="auto">Here is a live checklist:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ROI Pooling</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Position Specific ROI Pooling</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ROI Align</li> </ul>
0
<h4 dir="auto">Challenge Name</h4> <p dir="auto">Record Collection</p> <h4 dir="auto">Issue Description</h4> <p dir="auto">If I test by hand updateRecords(5439, "tracks", "Take a Chance on Me"); it wont work, otherwise any other test will work and valid challenge.</p> <p dir="auto">try :</p> <h4 dir="auto">Invalid Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup var collection = { &quot;2548&quot;: { &quot;album&quot;: &quot;Slippery When Wet&quot;, &quot;artist&quot;: &quot;Bon Jovi&quot;, &quot;tracks&quot;: [ &quot;Let It Rock&quot;, &quot;You Give Love a Bad Name&quot; ] }, &quot;2468&quot;: { &quot;album&quot;: &quot;1999&quot;, &quot;artist&quot;: &quot;Prince&quot;, &quot;tracks&quot;: [ &quot;1999&quot;, &quot;Little Red Corvette&quot; ] }, &quot;1245&quot;: { &quot;artist&quot;: &quot;Robert Palmer&quot;, &quot;tracks&quot;: [ ] }, &quot;5439&quot;: { &quot;album&quot;: &quot;ABBA Gold&quot; } }; // Keep a copy of the collection for tests var collectionCopy = JSON.parse(JSON.stringify(collection)); // Only change code below this line function updateRecords(id, prop, value) { if(prop !== &quot;tracks&quot;) { collection[id].tracks = []; collection[id][prop] = value; } else if (value) collection[id].tracks.push(value); if (value === &quot;&quot;) delete collection[id][prop]; return collection; } // Alter values below to test your code updateRecords(5439, &quot;tracks&quot;, &quot;Take a Chance on Me&quot;);"><pre class="notranslate"><span class="pl-c">// Setup</span> <span class="pl-k">var</span> <span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"2548"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"Slippery When Wet"</span><span class="pl-kos">,</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Bon Jovi"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-s">"Let It Rock"</span><span class="pl-kos">,</span> <span class="pl-s">"You Give Love a Bad Name"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"2468"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"1999"</span><span class="pl-kos">,</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Prince"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-s">"1999"</span><span class="pl-kos">,</span> <span class="pl-s">"Little Red Corvette"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"1245"</span>: <span class="pl-kos">{</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Robert Palmer"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"5439"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"ABBA Gold"</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// Keep a copy of the collection for tests</span> <span class="pl-k">var</span> <span class="pl-s1">collectionCopy</span> <span class="pl-c1">=</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">collection</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Only change code below this line</span> <span class="pl-k">function</span> <span class="pl-en">updateRecords</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">,</span> <span class="pl-s1">prop</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">prop</span> <span class="pl-c1">!==</span> <span class="pl-s">"tracks"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">value</span> <span class="pl-c1">===</span> <span class="pl-s">""</span><span class="pl-kos">)</span> <span class="pl-k">delete</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">collection</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// Alter values below to test your code</span> <span class="pl-en">updateRecords</span><span class="pl-kos">(</span><span class="pl-c1">5439</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span><span class="pl-kos">,</span> <span class="pl-s">"Take a Chance on Me"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Change the calling function, by one of these and it will work and valid :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="updateRecords(5439, &quot;artist&quot;, &quot;ABBA&quot;); updateRecords(2548, &quot;artist&quot;, &quot;&quot;); updateRecords(1245, &quot;tracks&quot;, &quot;Addicted to Love&quot;); updateRecords(2468, &quot;tracks&quot;, &quot;Free&quot;); updateRecords(2548, &quot;tracks&quot;, &quot;&quot;);"><pre class="notranslate"><code class="notranslate">updateRecords(5439, "artist", "ABBA"); updateRecords(2548, "artist", ""); updateRecords(1245, "tracks", "Addicted to Love"); updateRecords(2468, "tracks", "Free"); updateRecords(2548, "tracks", ""); </code></pre></div> <p dir="auto">The solution to the first test :</p> <h4 dir="auto">Valid Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Setup var collection = { &quot;2548&quot;: { &quot;album&quot;: &quot;Slippery When Wet&quot;, &quot;artist&quot;: &quot;Bon Jovi&quot;, &quot;tracks&quot;: [ &quot;Let It Rock&quot;, &quot;You Give Love a Bad Name&quot; ] }, &quot;2468&quot;: { &quot;album&quot;: &quot;1999&quot;, &quot;artist&quot;: &quot;Prince&quot;, &quot;tracks&quot;: [ &quot;1999&quot;, &quot;Little Red Corvette&quot; ] }, &quot;1245&quot;: { &quot;artist&quot;: &quot;Robert Palmer&quot;, &quot;tracks&quot;: [ ] }, &quot;5439&quot;: { &quot;album&quot;: &quot;ABBA Gold&quot; } }; // Keep a copy of the collection for tests var collectionCopy = JSON.parse(JSON.stringify(collection)); // Only change code below this line function updateRecords(id, prop, value) { if(prop !== &quot;tracks&quot;) { collection[id].tracks = []; collection[id][prop] = value; } else if (value) { if (collection[id].hasOwnProperty(&quot;tracks&quot;) === false) collection[id].tracks = []; collection[id].tracks.push(value); } if (value === &quot;&quot;) delete collection[id][prop]; return collection; } // Alter values below to test your code updateRecords(5439, &quot;tracks&quot;, &quot;Take a Chance on Me&quot;);"><pre class="notranslate"><span class="pl-c">// Setup</span> <span class="pl-k">var</span> <span class="pl-s1">collection</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"2548"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"Slippery When Wet"</span><span class="pl-kos">,</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Bon Jovi"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-s">"Let It Rock"</span><span class="pl-kos">,</span> <span class="pl-s">"You Give Love a Bad Name"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"2468"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"1999"</span><span class="pl-kos">,</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Prince"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-s">"1999"</span><span class="pl-kos">,</span> <span class="pl-s">"Little Red Corvette"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"1245"</span>: <span class="pl-kos">{</span> <span class="pl-s">"artist"</span>: <span class="pl-s">"Robert Palmer"</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span>: <span class="pl-kos">[</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"5439"</span>: <span class="pl-kos">{</span> <span class="pl-s">"album"</span>: <span class="pl-s">"ABBA Gold"</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// Keep a copy of the collection for tests</span> <span class="pl-k">var</span> <span class="pl-s1">collectionCopy</span> <span class="pl-c1">=</span> <span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">parse</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">collection</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Only change code below this line</span> <span class="pl-k">function</span> <span class="pl-en">updateRecords</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">,</span> <span class="pl-s1">prop</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">prop</span> <span class="pl-c1">!==</span> <span class="pl-s">"tracks"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">hasOwnProperty</span><span class="pl-kos">(</span><span class="pl-s">"tracks"</span><span class="pl-kos">)</span> <span class="pl-c1">===</span> <span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">value</span> <span class="pl-c1">===</span> <span class="pl-s">""</span><span class="pl-kos">)</span> <span class="pl-k">delete</span> <span class="pl-s1">collection</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">prop</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">collection</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c">// Alter values below to test your code</span> <span class="pl-en">updateRecords</span><span class="pl-kos">(</span><span class="pl-c1">5439</span><span class="pl-kos">,</span> <span class="pl-s">"tracks"</span><span class="pl-kos">,</span> <span class="pl-s">"Take a Chance on Me"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I simply check if tracks exist, otherwise I init.</p> <h3 dir="auto">Possible Cause</h3> <ul dir="auto"> <li>It's maybe during unit-test, tracks is initialized before the test updateRecords(5439, "tracks", "Take a Chance on Me"); I dunno how unit-test work on js.</li> <li>Or maybe the case described is insufficient :</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Origine : If prop does not contain the key &quot;tracks&quot; before you update it, create an empty array before pushing a track to it."><pre class="notranslate"><code class="notranslate">Origine : If prop does not contain the key "tracks" before you update it, create an empty array before pushing a track to it. </code></pre></div> <p dir="auto">If prop contain tracks but tracks isn't init, create an empty array ?</p> <ul dir="auto"> <li>Maybe a strict mode.</li> </ul> <h4 dir="auto">Browser Information</h4> <p dir="auto">In fact is not only me, someone on glitter called my help for this challenge which I already solved and I noticed this test was weird.</p> <ul dir="auto"> <li>Browser Name, Version: Mozilla 47.0</li> <li>Operating System: Windows 7</li> <li>Mobile, Desktop, or Tablet:</li> </ul> <p dir="auto">Hope my information are relevant.<br> Sorry for my bad english, have a nice day.</p>
<p dir="auto">I think it would be better if only the most recent version of a project is shown on one's profile page. Let the discussion begin!</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/10459779/10044696/f2e3a110-61ca-11e5-98f3-0100007b0452.png"><img src="https://cloud.githubusercontent.com/assets/10459779/10044696/f2e3a110-61ca-11e5-98f3-0100007b0452.png" alt="fcc-issue" style="max-width: 100%;"></a></p>
0
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">Whenever I do <code class="notranslate">npm run build</code> it doesn't remove the old files from previous builds inside the .next folder. This eventually causes the <code class="notranslate">.next/server/static/</code> folder to have a lot of folders of the old builds. Is this intended?</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p> <ol dir="auto"> <li><code class="notranslate">npm run build</code></li> <li>Open <code class="notranslate">.next/server/static</code></li> <li><code class="notranslate">npm run build</code> multiple times</li> <li>New folders are generated (with the respective BUILD_ID), but the old folders for the previous builds aren't deleted.</li> <li><code class="notranslate">npm run dev</code></li> <li><code class="notranslate">.next</code> is rebuilt from the ground up, which deletes old builds</li> <li>But if you never <code class="notranslate">npm run dev</code>, the old build folders stay there. Which is usually the case for projects in production servers</li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Old build folders should be deleted right? (on development environments it's okay since <code class="notranslate">npm run dev</code> resets it, but on production environments these folders will start to pile up)</p> <p dir="auto">I just checked one of my servers and saw a bunch of these unnecessary folders. In this server i would <code class="notranslate">git pull</code>, <code class="notranslate">npm run build &amp;&amp; pm2 restart [pm2 name]</code>. So it eventually accumulated a bunch of these</p> <h2 dir="auto">Screenshots</h2> <p dir="auto">All the previous builds are still in the folder, <code class="notranslate">XB7kfZi8MyFj3pO7k5iSZ</code> is the current build as seen in the <code class="notranslate">BUILD_ID</code> file</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/12690211/61912865-1d643000-aef0-11e9-8282-392dee08d042.png"><img src="https://user-images.githubusercontent.com/12690211/61912865-1d643000-aef0-11e9-8282-392dee08d042.png" alt="Screen Shot 2019-07-25 at 3 22 58 PM" style="max-width: 100%;"></a></p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: macOS</li> <li>Version of Next.js: 9.0.0 (also tested on 8.0.3)</li> </ul>
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto"><code class="notranslate">core-js</code> is getting loaded in my bundles, multiple times actually, both in my <code class="notranslate">main.js</code> file and my <code class="notranslate">_app.js</code> file, and I have no use for it.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">It's the default behavior, the default hello-world example should reproduce this.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">There should be a way to get rid of <code class="notranslate">core-js</code> from my bundles, as I don't even need to target old browsers. How do I do that?</p> <p dir="auto">I've tried setting the following <code class="notranslate">.babelrc</code> file and <code class="notranslate">core-js</code> is still getting loaded:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [ [&quot;next/babel&quot;, { &quot;preset-env&quot;: { &quot;useBuiltIns&quot;: false, &quot;targets&quot;: { &quot;chrome&quot;: 76, &quot;node&quot;: 11 } }, &quot;transform-runtime&quot;: { &quot;corejs&quot;: false } }] ] }"><pre class="notranslate">{ <span class="pl-ent">"presets"</span>: [ [<span class="pl-s"><span class="pl-pds">"</span>next/babel<span class="pl-pds">"</span></span>, { <span class="pl-ent">"preset-env"</span>: { <span class="pl-ent">"useBuiltIns"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"targets"</span>: { <span class="pl-ent">"chrome"</span>: <span class="pl-c1">76</span>, <span class="pl-ent">"node"</span>: <span class="pl-c1">11</span> } }, <span class="pl-ent">"transform-runtime"</span>: { <span class="pl-ent">"corejs"</span>: <span class="pl-c1">false</span> } }] ] }</pre></div>
0
<p dir="auto">It appears that when there is a path outside the plotting limits then not all the path coordinates get plotted. When I run the code below with <code class="notranslate">xmax=1.1</code> versus <code class="notranslate">xmax=1.0</code>, the axvspan is plotted wrong in latex. Inspection of the pgf file for the two versions of <code class="notranslate">xmax</code> indicates that a <code class="notranslate">\pgfpathlineto</code> command is missing in the <code class="notranslate">xmax=1.1</code> version. I've traced it to <code class="notranslate">_print_pgf_path()</code> in the backend and the line <code class="notranslate">for points, code in path.iter_segments(transform, clip=clip):</code> which is asking for clipped points.</p> <p dir="auto">Python Code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot([0,1],[0,1],'-k') ax.set_xlim(0,1) ax.axvspan(xmin=0.5, xmax=1.1) fig.savefig('test.pgf')"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot([0,1],[0,1],'-k') ax.set_xlim(0,1) ax.axvspan(xmin=0.5, xmax=1.1) fig.savefig('test.pgf') </code></pre></div> <p dir="auto">Latex code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="\documentclass {article} \usepackage{pgf} \begin{document} \begin{figure} \centering \input{test.pgf} \end{figure} \end{document"><pre class="notranslate"><code class="notranslate">\documentclass {article} \usepackage{pgf} \begin{document} \begin{figure} \centering \input{test.pgf} \end{figure} \end{document </code></pre></div> <p dir="auto">Here is a pic of the result after compiled with latex (pdflatex or xelatex)<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5891255/4724119/c3d70a78-594d-11e4-95d8-6614baccdf02.png"><img src="https://cloud.githubusercontent.com/assets/5891255/4724119/c3d70a78-594d-11e4-95d8-6614baccdf02.png" alt="untitled" style="max-width: 100%;"></a></p> <p dir="auto">However, saving to .pdf produces the right result</p>
<p dir="auto">I have a figure that I need to compile using PGF backend because the \Game symbol is incorrect (another issue will be opened for that problem).</p> <p dir="auto">But when I do, the curves bounding the fill seem to get cropped to the visible window, which breaks the fill, as seen here:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c30e4c2507eb41d2b9af39c3498e3c1ceff40bd238ba3cff7771d24e8b2215ca/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313835393934372f323337323436312f63616666653862362d613833612d313165332d393661312d3666626332366662646566622e6a7067"><img src="https://camo.githubusercontent.com/c30e4c2507eb41d2b9af39c3498e3c1ceff40bd238ba3cff7771d24e8b2215ca/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313835393934372f323337323436312f63616666653862362d613833612d313165332d393661312d3666626332366662646566622e6a7067" alt="ddlabeled" data-canonical-src="https://f.cloud.github.com/assets/1859947/2372461/caffe8b6-a83a-11e3-96a1-6fbc26fbdefb.jpg" style="max-width: 100%;"></a></p> <p dir="auto">When using the other backends, this behavior is not seen, for instance,<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/480383bf0f0f2202e4e70e05ca11e9bd2460ff076f6e5a7cf48e5cc8da6e9734/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313835393934372f323337323437352f65366230386637302d613833612d313165332d396561662d3866313365393838363037372e706e67"><img src="https://camo.githubusercontent.com/480383bf0f0f2202e4e70e05ca11e9bd2460ff076f6e5a7cf48e5cc8da6e9734/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313835393934372f323337323437352f65366230386637302d613833612d313165332d396561662d3866313365393838363037372e706e67" alt="ddlabeled" data-canonical-src="https://f.cloud.github.com/assets/1859947/2372475/e6b08f70-a83a-11e3-9eaf-8f13e9886077.png" style="max-width: 100%;"></a></p>
1
<p dir="auto">On this page, clicking the link <strong>[source]</strong> brings you to a 404 page:<br> <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.trapz.html" rel="nofollow">https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.trapz.html</a></p>
<p dir="auto">I wanted to consult the source code of interpolate univariate at the following link :<br> <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.UnivariateSpline.html#scipy.interpolate.UnivariateSpline" rel="nofollow">http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.UnivariateSpline.html#scipy.interpolate.UnivariateSpline</a></p> <p dir="auto">But the source code gave me a dead link :<br> <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy-interpolate-UnivariateSpline-1.py" rel="nofollow">http://docs.scipy.org/doc/scipy/reference/generated/scipy-interpolate-UnivariateSpline-1.py</a></p>
1
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Since <code class="notranslate">v4.20.0</code> defining an <code class="notranslate">output.library</code> as an Array results in <code class="notranslate">var = undefined</code> without a <code class="notranslate">output.libraryTarget</code>. Also using values of <code class="notranslate">"this"</code> or <code class="notranslate">"window</code> result in similar behavior when <code class="notranslate">output.library</code> is an Array.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// webpack.config.js entry: { main: `./src/main.js` }, output: { library: [ 'BLEEP', 'bloop' ], libraryExport: 'default', path: '/dist/', filename: '[name].js', publicPath: '/' }"><pre class="notranslate"><span class="pl-c">// webpack.config.js</span> entry: <span class="pl-kos">{</span> <span class="pl-c1">main</span>: <span class="pl-s">`./src/main.js`</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">output</span>: <span class="pl-kos">{</span> <span class="pl-c1">library</span>: <span class="pl-kos">[</span> <span class="pl-s">'BLEEP'</span><span class="pl-kos">,</span> <span class="pl-s">'bloop'</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">libraryExport</span>: <span class="pl-s">'default'</span><span class="pl-kos">,</span> <span class="pl-c1">path</span>: <span class="pl-s">'/dist/'</span><span class="pl-kos">,</span> <span class="pl-c1">filename</span>: <span class="pl-s">'[name].js'</span><span class="pl-kos">,</span> <span class="pl-c1">publicPath</span>: <span class="pl-s">'/'</span> <span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// main.js export default () =&gt; { console.log('main bundle'); }"><pre class="notranslate"><span class="pl-c">// main.js</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'main bundle'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">results in</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var undefined = /******/ (function(modules) { // webpackBootstrap"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">undefined</span> <span class="pl-c1">=</span> <span class="pl-c">/******/</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">modules</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// webpackBootstrap</span></pre></div> <p dir="auto">if I add <code class="notranslate">output.libraryTarget = "umd"</code> I get a workable result but since I know this library is only consumed directly from the <code class="notranslate">window</code> it seems like adding extra cruft</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' &amp;&amp; typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' &amp;&amp; define.amd) define([], factory); else if(typeof exports === 'object') exports[&quot;main&quot;] = factory(); else root[&quot;BLEEP&quot;] = root[&quot;BLEEP&quot;] || {}, root[&quot;BLEEP&quot;][&quot;bloop&quot;] = factory(); })(window, function() {"><pre class="notranslate"><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-en">webpackUniversalModuleDefinition</span><span class="pl-kos">(</span><span class="pl-s1">root</span><span class="pl-kos">,</span> <span class="pl-s1">factory</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">exports</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span><span class="pl-kos">)</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">factory</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">define</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">define</span><span class="pl-kos">.</span><span class="pl-c1">amd</span><span class="pl-kos">)</span> <span class="pl-en">define</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">factory</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">exports</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s">"main"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">factory</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-s1">root</span><span class="pl-kos">[</span><span class="pl-s">"BLEEP"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">root</span><span class="pl-kos">[</span><span class="pl-s">"BLEEP"</span><span class="pl-kos">]</span> <span class="pl-c1">||</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">root</span><span class="pl-kos">[</span><span class="pl-s">"BLEEP"</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"bloop"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">factory</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-smi">window</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span></pre></div> <p dir="auto">Specifying an <code class="notranslate">output.libraryTarget = "window"</code> also fails</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="window[undefined] = /******/ (function(modules) { // webpackBootstrap"><pre class="notranslate"><span class="pl-smi">window</span><span class="pl-kos">[</span><span class="pl-c1">undefined</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-c">/******/</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">modules</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// webpackBootstrap</span></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong><br> prior to <code class="notranslate">v4.20.0</code> the generated bundle would contain</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var BLEEP = typeof BLEEP === &quot;object&quot; ? BLEEP : {}; BLEEP[&quot;bloop&quot;] = /******/ (function(modules) { // webpackBootstrap"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-c1">BLEEP</span> <span class="pl-c1">=</span> <span class="pl-k">typeof</span> <span class="pl-c1">BLEEP</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> ? <span class="pl-c1">BLEEP</span> : <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c1">BLEEP</span><span class="pl-kos">[</span><span class="pl-s">"bloop"</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-c">/******/</span> <span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">modules</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// webpackBootstrap</span></pre></div> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: <code class="notranslate">&gt;=4.20.0</code><br> Node.js version: <code class="notranslate">8.10.0</code><br> Operating System: OSX Sierra</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Combination of <code class="notranslate">output.libraryTarget: 'window'</code> and <code class="notranslate">output.library: string[]</code> gives an erroneous rusult:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="window[undefined] = ..."><pre class="notranslate"><code class="notranslate">window[undefined] = ... </code></pre></div> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const config = { mode: 'development', entry: { templates: './tpl.js' }, output: { path: `${__dirname}/build`, filename: '[name].js', library: ['MyLib', '[name]'], libraryTarget: 'window' } };"><pre class="notranslate"><code class="notranslate">const config = { mode: 'development', entry: { templates: './tpl.js' }, output: { path: `${__dirname}/build`, filename: '[name].js', library: ['MyLib', '[name]'], libraryTarget: 'window' } }; </code></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">This config should generate output like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="window[&quot;MyLib&quot;] = window[&quot;MyLib&quot;] || {}; window[&quot;MyLib&quot;][&quot;templates&quot;] = ..."><pre class="notranslate"><code class="notranslate">window["MyLib"] = window["MyLib"] || {}; window["MyLib"]["templates"] = ... </code></pre></div> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 4.20.2<br> Node.js version: v10.7.0<br> Operating System: win10</p> <p dir="auto">Looks like the issue is here: <a href="https://github.com/webpack/webpack/blob/master/lib/LibraryTemplatePlugin.js#L28-L29">https://github.com/webpack/webpack/blob/master/lib/LibraryTemplatePlugin.js#L28-L29</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const accessorAccess = (base, accessor, umdProperty, joinWith = &quot;; &quot;) =&gt; { const normalizedAccessor = typeof accessor === &quot;object&quot; ? accessor[umdProperty] : accessor; const accessors = Array.isArray(normalizedAccessor) ? normalizedAccessor : [normalizedAccessor];"><pre class="notranslate"><code class="notranslate">const accessorAccess = (base, accessor, umdProperty, joinWith = "; ") =&gt; { const normalizedAccessor = typeof accessor === "object" ? accessor[umdProperty] : accessor; const accessors = Array.isArray(normalizedAccessor) ? normalizedAccessor : [normalizedAccessor]; </code></pre></div> <p dir="auto">if <code class="notranslate">accessor</code> parameter is an array it passes the <code class="notranslate">typeof accessor === "object"</code> condition anyway (thanks JS).</p> <p dir="auto">PS.<br> Sorry for not sumbiting a PR - I am not so familar with github processes.</p>
1
<p dir="auto">Bug fixes to <code class="notranslate">Table</code> and <code class="notranslate">TableBody</code> components.</p> <p dir="auto">I have made some bug fixes to <code class="notranslate">v0.20.0</code>, how can I submit them as a PR? There's no base branch for that version.</p> <p dir="auto"><a href="https://github.com/mui-org/material-ui/compare/mui-org:v0.20.0...gknapp:table-select-row-fix">See the code changes</a>.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Two behaviours I observed, and provided fixes for:</p> <ul dir="auto"> <li>Selecting all rows then de-selecting any row, de-selected all rows. Changed so all other rows remain checked (<a href="https://github.com/gknapp/material-ui/commit/9cdd915aa8102a4b589797bd21fdacaf5016dce0">9cdd915</a>)</li> <li>Selecting all rows via the body (not using select all checkbox in header), would not automatically check the 'select all' checkbox when all child rows were selected. Changed so 'select all' checkbox is now checked when all child rows are selected (<a href="https://github.com/gknapp/material-ui/commit/c0068784051a42927e712cfc2880fd2b2f43298f">c006878</a>). <em>I'm not sure if my approach is the best way to address this, as I've added an optional parameter to <code class="notranslate">onRowSelection()</code>, parameters are not documented (see <a href="http://www.material-ui.com/#/components/table" rel="nofollow">table docs</a>).</em></li> </ul> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Described above</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">Described above</p> <h2 dir="auto">Context</h2> <p dir="auto">I noticed these issues when implementing a table view in my UI and needing to use the check boxes for a multi-delete feature.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v0.20.0</td> </tr> <tr> <td>React</td> <td>15.6.2</td> </tr> <tr> <td>browser</td> <td>Chrome 63.0.3239.132</td> </tr> <tr> <td>OS</td> <td>Windows 10 (64-bit)</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">As the title says, adding <code class="notranslate">align-self</code> rule to <code class="notranslate">Grid</code> component like <code class="notranslate">&lt;Grid item={true} alignSelf={'flex-end'} /&gt;</code> would be great =&gt; <a href="https://css-tricks.com/almanac/properties/a/align-self/" rel="nofollow">https://css-tricks.com/almanac/properties/a/align-self/</a></p>
0
<p dir="auto">Suppose we wish to form a prediction by bagging a number of SVCs.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np from sklearn.svm import SVC from sklearn.ensemble import BaggingClassifier # get data feat=np.random.normal(size=(100,2)) lbl=np.random.choice(a=3,p=[.45,.45,.1],size=100,replace=True) wghts=np.ones(shape=(100,)) # fit ensemble bc=BaggingClassifier(base_estimator=SVC(probability=True),n_estimators=10,max_samples=.1) bc=bc.fit(feat,lbl,sample_weight=wghts) # predict pred=bc.predict(feat) # raises Exception"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">svm</span> <span class="pl-k">import</span> <span class="pl-v">SVC</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">ensemble</span> <span class="pl-k">import</span> <span class="pl-v">BaggingClassifier</span> <span class="pl-c"># get data</span> <span class="pl-s1">feat</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-s1">size</span><span class="pl-c1">=</span>(<span class="pl-c1">100</span>,<span class="pl-c1">2</span>)) <span class="pl-s1">lbl</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">choice</span>(<span class="pl-s1">a</span><span class="pl-c1">=</span><span class="pl-c1">3</span>,<span class="pl-s1">p</span><span class="pl-c1">=</span>[<span class="pl-c1">.45</span>,<span class="pl-c1">.45</span>,<span class="pl-c1">.1</span>],<span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">100</span>,<span class="pl-s1">replace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">wghts</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-s1">shape</span><span class="pl-c1">=</span>(<span class="pl-c1">100</span>,)) <span class="pl-c"># fit ensemble</span> <span class="pl-s1">bc</span><span class="pl-c1">=</span><span class="pl-v">BaggingClassifier</span>(<span class="pl-s1">base_estimator</span><span class="pl-c1">=</span><span class="pl-v">SVC</span>(<span class="pl-s1">probability</span><span class="pl-c1">=</span><span class="pl-c1">True</span>),<span class="pl-s1">n_estimators</span><span class="pl-c1">=</span><span class="pl-c1">10</span>,<span class="pl-s1">max_samples</span><span class="pl-c1">=</span><span class="pl-c1">.1</span>) <span class="pl-s1">bc</span><span class="pl-c1">=</span><span class="pl-s1">bc</span>.<span class="pl-en">fit</span>(<span class="pl-s1">feat</span>,<span class="pl-s1">lbl</span>,<span class="pl-s1">sample_weight</span><span class="pl-c1">=</span><span class="pl-s1">wghts</span>) <span class="pl-c"># predict</span> <span class="pl-s1">pred</span><span class="pl-c1">=</span><span class="pl-s1">bc</span>.<span class="pl-en">predict</span>(<span class="pl-s1">feat</span>) <span class="pl-c"># raises Exception</span></pre></div> <p dir="auto">Because the third case has a relatively low probability (10%), some of the bootstrap draws do not contain it. As a result, some SVCs are fitted to 3 classes, and some SVCs are fitted to 2. This is a problem because bc.predict does a simple sum of probabilities across the 100 SVCs, where the number of classes is not always 3. This bug triggers the following error:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ValueError: operands could not be broadcast together with shapes (100,3) (100,2) (100,3)"><pre class="notranslate"><span class="pl-v">ValueError</span>: <span class="pl-s1">operands</span> <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">broadcast</span> <span class="pl-s1">together</span> <span class="pl-k">with</span> <span class="pl-en">shapes</span> (<span class="pl-c1">100</span>,<span class="pl-c1">3</span>) (<span class="pl-c1">100</span>,<span class="pl-c1">2</span>) (<span class="pl-c1">100</span>,<span class="pl-c1">3</span>)</pre></div> <p dir="auto">numpy version 1.11.3<br> sklearn version 0.18.1</p> <p dir="auto">Thank you.</p>
<p dir="auto">Hi,</p> <p dir="auto">The BaggingClassifier does not check if the number of classes of the random drawn samples for one of its estimators matches the number of classes in the dataset, resulting in an error message when its predict method is used:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- Sub-process traceback: --------------------------------------------------------------------------- ValueError Thu Feb 16 11:17:13 2017 PID: 25287 Python 2.7.5: /usr/bin/python ........................................................................... .local/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py in __call__(self=&lt;sklearn.externals.joblib.parallel.BatchedCalls object&gt;) 126 def __init__(self, iterator_slice): 127 self.items = list(iterator_slice) 128 self._size = len(self.items) 129 130 def __call__(self): --&gt; 131 return [func(*args, **kwargs) for func, args, kwargs in self.items] func = &lt;function _parallel_predict_proba&gt; args = ([SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], [array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), 1000) kwargs = {} self.items = [(&lt;function _parallel_predict_proba&gt;, ([SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], [array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), 1000), {})] 132 133 def __len__(self): 134 return self._size 135 ........................................................................... .local/lib/python2.7/site-packages/sklearn/ensemble/bagging.py in _parallel_predict_proba(estimators=[SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], estimators_features=[array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], X=memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), n_classes=1000) 130 for estimator, features in zip(estimators, estimators_features): 131 if hasattr(estimator, &quot;predict_proba&quot;): 132 proba_estimator = estimator.predict_proba(X[:, features]) 133 134 if n_classes == len(estimator.classes_): --&gt; 135 proba += proba_estimator proba = array([[ 0.00130233, 0.00013968, 0.00144125, .... 0.00016293, 0.00010567, 0.00053245]]) proba_estimator = array([[ 1.02577963e-03, 3.75469340e-04, 9....362413e-05, 1.45631109e-04, 3.04322015e-04]]) 136 137 else: 138 proba[:, estimator.classes_] += \ 139 proba_estimator[:, range(len(estimator.classes_))] ValueError: operands could not be broadcast together with shapes (8009,1000) (8009,999) (8009,1000) ___________________________________________________________________________"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- Sub-process traceback: --------------------------------------------------------------------------- ValueError Thu Feb 16 11:17:13 2017 PID: 25287 Python 2.7.5: /usr/bin/python ........................................................................... .local/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py in __call__(self=&lt;sklearn.externals.joblib.parallel.BatchedCalls object&gt;) 126 def __init__(self, iterator_slice): 127 self.items = list(iterator_slice) 128 self._size = len(self.items) 129 130 def __call__(self): --&gt; 131 return [func(*args, **kwargs) for func, args, kwargs in self.items] func = &lt;function _parallel_predict_proba&gt; args = ([SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], [array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), 1000) kwargs = {} self.items = [(&lt;function _parallel_predict_proba&gt;, ([SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], [array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), 1000), {})] 132 133 def __len__(self): 134 return self._size 135 ........................................................................... .local/lib/python2.7/site-packages/sklearn/ensemble/bagging.py in _parallel_predict_proba(estimators=[SVC(C=100, cache_size=200, class_weight=None, co...5695085, shrinking=True, tol=0.001, verbose=10), SVC(C=100, cache_size=200, class_weight=None, co...8919740, shrinking=True, tol=0.001, verbose=10)], estimators_features=[array([ 0, 1, 2, ..., 2045, 2046, 2047]), array([ 0, 1, 2, ..., 2045, 2046, 2047])], X=memmap([[ 1.21488877e-01, -6.84937861e-01, -5...022708e-05, 1.09372859e-06, -8.55540498e-06]]), n_classes=1000) 130 for estimator, features in zip(estimators, estimators_features): 131 if hasattr(estimator, "predict_proba"): 132 proba_estimator = estimator.predict_proba(X[:, features]) 133 134 if n_classes == len(estimator.classes_): --&gt; 135 proba += proba_estimator proba = array([[ 0.00130233, 0.00013968, 0.00144125, .... 0.00016293, 0.00010567, 0.00053245]]) proba_estimator = array([[ 1.02577963e-03, 3.75469340e-04, 9....362413e-05, 1.45631109e-04, 3.04322015e-04]]) 136 137 else: 138 proba[:, estimator.classes_] += \ 139 proba_estimator[:, range(len(estimator.classes_))] ValueError: operands could not be broadcast together with shapes (8009,1000) (8009,999) (8009,1000) ___________________________________________________________________________ </code></pre></div> <p dir="auto">It would be nice to get a warning message, if the number of classes used to train an estimator in the BaggingClassifier would not match the overall number of classes in the trainingsset.</p>
1