text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">Hello,</p> <p dir="auto">I am looking at the gradient computation in Gaussian Process Kernel module. My understanding is that there we are trying to compute <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="a887106cd854ad6ec07494230699608b">$$\partial{K(x,x')}{\partial \theta}$$</math-renderer>, where <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="a887106cd854ad6ec07494230699608b">$$\theta$$</math-renderer> is a hyperparameter. However, I am not sure that is what is computed in the code:</p> <p dir="auto">For example, the ConstantKernel has:<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/scikit-learn/scikit-learn/blob/f339609ab80ee79924cc739edc774182f4870c7c/sklearn/gaussian_process/kernels.py#L1013">scikit-learn/sklearn/gaussian_process/kernels.py</a> </p> <p class="mb-0 color-fg-muted"> Line 1013 in <a data-pjax="true" class="commit-tease-sha" href="/scikit-learn/scikit-learn/commit/f339609ab80ee79924cc739edc774182f4870c7c">f339609</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="L1013" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1013"></td> <td id="LC1013" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">self</span>.<span class="pl-s1">constant_value</span>, </td> </tr> </tbody></table> </div> </div> <br> While I think instead of filling in the constant value, we should fill in just 1.<p></p> <p dir="auto">Another example is the RBF kernel,<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/scikit-learn/scikit-learn/blob/f339609ab80ee79924cc739edc774182f4870c7c/sklearn/gaussian_process/kernels.py#L1232">scikit-learn/sklearn/gaussian_process/kernels.py</a> </p> <p class="mb-0 color-fg-muted"> Line 1232 in <a data-pjax="true" class="commit-tease-sha" href="/scikit-learn/scikit-learn/commit/f339609ab80ee79924cc739edc774182f4870c7c">f339609</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="L1232" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1232"></td> <td id="LC1232" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">elif</span> <span class="pl-c1">not</span> <span class="pl-s1">self</span>.<span class="pl-s1">anisotropic</span> <span class="pl-c1">or</span> <span class="pl-s1">length_scale</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">0</span>] <span class="pl-c1">==</span> <span class="pl-c1">1</span>: </td> </tr> </tbody></table> </div> </div> <br> I think the gradient should be further divided by the <strong>length_scale</strong>.<p></p> <p dir="auto">It seems to me that rather than computing the <strong>gradient</strong>, we are computing <strong>gradient * hyperparameter</strong> here. Am I missing something?</p> <p dir="auto">Thanks!<br> Junteng</p>
<h4 dir="auto">Description</h4> <p dir="auto">As discovered in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208141122" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/8373" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/8373/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/8373">#8373</a>, the docstring states that if <code class="notranslate">eval_gradient</code> is true, the gradient with respect to the kernel hyperparameters is returned, whereas actually it returns the gradient with respect to the log-transformed hyperparameters. As an example:</p> <blockquote> <p dir="auto">Writing the <code class="notranslate">DotProduct</code> kernel as a function of <code class="notranslate">theta</code> instead of <code class="notranslate">sigma_0</code> with <code class="notranslate">sigma_0 = exp(theta)</code> gives us:<br> <code class="notranslate">k(x_i, x_j) = sigma_0 ^ 2 + x_i \cdot x_j = exp(theta) ^ 2 + x_i \cdot x_j = exp(2*theta) + x_i \cdot x_j</code><br> Now the gradient with respect to theta is :<br> <code class="notranslate">2*exp(2*theta) = 2*exp(theta)^2 = 2*\sigma_0^2</code></p> </blockquote>
1
<p dir="auto">Adapting from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121424392" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/6029" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/6029/hovercard" href="https://github.com/microsoft/TypeScript/issues/6029">#6029</a> as an example:.</p> <p dir="auto">Assuming <code class="notranslate">tsd</code> is installed (<code class="notranslate">npm install -g tsd</code>)</p> <p dir="auto">Run</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="`tsd install react-global react-bootstrap --save`"><pre class="notranslate"><span class="pl-s"><span class="pl-pds">`</span>tsd install react-global react-bootstrap --save<span class="pl-pds">`</span></span></pre></div> <ul dir="auto"> <li> <p dir="auto"><code class="notranslate">tsconfig.json</code>:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;compilerOptions&quot;: { &quot;target&quot;: &quot;es5&quot;, &quot;module&quot;: &quot;amd&quot;, &quot;jsx&quot;: &quot;react&quot; }, &quot;compileOnSave&quot;: false, &quot;files&quot;: [ &quot;./main.tsx&quot;, &quot;./typings/tsd.d.ts&quot; ] }"><pre class="notranslate">{ <span class="pl-ent">"compilerOptions"</span>: { <span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es5<span class="pl-pds">"</span></span>, <span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>amd<span class="pl-pds">"</span></span>, <span class="pl-ent">"jsx"</span>: <span class="pl-s"><span class="pl-pds">"</span>react<span class="pl-pds">"</span></span> }, <span class="pl-ent">"compileOnSave"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"files"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>./main.tsx<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>./typings/tsd.d.ts<span class="pl-pds">"</span></span> ] }</pre></div> </li> <li> <p dir="auto"><code class="notranslate">main.tsx</code>:</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as React from 'react'; import { render } from 'react-dom'; import { Button } from 'react-bootstrap'; class App extends React.Component&lt;{}, {}&gt; { render() { return &lt; /*1*/ } } render(&lt;/*2*/ /&gt;, document.getElementsByTagName(&quot;entrypoint&quot;)[0] );"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">render</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-smi">Button</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-bootstrap'</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-smi">App</span> <span class="pl-k">extends</span> <span class="pl-smi">React</span><span class="pl-kos">.</span><span class="pl-c1">Component</span><span class="pl-kos">&lt;</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">&gt;</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-c">/*1*/</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-s1">render</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-c">/*2*/</span> <span class="pl-c1">/</span>&gt;, document.getElementsByTagName<span class="pl-kos">(</span>"entrypoint"<span class="pl-kos">)</span><span class="pl-kos">[</span>0<span class="pl-kos">]</span> <span class="pl-kos">)</span>;</pre></div> </li> </ul> <p dir="auto">Notice that at <code class="notranslate">/*1*/</code> and <code class="notranslate">/*2*/</code>, you'll get <code class="notranslate">App</code>, but not <code class="notranslate">Button</code>.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2932786/9593657/294e292c-5006-11e5-903d-ad9b659d2f47.gif"><img src="https://cloud.githubusercontent.com/assets/2932786/9593657/294e292c-5006-11e5-903d-ad9b659d2f47.gif" alt="jsxcompletionsomitsimport" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">It looks like it's also missing in any other JSX-expression context.</p>
1
<p dir="auto">I've been using zeit's <code class="notranslate">ncc</code> to slim down and build our transpiled APIs into tiny, minified, individual scripts that run without any node_modules present on our servers/containers. It's <strong><em>absolutely</em></strong> fantastic.</p> <p dir="auto">I tried to us ncc w/ NextJS, but probably lack the requisite knowledge of understanding how nextJS builds work, and what is built into the output.</p> <p dir="auto">My goal: A single, transpiled/built file (or set of files w/ an exposed entrypoint script) that I can run without needing node_modules installed/present on my application servers/containers, which I can simply invoke with a command like:<br> <code class="notranslate">"NODE_ENV=production node --require 'dotenv/config' ./dist/index.js"</code></p> <p dir="auto">We use a custom server with our nextJS app, but it's written in vanilla JS, and doesn't require transpilation, webpack, or babel.</p> <p dir="auto">It does, however, have a handful of dependencies including a redis client and express.</p> <p dir="auto">I was thinking that maybe the correct thing to do is use ncc for the server, and <code class="notranslate">next build</code> for the client, and then just runn the ncc'ed server file?</p> <p dir="auto">If someone could point me in the direction of the best resolution, that would sincerely save me days of failed attempts and wasted hours.</p> <p dir="auto">Thank you!! :)</p>
<p dir="auto">Hi, according to the v3-beta docs, next.js support exporting to static html, and apparently also support "dynamic routes". Was wondering if there was some documentation on how to create dynamic routes when exporting static html.</p> <blockquote> <p dir="auto">This is a way to run your Next.js app as a standalone static app without any Node.js server. The export app supports almost every feature of Next.js <strong>including dynamic urls</strong>, prefetching, preloading and dynamic imports.</p> </blockquote> <p dir="auto">I've added this to my <code class="notranslate">next.config.js</code> but it doesn't seem to work.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="exportPathMap: () =&gt; { return { &quot;/&quot;: { page: &quot;/&quot; }, &quot;/account/:id&quot;: { page: &quot;/account&quot; } } }"><pre class="notranslate"><code class="notranslate">exportPathMap: () =&gt; { return { "/": { page: "/" }, "/account/:id": { page: "/account" } } } </code></pre></div> <p dir="auto">I also tried <code class="notranslate">"/account/*"</code>, but no luck. Any help would be greatly appreciated.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul>
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 (<a href="https://www.tensorflow.org/alpha/tutorials/keras/feature_columns" rel="nofollow">https://www.tensorflow.org/alpha/tutorials/keras/feature_columns</a> + model.save + load_model)</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: no</li> <li>TensorFlow installed from (source or binary): binary</li> <li>TensorFlow version (use command below): 2.0.0-alpha0</li> <li>Python version: 3.6.8</li> <li>CUDA/cuDNN version: 10.0.130/7.3.1</li> <li>GPU model and memory: GTX 1060 6GB</li> </ul> <p dir="auto"><strong>Describe the current behavior</strong><br> loading a saved .h5 model which includes a DenseFeatures Layer fails:<br> <code class="notranslate">ValueError: Unknown layer: DenseFeatures</code></p> <p dir="auto"><strong>Describe the expected behavior</strong><br> model is loading</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd # pip install -q tensorflow==2.0.0-alpha0 import tensorflow as tf from tensorflow import feature_column from tensorflow.keras import layers from sklearn.model_selection import train_test_split URL = 'https://storage.googleapis.com/applied-dl/heart.csv' dataframe = pd.read_csv(URL) train, test = train_test_split(dataframe, test_size=0.2) train, val = train_test_split(train, test_size=0.2) # A utility method to create a tf.data dataset from a Pandas Dataframe def df_to_dataset(dataframe, shuffle=True, batch_size=32): dataframe = dataframe.copy() labels = dataframe.pop('target') ds = tf.data.Dataset.from_tensor_slices((dict(dataframe), labels)) if shuffle: ds = ds.shuffle(buffer_size=len(dataframe)) ds = ds.batch(batch_size) return ds feature_columns = [] # numeric cols for header in ['age', 'trestbps', 'chol', 'thalach', 'oldpeak', 'slope', 'ca']: feature_columns.append(feature_column.numeric_column(header)) feature_layer = tf.keras.layers.DenseFeatures(feature_columns) batch_size = 32 train_ds = df_to_dataset(train, batch_size=batch_size) val_ds = df_to_dataset(val, shuffle=False, batch_size=batch_size) test_ds = df_to_dataset(test, shuffle=False, batch_size=batch_size) model = tf.keras.Sequential([ feature_layer, layers.Dense(128, activation='relu'), layers.Dense(128, activation='relu'), layers.Dense(1, activation='sigmoid') ]) model.compile(optimizer='adam', loss='binary_crossentropy') model.fit(train_ds, validation_data=val_ds, epochs=5) model.save('my_model.h5') from tensorflow import keras new_model = keras.models.load_model('my_model.h5')"><pre class="notranslate"><code class="notranslate">import pandas as pd # pip install -q tensorflow==2.0.0-alpha0 import tensorflow as tf from tensorflow import feature_column from tensorflow.keras import layers from sklearn.model_selection import train_test_split URL = 'https://storage.googleapis.com/applied-dl/heart.csv' dataframe = pd.read_csv(URL) train, test = train_test_split(dataframe, test_size=0.2) train, val = train_test_split(train, test_size=0.2) # A utility method to create a tf.data dataset from a Pandas Dataframe def df_to_dataset(dataframe, shuffle=True, batch_size=32): dataframe = dataframe.copy() labels = dataframe.pop('target') ds = tf.data.Dataset.from_tensor_slices((dict(dataframe), labels)) if shuffle: ds = ds.shuffle(buffer_size=len(dataframe)) ds = ds.batch(batch_size) return ds feature_columns = [] # numeric cols for header in ['age', 'trestbps', 'chol', 'thalach', 'oldpeak', 'slope', 'ca']: feature_columns.append(feature_column.numeric_column(header)) feature_layer = tf.keras.layers.DenseFeatures(feature_columns) batch_size = 32 train_ds = df_to_dataset(train, batch_size=batch_size) val_ds = df_to_dataset(val, shuffle=False, batch_size=batch_size) test_ds = df_to_dataset(test, shuffle=False, batch_size=batch_size) model = tf.keras.Sequential([ feature_layer, layers.Dense(128, activation='relu'), layers.Dense(128, activation='relu'), layers.Dense(1, activation='sigmoid') ]) model.compile(optimizer='adam', loss='binary_crossentropy') model.fit(train_ds, validation_data=val_ds, epochs=5) model.save('my_model.h5') from tensorflow import keras new_model = keras.models.load_model('my_model.h5') </code></pre></div> <p dir="auto"><strong>Other info / logs</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;error.py&quot;, line 67, in &lt;module&gt; new_model = keras.models.load_model('my_model.h5') File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py&quot;, line 215, in load_model custom_objects=custom_objects) File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\saving\model_config.py&quot;, line 55, in model_from_config return deserialize(config, custom_objects=custom_objects) File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\layers\serialization.py&quot;, line 95, in deserialize printable_module_name='layer') File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py&quot;, line 192, in deserialize_keras_object list(custom_objects.items()))) File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\engine\sequential.py&quot;, line 351, in from_config custom_objects=custom_objects) File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\layers\serialization.py&quot;, line 95, in deserialize printable_module_name='layer') File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py&quot;, line 181, in deserialize_keras_object config, module_objects, custom_objects, printable_module_name) File &quot;C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py&quot;, line 166, in class_and_config_for_serialized_keras_object raise ValueError('Unknown ' + printable_module_name + ': ' + class_name) ValueError: Unknown layer: DenseFeatures"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "error.py", line 67, in &lt;module&gt; new_model = keras.models.load_model('my_model.h5') File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\saving\hdf5_format.py", line 215, in load_model custom_objects=custom_objects) File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\saving\model_config.py", line 55, in model_from_config return deserialize(config, custom_objects=custom_objects) File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\layers\serialization.py", line 95, in deserialize printable_module_name='layer') File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 192, in deserialize_keras_object list(custom_objects.items()))) File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\engine\sequential.py", line 351, in from_config custom_objects=custom_objects) File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\layers\serialization.py", line 95, in deserialize printable_module_name='layer') File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 181, in deserialize_keras_object config, module_objects, custom_objects, printable_module_name) File "C:\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 166, in class_and_config_for_serialized_keras_object raise ValueError('Unknown ' + printable_module_name + ': ' + class_name) ValueError: Unknown layer: DenseFeatures </code></pre></div>
<p dir="auto">Do we have any options to control the number of threads in TF-Slim both in training and evaluation processes?</p> <p dir="auto">Specifically, I use <a href="https://github.com/pudae/tensorflow-densenet">this network</a> for my classification problem. I changed the evaluation part in a way that runs train and evaluation in parallel like <a href="https://github.com/mnuke/tf-slim-mnist">this code</a>. I can run it on my own CPU without any problem. But I can't execute them on a supercomputer. It seems that it is related to the very large number of threads which are being created by Tensorflow. If the number of threads exceeds the maximum number of threads pre-set in SLURM (= 28) then the job will fail. Since it's unable to create new threads it will end up with error "resource temporarily unavailable".</p> <p dir="auto">This error provided when the code tries to restore parameters from checkpoints. If there is no limitation on the number of threads (like on my pc) it works fine:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INFO:tensorflow:Restoring parameters from ./model.ckpt-0 INFO:tensorflow:Starting evaluation at I tensorflow/core/kernels/logging_ops.cc:79] eval/Accuracy[0] I tensorflow/core/kernels/logging_ops.cc:79] eval/Recall_5[0] INFO:tensorflow:Evaluation [1/60]"><pre class="notranslate"><code class="notranslate">INFO:tensorflow:Restoring parameters from ./model.ckpt-0 INFO:tensorflow:Starting evaluation at I tensorflow/core/kernels/logging_ops.cc:79] eval/Accuracy[0] I tensorflow/core/kernels/logging_ops.cc:79] eval/Recall_5[0] INFO:tensorflow:Evaluation [1/60] </code></pre></div> <p dir="auto">However, when there is a limitation on the number of threads (like SLURM job submission on supercomputers) we get:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INFO:tensorflow:Restoring parameters from ./model.ckpt-0 terminate called after throwing an instance of 'std::system_error' what(): Resource temporarily unavailable"><pre class="notranslate"><code class="notranslate">INFO:tensorflow:Restoring parameters from ./model.ckpt-0 terminate called after throwing an instance of 'std::system_error' what(): Resource temporarily unavailable </code></pre></div> <p dir="auto">I tried to limit the number of CPU threads used by Tensorflow to 1 by creating config like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" FLAGS.num_preprocessing_threads=1 config = tf.ConfigProto() config.intra_op_parallelism_threads = FLAGS.num_preprocessing_threads config.inter_op_parallelism_threads = FLAGS.num_preprocessing_threads slim.evaluation.evaluation_loop( master=FLAGS.master, checkpoint_path=each_ckpt, logdir=FLAGS.eval_dir, num_evals=num_batches, eval_op=list(names_to_updates.values()) + print_ops, variables_to_restore=variables_to_restore, session_config=config)"><pre class="notranslate"><code class="notranslate"> FLAGS.num_preprocessing_threads=1 config = tf.ConfigProto() config.intra_op_parallelism_threads = FLAGS.num_preprocessing_threads config.inter_op_parallelism_threads = FLAGS.num_preprocessing_threads slim.evaluation.evaluation_loop( master=FLAGS.master, checkpoint_path=each_ckpt, logdir=FLAGS.eval_dir, num_evals=num_batches, eval_op=list(names_to_updates.values()) + print_ops, variables_to_restore=variables_to_restore, session_config=config) </code></pre></div> <p dir="auto">But unfortunately, that didn't help. In my opinion, the main problem we are having here is the fact that we are not able to control the number of threads here. Although we set it to 1 with various TF options you can actually see that this job is creating many more threads on the node:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="slurm_script─┬─python───128*[{python}] └─python───8*[{python}]"><pre class="notranslate"><code class="notranslate">slurm_script─┬─python───128*[{python}] └─python───8*[{python}] </code></pre></div> <p dir="auto">Training script is creating 128 threads and evaluation script is creating 8 (both numbers vary over time).</p> <p dir="auto">P.S. I'm using Python 2.7.13 and Tensorflow 1.3.0.</p>
0
<p dir="auto"><strong>Migrated issue, originally created by Stijn van Drongelen (<a href="https://github.com/rhymoid">@rhymoid</a>)</strong></p> <p dir="auto">I programmatically create a bunch of (complex) <code class="notranslate">INSERT ... SELECT</code> statements. I regularly use the pattern</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="target_columns, source_elements = *query_components statement = target_table.insert().from_select( target_columns, select(source_elements).select_from(source_selectable) )"><pre class="notranslate"><code class="notranslate">target_columns, source_elements = *query_components statement = target_table.insert().from_select( target_columns, select(source_elements).select_from(source_selectable) ) </code></pre></div> <p dir="auto">after building <code class="notranslate">query_components</code> and <code class="notranslate">source_selectable</code> from some specification. When I (granted: inadvertedly) had a duplicate column in <code class="notranslate">source_elements</code>, the database complained that there was a mismatch in the numer of columns in the <code class="notranslate">INSERT ... SELECT</code> statement.</p> <p dir="auto">It took me a while to figure out what the problem was, but I've distilled a MVCE that explains my expectations and how they mismatch SQLAlchemy's actual behaviour. I'm not sure what the reasoning behind it is, as having duplicate columns after <code class="notranslate">SELECT</code> isn't semantically wrong. If I wanted to target multiple columns with the same source column, I could of course work around it by labeling every source column, but unlike <code class="notranslate">.alias()</code>, <code class="notranslate">.label()</code> can't be called without an argument (and I'd like to leverage SQLAlchemy's ability to generate fresh names).</p> <p dir="auto">So, in short: simple code may end up generating broken SQL because duplicate columns get dropped by <code class="notranslate">Select</code>. Why does it do that, and how do I generate fresh <code class="notranslate">.label()</code>s if I'd want to work around that for <code class="notranslate">Insert.from_select</code>?</p> <p dir="auto">The problem occurs in 1.0.15, 1.0.17, and 1.1.11.</p> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/4022/sqlalchemy_duplicate_columns_in_select_bug.py">sqlalchemy_duplicate_columns_in_select_bug.py</a></p>
<p dir="auto">Apart from having option to select isolation level, it may come handy to create a transaction in a read only mode. This option is supported on postgres, see <a href="https://www.postgresql.org/docs/current/sql-set-transaction.html" rel="nofollow">https://www.postgresql.org/docs/current/sql-set-transaction.html</a>. I'm not sure about other database backends, but mysql seems to support them as well, see <a href="https://dev.mysql.com/doc/refman/8.0/en/set-transaction.html" rel="nofollow">https://dev.mysql.com/doc/refman/8.0/en/set-transaction.html</a>.</p> <p dir="auto">I suggest to add an optional parameter transaction mode with possible values <code class="notranslate">READ WRITE</code> (default) or <code class="notranslate">READ ONLY</code> to execution options, similarly to isolation level.</p>
0
<p dir="auto">Following the discussion on Slack.</p> <p dir="auto">Currently this works :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; (1:2) - (1.0:2) 0.0:0.0:0.0"><pre class="notranslate"><code class="notranslate">julia&gt; (1:2) - (1.0:2) 0.0:0.0:0.0 </code></pre></div> <p dir="auto">But these operations fail:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; (1:2) - (1:2) ERROR: ArgumentError: step cannot be zero"><pre class="notranslate"><code class="notranslate">julia&gt; (1:2) - (1:2) ERROR: ArgumentError: step cannot be zero </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; (1:1:2) - (1:1:2) ERROR: ArgumentError: step cannot be zero"><pre class="notranslate"><code class="notranslate">julia&gt; (1:1:2) - (1:1:2) ERROR: ArgumentError: step cannot be zero </code></pre></div> <p dir="auto">It would be more consistent to allow them, but then internal design of <code class="notranslate">UnitRange</code> and <code class="notranslate">StepRange</code> would need to change (and a tricky part is that the length can span from <code class="notranslate">0</code> to <code class="notranslate">2^(sizeof(type)*8)</code> which is just one value too much to use the same storage type for values and for length).</p> <p dir="auto">Additionally we have the following problems with ragne:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; a = 2^60 1152921504606846976 julia&gt; a:-a 1152921504606846976:1152921504606846975 julia&gt; BigFloat(a):BigFloat(-a) ERROR: ArgumentError: length cannot be negative, got -2305843009213693951"><pre class="notranslate"><code class="notranslate">julia&gt; a = 2^60 1152921504606846976 julia&gt; a:-a 1152921504606846976:1152921504606846975 julia&gt; BigFloat(a):BigFloat(-a) ERROR: ArgumentError: length cannot be negative, got -2305843009213693951 </code></pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="record_reference_images = true recordpath = &quot;blah&quot; if record_reference_images cd(homedir()) do isdir(dirname(recordpath)) || run(`git clone [email protected]:SimonDanisch/ReferenceImages.git`) isdir(recordpath) &amp;&amp; rm(recordpath) end end"><pre class="notranslate">record_reference_images <span class="pl-k">=</span> <span class="pl-c1">true</span> recordpath <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>blah<span class="pl-pds">"</span></span> <span class="pl-k">if</span> record_reference_images <span class="pl-c1">cd</span>(<span class="pl-c1">homedir</span>()) <span class="pl-k">do</span> <span class="pl-c1">isdir</span>(<span class="pl-c1">dirname</span>(recordpath)) <span class="pl-k">||</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>git clone [email protected]:SimonDanisch/ReferenceImages.git<span class="pl-pds">`</span></span>) <span class="pl-c1">isdir</span>(recordpath) <span class="pl-k">&amp;&amp;</span> <span class="pl-c1">rm</span>(recordpath) <span class="pl-k">end</span> <span class="pl-k">end</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Unreachable reached at 0x7f4bd800eda3 signal (4): Illegal instruction in expression starting at no file:0 cd at ./file.jl:99 unknown function (ip: 0x7f4bd800edc5) jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324 eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:428 eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined] eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:686 jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:799 unknown function (ip: 0xfffffffffffffffe) unknown function (ip: 0x7f4be357ff2f) unknown function (ip: 0x9) jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:808 jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:787 jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622 eval at ./boot.jl:319 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85 macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined] #28 at ./task.jl:259 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1536 [inlined] start_task at /buildworker/worker/package_linux64/build/src/task.c:268 unknown function (ip: 0xffffffffffffffff) Allocations: 263206 (Pool: 263125; Big: 81); GC: 0 Illegal instruction (core dumped)"><pre class="notranslate"><code class="notranslate">Unreachable reached at 0x7f4bd800eda3 signal (4): Illegal instruction in expression starting at no file:0 cd at ./file.jl:99 unknown function (ip: 0x7f4bd800edc5) jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324 eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:428 eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined] eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:686 jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:799 unknown function (ip: 0xfffffffffffffffe) unknown function (ip: 0x7f4be357ff2f) unknown function (ip: 0x9) jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:808 jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:787 jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622 eval at ./boot.jl:319 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85 macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined] #28 at ./task.jl:259 jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182 jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1536 [inlined] start_task at /buildworker/worker/package_linux64/build/src/task.c:268 unknown function (ip: 0xffffffffffffffff) Allocations: 263206 (Pool: 263125; Big: 81); GC: 0 Illegal instruction (core dumped) </code></pre></div> <p dir="auto">Versioninfo:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo() Julia Version 1.0.0 Commit 5d4eaca0c9 (2018-08-08 20:58 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.0 (ORCJIT, skylake)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">versioninfo</span>() Julia Version <span class="pl-c1">1.0</span>.<span class="pl-c1">0</span> Commit <span class="pl-c1">5</span>d4eaca0c9 (<span class="pl-c1">2018</span><span class="pl-k">-</span><span class="pl-c1">08</span><span class="pl-k">-</span><span class="pl-c1">08</span> <span class="pl-c1">20</span><span class="pl-k">:</span><span class="pl-c1">58</span> UTC) Platform Info<span class="pl-k">:</span> OS<span class="pl-k">:</span> Linux (x86_64<span class="pl-k">-</span>pc<span class="pl-k">-</span>linux<span class="pl-k">-</span>gnu) CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i7<span class="pl-k">-</span><span class="pl-c1">8700</span>K CPU @ <span class="pl-c1">3.70</span>GHz WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span> LIBM<span class="pl-k">:</span> libopenlibm LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">6.0</span>.<span class="pl-c1">0</span> (ORCJIT, skylake)</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 checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+">issues list</a><br> for similar or identical feature requests.</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?utf8=%E2%9C%93&amp;q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+">pull requests list</a><br> for existing proposed implementations of this feature.</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 if the same feature was already implemented in the<br> 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">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Brief Summary</h1> <p dir="auto">Forgive me if this is already trivially possible, but the <a href="http://docs.celeryproject.org/en/latest/tutorials/task-cookbook.html#ensuring-a-task-is-only-executed-one-at-a-time" rel="nofollow">docs</a> suggest it isn't.</p> <p dir="auto">For the simplest case, it would be nice to have an option to not allow tasks to overlap per worker i.e. where by <em>simplest case</em> I mean a single instance with one worker running <em>Periodic Tasks</em> for example (non-distributed)</p> <h1 dir="auto">Design</h1> <h2 dir="auto">Architectural Considerations</h2> <p dir="auto">Current behavior would remain default</p> <h2 dir="auto">Proposed Behavior</h2> <p dir="auto">Each worker checks if the task is already running on itself. Exponential backoff comes free?</p> <h2 dir="auto">Proposed UI/UX</h2> <ul dir="auto"> <li>Checkbox on django-celery-beat admin maybe?</li> </ul> <h2 dir="auto">Diagrams</h2> <p dir="auto">N/A</p> <h2 dir="auto">Alternatives</h2> <p dir="auto">Implement locking as per <a href="http://docs.celeryproject.org/en/latest/tutorials/task-cookbook.html#ensuring-a-task-is-only-executed-one-at-a-time" rel="nofollow">http://docs.celeryproject.org/en/latest/tutorials/task-cookbook.html#ensuring-a-task-is-only-executed-one-at-a-time</a>, a heavy burden compared to the proposal.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&amp;q=is%3Aissue+label%3A%22Category%3A+Documentation%22+">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br> (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h1 dir="auto">Description</h1> <p dir="auto">The "first-steps-with-celery" advises to use the following docker command to start RabbitMQ instance:</p> <p dir="auto">docker run -d -p 5462:5462 rabbitmq</p> <p dir="auto">However this won't work, as the default port for rabbit is 5672, not 5462.</p> <h1 dir="auto">Suggestions</h1> <p dir="auto">replace 5462 with 5672.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sbrannen" rel="nofollow">Sam Brannen</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7827?redirect=false" rel="nofollow">SPR-7827</a></strong> and commented</p> <h4 dir="auto">Overview</h4> <p dir="auto">Spring 3.0 already allows component stereotypes to be used in a <em>meta-annotation</em> fashion, for example by creating a custom <code class="notranslate">@TransactionalService</code> stereotype annotation which combines <code class="notranslate">@Transactional</code> and <code class="notranslate">@Service</code> in a single, reusable, application-specific annotation.</p> <p dir="auto">As mentioned in various forums, <a href="https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545" rel="nofollow">a JIRA comment</a>, and discussions I've had with Spring users, it would be beneficial to provide similar <em>meta-annotation</em> support for test-related annotations.</p> <p dir="auto">Given a custom <code class="notranslate">@TransactionalTest</code> stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See <code class="notranslate">UserRepositoryIntegrationTests</code> for an example.</p> <h6 dir="auto">Notes on JUnit</h6> <p dir="auto">Naturally, Spring cannot provide meta-annotation support for JUnit's <code class="notranslate">@RunWith</code> annotation, since <code class="notranslate">@RunWith</code> is processed by JUnit internals. Developers would therefore still be required to specify <code class="notranslate">SpringJUnit4ClassRunner</code> as the runner for each individual test class.</p> <hr> <h4 dir="auto">Deliverables</h4> <p dir="auto">Provide meta-annotation support for the following annotations within the context of the TestContext framework.</p> <ol class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@ContextConfiguration</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@WebAppConfiguration</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@ContextHierarchy</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@ActiveProfiles</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@DirtiesContext</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@TestExecutionListeners</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@IfProfileValue</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@ProfileValueSourceConfiguration</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@Transactional</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@BeforeTransaction</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@AfterTransaction</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@TransactionConfiguration</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@Rollback</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@Repeat</code></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">@Timed</code></li> </ol> <hr> <h4 dir="auto">Code Examples</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Transactional @ContextConfiguration({&quot;/app-config.xml&quot;, &quot;/test-data-access-config.xml&quot;}) public @interface TransactionalTest {}"><pre class="notranslate"><code class="notranslate">@Transactional @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"}) public @interface TransactionalTest {} </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@TransactionalTest @RunWith(SpringJUnit4ClassRunner.class) public class UserRepositoryIntegrationTests { /* ... */ }"><pre class="notranslate"><code class="notranslate">@TransactionalTest @RunWith(SpringJUnit4ClassRunner.class) public class UserRepositoryIntegrationTests { /* ... */ } </code></pre></div> <hr> <h4 dir="auto">Further Resources</h4> <ul dir="auto"> <li>JUnit: <a href="https://github.com/junit-team/junit/issues/194/" data-hovercard-type="issue" data-hovercard-url="/junit-team/junit4/issues/194/hovercard">All JUnit annotations should be able to be applied as meta-annotations</a></li> <li>JUnit: <a href="https://github.com/junit-team/junit/issues/202" data-hovercard-type="issue" data-hovercard-url="/junit-team/junit4/issues/202/hovercard">@RunWith(MetaAnnotations.class)</a></li> </ul> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.5</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="398162999" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15735" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15735/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15735">#15735</a> Document meta-annotation support in the TestContext framework (<em><strong>"is depended on by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398165753" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16081" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16081/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16081">#16081</a> ContextLoader is supplied composed annotation class instead of test class for default resource detection</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398162994" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15734" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15734/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15734">#15734</a> Support composed annotations declared on interfaces</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398162503" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15666" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15666/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15666">#15666</a> Support meta-annotation attribute overrides in the TestContext framework</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/5e7021f3f7775a4382cb9b9d2a3072a40c1b637b/hovercard" href="https://github.com/spring-projects/spring-framework/commit/5e7021f3f7775a4382cb9b9d2a3072a40c1b637b"><tt>5e7021f</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/2bd5a535e1e6dbae83b016376ffe114dc5cb1384/hovercard" href="https://github.com/spring-projects/spring-framework/commit/2bd5a535e1e6dbae83b016376ffe114dc5cb1384"><tt>2bd5a53</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/412f74f679862cd2acc2f1794adcfee2c08b0d3f/hovercard" href="https://github.com/spring-projects/spring-framework/commit/412f74f679862cd2acc2f1794adcfee2c08b0d3f"><tt>412f74f</tt></a></p> <p dir="auto">8 votes, 11 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sgarlatm" rel="nofollow">Matthew Sgarlata</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2233?redirect=false" rel="nofollow">SPR-2233</a></strong> and commented</p> <p dir="auto">Let me preface this by saying I know my use case is an edge case. However, the logging produced at WARN level by DispatcherServlet.noHandlerFound is incorrect for this case and is <strong>very</strong> confusing. Let me just start by saying what the fix is, and then come back to how the problem can be duplicated.</p> <p dir="auto">The current code for the method is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="protected void noHandlerFound(HttpServletRequest request, HttpServletResponse response) throws IOException { if (pageNotFoundLogger.isWarnEnabled()) { pageNotFoundLogger.warn(&quot;No mapping for [&quot; + request.getRequestURI() + &quot;] in DispatcherServlet with name '&quot; + getServletName() + &quot;'&quot;); } response.sendError(HttpServletResponse.SC_NOT_FOUND); }"><pre class="notranslate"><code class="notranslate">protected void noHandlerFound(HttpServletRequest request, HttpServletResponse response) throws IOException { if (pageNotFoundLogger.isWarnEnabled()) { pageNotFoundLogger.warn("No mapping for [" + request.getRequestURI() + "] in DispatcherServlet with name '" + getServletName() + "'"); } response.sendError(HttpServletResponse.SC_NOT_FOUND); } </code></pre></div> <p dir="auto">In the case of a include done with &lt;c:import&gt;, request.getRequestURI() returns the wrong path. UrlPathHelper.getLookupPathForRequest needs to be used to get the correct path.</p> <p dir="auto">Here is my log output from a valid request. In this case, in a JSP called closeDialogRefreshPane.jsp I correctly did a &lt;c:import&gt; to one of my controllers called '/dashboardsNav'</p> <p dir="auto">DEBUG [http-80-Processor24] (DispatcherServlet:doService) - DispatcherServlet with name 'spring' received request for [/scoreboard/common/closeDialogRefreshPane.jsp]<br> DEBUG [http-80-Processor24] (DispatcherServlet:doService) - Taking snapshot of request attributes before include<br> DEBUG [http-80-Processor24] (DispatcherServlet:doDispatch) - Bound request context to thread: org.apache.catalina.core.ApplicationHttpRequest@1f489d9<br> DEBUG [http-80-Processor24] (DispatcherServlet:getHandler) - Testing handler map [org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping@16a346a] in DispatcherServlet with name 'spring'<br> DEBUG [http-80-Processor24] (BeanNameUrlHandlerMapping:getHandlerInternal) - Looking up handler for [/dashboardsNav]<br> DEBUG [http-80-Processor24] (DispatcherServlet:getHandlerAdapter) - Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter@1bd871]<br> DEBUG [http-80-Processor24] (DispatcherServlet:getHandlerAdapter) - Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter@1ba0609]<br> DEBUG [http-80-Processor24] (DispatcherServlet:render) - Rendering view [org.springframework.web.servlet.view.InternalResourceView: name 'dashboardsNavView'; URL [/dashboards/dashboardsNav.jsp]] in DispatcherServlet with name 'spring'</p> <p dir="auto">Here is my log output from an invalid request. I accidentally tried to do a &lt;c:import&gt; from closeDialogRefreshPane.jsp to the view '/calendarsNavView' instead of to my controller called '/calendarsNav':</p> <p dir="auto">DEBUG [http-80-Processor24] (DispatcherServlet:doService) - DispatcherServlet with name 'spring' received request for [/scoreboard/common/closeDialogRefreshPane.jsp]<br> DEBUG [http-80-Processor24] (DispatcherServlet:doService) - Taking snapshot of request attributes before include<br> DEBUG [http-80-Processor24] (DispatcherServlet:doDispatch) - Bound request context to thread: org.apache.catalina.core.ApplicationHttpRequest@1a34544<br> DEBUG [http-80-Processor24] (DispatcherServlet:getHandler) - Testing handler map [org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping@16a346a] in DispatcherServlet with name 'spring'<br> DEBUG [http-80-Processor24] (BeanNameUrlHandlerMapping:getHandlerInternal) - Looking up handler for [/calendarsNavView]<br> WARN [http-80-Processor24] (PageNotFound:noHandlerFound) - No mapping for [/scoreboard/common/closeDialogRefreshPane.jsp] in DispatcherServlet with name 'spring'</p> <p dir="auto">As you can see, the the PageNotFound logger says /common/closeDialogRefreshPane could not be found, when in fact it was already found and dispatched to, at which point an invalid &lt;c:import&gt; call is what's actually screwing things up.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0 RC1</p>
0
<p dir="auto">Have code like this:</p> <p dir="auto">setTimeout(null, () =&gt; {</p> <p dir="auto">});</p> <p dir="auto">Run "Format". The end result is:</p> <p dir="auto">setTimeout(null,() =&gt; {</p> <p dir="auto">});</p> <p dir="auto">There is a whitespace missing between "null" and the lambda.</p>
<p dir="auto">Not sure if it has been reported yet, tried to find similar issues but didn't find anything.</p> <p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.9.0-dev.20160518-1.0</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// A self-contained demonstration of the problem follows... &lt;div name=&quot;test&quot; data=&quot;test&quot; onClick={() =&gt; { }} &gt; &lt;div&gt;test&lt;/div&gt; &lt;/div&gt;"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span> <span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos"></span> <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"test"</span> <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s">"test"</span> <span class="pl-en">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos">&gt;</span><span class="pl-s1">test</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span> <span class="pl-pds"><span class="pl-c1">&lt;</span><span class="pl-c1">/</span>div</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> Same as in example</p> <p dir="auto"><strong>Actual behavior:</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;div name=&quot;test&quot; onClick={() =&gt; { } } data=&quot;test&quot; &gt; &lt;div&gt;test&lt;/div&gt; &lt;/div&gt; "><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos"></span> <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"test"</span> <span class="pl-en">onClick</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s">"test"</span> <span class="pl-c1">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos">&gt;</span><span class="pl-s1">test</span><span class="pl-c1">&lt;</span><span class="pl-pds"><span class="pl-c1">/</span>div&gt;</span> <span class="pl-pds"><span class="pl-c1">&lt;</span><span class="pl-c1">/</span>div</span><span class="pl-c1">&gt;</span></pre></div> <ol dir="auto"> <li>Attributes need to aligned and take indentation from top attribute (name)</li> <li>Closing tag indentation is a bit strange - any way to make it have same indentation level as opening one?</li> </ol>
0
<p dir="auto">I want to sample <code class="notranslate">uint8</code>s uniformly including the maximum value of 255, but this doesn't work:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from jax import random, numpy as jnp random.randint(random.PRNGKey(0), (10,), 0, 256, jnp.uint8) # [0 0 0 0 0 0 0 0 0 0]"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">jax</span> <span class="pl-k">import</span> <span class="pl-s1">random</span>, <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span> <span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-s1">random</span>.<span class="pl-v">PRNGKey</span>(<span class="pl-c1">0</span>), (<span class="pl-c1">10</span>,), <span class="pl-c1">0</span>, <span class="pl-c1">256</span>, <span class="pl-s1">jnp</span>.<span class="pl-s1">uint8</span>) <span class="pl-c"># [0 0 0 0 0 0 0 0 0 0]</span></pre></div> <p dir="auto">The reason is that maxval is converted into the <code class="notranslate">uint8</code>. This is in contrast to</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np np.random.randint(0, 256, (10,), np.uint8) # [197 133 228 202 216 177 116 78 244 176]"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">256</span>, (<span class="pl-c1">10</span>,), <span class="pl-s1">np</span>.<span class="pl-s1">uint8</span>) <span class="pl-c"># [197 133 228 202 216 177 116 78 244 176]</span></pre></div> <p dir="auto">The same happens for all integer datatypes. (Workaround is of course to use a larger type and then cast.)</p>
<p dir="auto">According to randint docstring: <code class="notranslate">Sample uniform random values in [minval, maxval) with given shape/dtype.</code></p> <p dir="auto">However because of the conversion here </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/google/jax/blob/5bbb449ae5849c508194c8eb5b10c101f1fa22ae/jax/_src/random.py#L439">jax/jax/_src/random.py</a> </p> <p class="mb-0 color-fg-muted"> Line 439 in <a data-pjax="true" class="commit-tease-sha" href="/google/jax/commit/5bbb449ae5849c508194c8eb5b10c101f1fa22ae">5bbb449</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="L439" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="439"></td> <td id="LC439" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">maxval</span> <span class="pl-c1">=</span> <span class="pl-s1">lax</span>.<span class="pl-en">convert_element_type</span>(<span class="pl-s1">maxval</span>, <span class="pl-s1">dtype</span>) </td> </tr> </tbody></table> </div> </div> passing <code class="notranslate">maxval={dtype max value + 1}</code> will generate an all-zero array.<br> The behavior in numpy is different (and correct):<p></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256, dtype=jnp.uint8) &gt;&gt; DeviceArray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=uint8) np.random.randint(size=(10,), low=0, high=256, dtype=np.uint8) &gt;&gt; array([ 87, 136, 195, 254, 95, 94, 113, 7, 66, 13], dtype=uint8)"><pre class="notranslate"><code class="notranslate">jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256, dtype=jnp.uint8) &gt;&gt; DeviceArray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=uint8) np.random.randint(size=(10,), low=0, high=256, dtype=np.uint8) &gt;&gt; array([ 87, 136, 195, 254, 95, 94, 113, 7, 66, 13], dtype=uint8) </code></pre></div> <p dir="auto">A workaround is to not pass the dtype to randint (or use a dtype with a higher maximum value), and cast the output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256).astype(jnp.uint8) &gt;&gt; DeviceArray([178, 233, 99, 238, 39, 149, 46, 139, 68, 142], dtype=uint8)"><pre class="notranslate"><code class="notranslate">jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256).astype(jnp.uint8) &gt;&gt; DeviceArray([178, 233, 99, 238, 39, 149, 46, 139, 68, 142], dtype=uint8) </code></pre></div>
1
<p dir="auto">The following example duplicates <code class="notranslate">i</code> declaration.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (let i = 0; i &lt; 5; i++); for (let i = 0; i &lt; 5; i++);"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">But the following doesn't:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (let i = 0; i &lt; 5; i++); for (let i = 0; i &lt; 5; i++); i;"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">5</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I would expect both snippets to produce the same result.</p>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">Spreading an HTMLcollection over an array does not work in iPhone 4s and produces this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]()method."><pre class="notranslate"><code class="notranslate">Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]()method. </code></pre></div> <p dir="auto"><strong>Input Code</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const test = [...document.getElementsByTagName('div'), 'xyz'];"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span>...<span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">getElementsByTagName</span><span class="pl-kos">(</span><span class="pl-s">'div'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s">'xyz'</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Working: Mac browsers (Chrome, Firefox, Safari), Android Chrome (Meizu M5 Note - 2016), and iPhone 8<br> Not working: iPhone 4s (iOS 9) and very likely other old devices</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">It should just work on old devices like the iPhone 4s because new browsers now consider HTML collections as iterables (the fact that they work in most, if not all of, recent browsers).</p> <p dir="auto"><strong>Environment</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" System: OS: macOS 10.15.5 Binaries: Node: 12.13.1 - /usr/local/bin/node npm: 6.14.5 - /usr/local/bin/npm Babel: 7.9.0 Babel preset-env: 7.9.5 - How you are using Babel: [`loader`]"><pre class="notranslate"><code class="notranslate"> System: OS: macOS 10.15.5 Binaries: Node: 12.13.1 - /usr/local/bin/node npm: 6.14.5 - /usr/local/bin/npm Babel: 7.9.0 Babel preset-env: 7.9.5 - How you are using Babel: [`loader`] </code></pre></div>
0
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">[email protected]</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export enum SMTypeEnum { // расположены в порядке возрастания приоритета S, I } type SMItemType = { messageType: SMTypeEnum, description: string, cssClassSuffix: string} export var S_M_TYPES: SMItemType[] = [ {messageType: SMTypeEnum.S, description: &quot;Success&quot;, cssClassSuffix: &quot;success&quot;}, // type: &quot;S&quot; {messageType: SMTypeEnum.I, description: &quot;Info&quot;, cssClassSuffix: &quot;info&quot;}, // type: &quot;I&quot; ]; ..... for (var apm of this.afterPostMessages) { this.maxMessageType = Math.max(this.maxMessageType, SMTypeEnum[apm.msgType]); } "><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">SMTypeEnum</span> <span class="pl-kos">{</span> <span class="pl-c">// расположены в порядке возрастания приоритета</span> <span class="pl-c1">S</span><span class="pl-kos">,</span> <span class="pl-c1">I</span> <span class="pl-kos">}</span> <span class="pl-k">type</span> <span class="pl-smi">SMItemType</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">messageType</span>: <span class="pl-smi">SMTypeEnum</span><span class="pl-kos">,</span> <span class="pl-c1">description</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-c1">cssClassSuffix</span>: <span class="pl-smi">string</span><span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">var</span> <span class="pl-smi">S_M_TYPES</span>: <span class="pl-smi">SMItemType</span><span class="pl-kos">[</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> <span class="pl-kos">{</span><span class="pl-c1">messageType</span>: <span class="pl-smi">SMTypeEnum</span><span class="pl-kos">.</span><span class="pl-c1">S</span><span class="pl-kos">,</span> <span class="pl-c1">description</span>: <span class="pl-s">"Success"</span><span class="pl-kos">,</span> <span class="pl-c1">cssClassSuffix</span>: <span class="pl-s">"success"</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">// type: "S"</span> <span class="pl-kos">{</span><span class="pl-c1">messageType</span>: <span class="pl-smi">SMTypeEnum</span><span class="pl-kos">.</span><span class="pl-c1">I</span><span class="pl-kos">,</span> <span class="pl-c1">description</span>: <span class="pl-s">"Info"</span><span class="pl-kos">,</span> <span class="pl-c1">cssClassSuffix</span>: <span class="pl-s">"info"</span><span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">// type: "I"</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">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">apm</span> <span class="pl-k">of</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">afterPostMessages</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">maxMessageType</span> <span class="pl-c1">=</span> <span class="pl-smi">Math</span><span class="pl-kos">.</span><span class="pl-en">max</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">maxMessageType</span><span class="pl-kos">,</span> <span class="pl-smi">SMTypeEnum</span><span class="pl-kos">[</span><span class="pl-s1">apm</span><span class="pl-kos">.</span><span class="pl-c1">msgType</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:</strong><br> no error<br> <strong>Actual behavior:</strong></p> <p dir="auto">error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" interface A&lt;a&gt; { brand: 'a'; nested: a; } interface B&lt;a&gt; { brand: 'b'; nested: a; } type C&lt;a&gt; = A&lt;a&gt; | B&lt;a&gt;; type D = C&lt;D&gt; | string; // &lt;-- i wish "><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span><span class="pl-c1">&lt;</span><span class="pl-smi">a</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">brand</span>: <span class="pl-s">'a'</span><span class="pl-kos">;</span> <span class="pl-c1">nested</span>: <span class="pl-smi">a</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">interface</span> <span class="pl-smi">B</span><span class="pl-c1">&lt;</span><span class="pl-smi">a</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-c1">brand</span>: <span class="pl-s">'b'</span><span class="pl-kos">;</span> <span class="pl-c1">nested</span>: <span class="pl-smi">a</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">type</span> <span class="pl-smi">C</span><span class="pl-c1">&lt;</span><span class="pl-smi">a</span><span class="pl-c1">&gt;</span> <span class="pl-c1">=</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">a</span><span class="pl-kos">&gt;</span> <span class="pl-c1">|</span> <span class="pl-smi">B</span><span class="pl-kos">&lt;</span><span class="pl-smi">a</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">type</span> <span class="pl-smi">D</span> <span class="pl-c1">=</span> <span class="pl-smi">C</span><span class="pl-kos">&lt;</span><span class="pl-smi">D</span><span class="pl-kos">&gt;</span> <span class="pl-c1">|</span> <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-c">// &lt;-- i wish</span></pre></div>
0
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.10</p> <h2 dir="auto">Problem</h2> <p dir="auto">Sometimes we want to opt-out strict object literal check for a specific property. Some types have large amount or even unlimited number of properties, and we only want to model the most frequently used ones. However when we do use an unmodeled property in an object literal, the compiler complains. E.g.:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface AttrBag { id?: string; style?: string; title?: string; 'class'?: string; } function setAttrs(el: Element, attrs: AttrBag) { //... } setAttrs(document.createElement('a'), { title: 'foo', href: 'bar', // error 'data-x': 'y', //error });"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">AttrBag</span> <span class="pl-kos">{</span> <span class="pl-c1">id</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-c1">style</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-c1">title</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-s">'class'</span>?: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">setAttrs</span><span class="pl-kos">(</span><span class="pl-s1">el</span>: <span class="pl-smi">Element</span><span class="pl-kos">,</span> <span class="pl-s1">attrs</span>: <span class="pl-smi">AttrBag</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">//...</span> <span class="pl-kos">}</span> <span class="pl-en">setAttrs</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">title</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-c1">href</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-c">// error</span> <span class="pl-s">'data-x'</span>: <span class="pl-s">'y'</span><span class="pl-kos">,</span> <span class="pl-c">//error</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h2 dir="auto">Existing solutions</h2> <p dir="auto">Existing solutions have some limitations:</p> <ul dir="auto"> <li>Add a type assertion for the object literal. This turns off object literal check entirely, which is undesirable, e.g.:</li> </ul> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setAttrs(document.createElement('a'), { titile: 'foo', // typo, but no error href: 'bar', 'data-x': 'y', } as AttrBag);"><pre class="notranslate"><span class="pl-en">setAttrs</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">titile</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-c">// typo, but no error</span> <span class="pl-c1">href</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s">'data-x'</span>: <span class="pl-s">'y'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span> <span class="pl-k">as</span> <span class="pl-smi">AttrBag</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <ul dir="auto"> <li>Augument the interface for all used properties. This is heavy weight for infrequently used properties; and more importantly, the effect is usually global and can't be undone in a specific source file.</li> </ul> <h2 dir="auto">Proposed solution: "additional property" modifier</h2> <p dir="auto">If a property name in a object literal is modified with <code class="notranslate">+</code> ("additional property" modifier), and it doesn't exist in the target type, compiler should skip strict object literal check for this property, and treat this property as optional. E.g.:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="setAttrs(document.createElement('a'), { title: 'foo', +href: 'bar', // OK +'data-x': 'y', // OK }); // The type of attrs is { title: string, href?: string, 'data-x'?: string } var attrs = { title: 'foo', +href: 'bar', +'data-x': 'y', }; attrs = { // OK title: 'bar', };"><pre class="notranslate"><span class="pl-en">setAttrs</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">title</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-c1">+</span><span class="pl-c1">href</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-c">// OK</span> <span class="pl-c1">+</span><span class="pl-s">'data-x'</span>: <span class="pl-s">'y'</span><span class="pl-kos">,</span> <span class="pl-c">// OK</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// The type of attrs is { title: string, href?: string, 'data-x'?: string }</span> <span class="pl-k">var</span> <span class="pl-s1">attrs</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">title</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-c1">+</span><span class="pl-c1">href</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-c1">+</span><span class="pl-s">'data-x'</span>: <span class="pl-s">'y'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-s1">attrs</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c">// OK</span> <span class="pl-c1">title</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">If there's a decorator that takes all optional parameters it's easy to mistake and write</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@decorator class A {}"><pre class="notranslate"><code class="notranslate">@decorator class A {} </code></pre></div> <p dir="auto">instead of</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@decorator() class A {}"><pre class="notranslate"><code class="notranslate">@decorator() class A {} </code></pre></div> <p dir="auto">The problem is that there's no warning and the decorator function does not get called at all.</p> <p dir="auto">I suggest to make the parameterless version <code class="notranslate">@decorator</code> to be the same thing of <code class="notranslate">@decorator()</code>, thus avoiding confusion.</p>
0
<p dir="auto">This issue is similar to the issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15803105" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/3283" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/3283/hovercard" href="https://github.com/ansible/ansible/issues/3283">#3283</a>, which actually proposed exactly the same feature. I'm creating a new issue to bring attention back to this feature.</p> <p dir="auto">It seems useful to be able to run only single task from a playbook. It can be achieved by defining a tag in 'roles' section of the playbook. However this approach has drawback: in every playbook where we will use the role we will have to define the same tag (which may clutter the playbook and introduces duplication).</p> <p dir="auto">Implicit tag defined for each of the roles could be a option. Nice I think, since being able to run only selected role(s) seems to be useful. But it can also be considered as little mysterious. Maybe it would be better to introduce '--roles' parameter to ansible-playbook CLI instead.</p> <p dir="auto">The other option could be ability to define tags for a role in the role itself (instead of in the playbook). It could be done i.e. by extending role's meta/main.yml file by adding section 'tags' to it (next to 'dependencies') which would define role's tags. The tags defined in meta could sum up with the tags defined in playbook.<br> This way we could avoid duplication and avoid introducing the implicit tag.</p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <ul dir="auto"> <li>module name: user</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.4.2.0 config file = None configured module search path = [u'/Users/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.14 (default, Sep 25 2017, 09:53:17) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]"><pre class="notranslate"><code class="notranslate">ansible 2.4.2.0 config file = None configured module search path = [u'/Users/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.14 (default, Sep 25 2017, 09:53:17) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">nothing changed</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <ul dir="auto"> <li>host: OSX High Sierra all patches</li> </ul> <p dir="auto">remote machines using Vagrant:</p> <ul dir="auto"> <li>config.vm.box = "centos/7"</li> <li>config.vm.box = "geerlingguy/ubuntu1604"</li> </ul> <h5 dir="auto">SUMMARY</h5> <p dir="auto">I tried to create a user via the user module and set the skeleton option to /etc/skel . The module did not copy the contents of /etc/skel to the user's home directory.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" - name: Create Jenkins user user: name: jenkins comment: &quot;Jenkins slave user&quot; system: yes createhome: yes skeleton: /etc/skel home: /data/jenkins shell: /bin/bash"><pre class="notranslate"> - <span class="pl-ent">name</span>: <span class="pl-s">Create Jenkins user</span> <span class="pl-ent">user</span>: <span class="pl-ent">name</span>: <span class="pl-s">jenkins</span> <span class="pl-ent">comment</span>: <span class="pl-s"><span class="pl-pds">"</span>Jenkins slave user<span class="pl-pds">"</span></span> <span class="pl-ent">system</span>: <span class="pl-s">yes</span> <span class="pl-ent">createhome</span>: <span class="pl-s">yes</span> <span class="pl-ent">skeleton</span>: <span class="pl-s">/etc/skel</span> <span class="pl-ent">home</span>: <span class="pl-s">/data/jenkins</span> <span class="pl-ent">shell</span>: <span class="pl-s">/bin/bash</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">The contents of /etc/skel should be copied to /data/jenkins</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Nothing happened. The files were not copied. No errors were reported when running Ansible playbook.</p>
0
<p dir="auto">Backtrace from <a href="https://travis-ci.org/JuliaWeb/HTTP.jl/jobs/425829426" rel="nofollow">HTTP.jl travis run</a>:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="running async 1, 1:100, Pair{Symbol,Int64}[:verbose=&gt;0], http C [ Info: Accept (1): 🔗 0↑ 0↓ 0s 127.0.0.1:8081:8081 ≣16 (HTTP.Sockets).getsockname(http) = (ip&quot;127.0.0.1&quot;, 0x1f91)[ Info: Closed (1): 💀 0↑ 0↓🔒 0s 127.0.0.1:8081:8081 ≣16 signal (11): Segmentation fault: 11 in expression starting at /Users/travis/build/JuliaWeb/HTTP.jl/test/async.jl:189 uv_tcp_getsockname at /Users/osx/buildbot/slave/package_osx64/build/deps/srccache/libuv-ed3700c849289ed01fe04273a7bf865340b2bd7e/src/unix/tcp.c:222 jl_tcp_getsockname at /Users/osx/buildbot/slave/package_osx64/build/src/jl_uv.c:647 _sockname at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Sockets/src/Sockets.jl:601 [inlined] getsockname at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Sockets/src/Sockets.jl:584 [inlined] getsockname at /Users/travis/build/JuliaWeb/HTTP.jl/src/Streams.jl:59 [inlined] macro expansion at ./show.jl:555 [inlined] #109 at /Users/travis/build/JuliaWeb/HTTP.jl/test/async.jl:17 handle_stream at /Users/travis/build/JuliaWeb/HTTP.jl/src/Servers.jl:481 #54 at ./task.jl:259 jl_apply at /Users/osx/buildbot/slave/package_osx64/build/src/./julia.h:1558 [inlined] start_task at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:271 Allocations: 88437210 (Pool: 88416323; Big: 20887); GC: 198 ERROR: Package HTTP errored during testing Stacktrace: [1] pkgerror(::String, ::Vararg{String,N} where N) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Types.jl:120 [2] macro expansion at ./logging.jl:313 [inlined] [3] #test#61(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1284 [4] #test at ./none:0 [inlined] [5] #test#42(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:267 [6] #test at ./none:0 [inlined] [7] #test#41 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:250 [inlined] [8] #test at ./none:0 [inlined] [9] #test#38(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:coverage,),Tuple{Bool}}}, ::Function) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:247 [10] (::getfield(Pkg.API, Symbol(&quot;#kw##test&quot;)))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test)) at ./none:0 [11] top-level scope at none:1"><pre class="notranslate">running async <span class="pl-c1">1</span>, <span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">100</span>, Pair{Symbol,Int64}[<span class="pl-c1">:verbose</span><span class="pl-k">=&gt;</span><span class="pl-c1">0</span>], http C [ Info<span class="pl-k">:</span> Accept (<span class="pl-c1">1</span>)<span class="pl-k">:</span> 🔗 <span class="pl-c1">0</span>↑ <span class="pl-c1">0</span>↓ <span class="pl-c1">0</span>s <span class="pl-c1">127.0</span>.<span class="pl-c1">0.1</span><span class="pl-k">:</span><span class="pl-c1">8081</span><span class="pl-k">:</span><span class="pl-c1">8081</span> ≣<span class="pl-c1">16</span> (HTTP<span class="pl-k">.</span>Sockets)<span class="pl-k">.</span><span class="pl-en">getsockname</span>(http) <span class="pl-k">=</span> (<span class="pl-s"><span class="pl-pds"><span class="pl-c1">ip</span>"</span>127.0.0.1<span class="pl-pds">"</span></span>, <span class="pl-c1">0x1f91</span>)[ Info<span class="pl-k">:</span> Closed (<span class="pl-c1">1</span>)<span class="pl-k">:</span> 💀 <span class="pl-c1">0</span>↑ <span class="pl-c1">0</span>↓🔒 <span class="pl-c1">0</span>s <span class="pl-c1">127.0</span>.<span class="pl-c1">0.1</span><span class="pl-k">:</span><span class="pl-c1">8081</span><span class="pl-k">:</span><span class="pl-c1">8081</span> ≣<span class="pl-c1">16</span> signal (<span class="pl-c1">11</span>)<span class="pl-k">:</span> Segmentation fault<span class="pl-k">:</span> <span class="pl-c1">11</span> in expression starting at <span class="pl-k">/</span>Users<span class="pl-k">/</span>travis<span class="pl-k">/</span>build<span class="pl-k">/</span>JuliaWeb<span class="pl-k">/</span>HTTP<span class="pl-k">.</span>jl<span class="pl-k">/</span>test<span class="pl-k">/</span>async<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">189</span> uv_tcp_getsockname at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<span class="pl-k">/</span>build<span class="pl-k">/</span>deps<span class="pl-k">/</span>srccache<span class="pl-k">/</span>libuv<span class="pl-k">-</span>ed3700c849289ed01fe04273a7bf865340b2bd7e<span class="pl-k">/</span>src<span class="pl-k">/</span>unix<span class="pl-k">/</span>tcp<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">222</span> jl_tcp_getsockname at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<span class="pl-k">/</span>build<span class="pl-k">/</span>src<span class="pl-k">/</span>jl_uv<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">647</span> _sockname at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<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">1</span><span class="pl-k">/</span>Sockets<span class="pl-k">/</span>src<span class="pl-k">/</span>Sockets<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">601</span> [inlined] getsockname at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<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">1</span><span class="pl-k">/</span>Sockets<span class="pl-k">/</span>src<span class="pl-k">/</span>Sockets<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">584</span> [inlined] getsockname at <span class="pl-k">/</span>Users<span class="pl-k">/</span>travis<span class="pl-k">/</span>build<span class="pl-k">/</span>JuliaWeb<span class="pl-k">/</span>HTTP<span class="pl-k">.</span>jl<span class="pl-k">/</span>src<span class="pl-k">/</span>Streams<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">59</span> [inlined] <span class="pl-k">macro</span> expansion at <span class="pl-k">./</span>show<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">555</span> [inlined] <span class="pl-c"><span class="pl-c">#</span>109 at /Users/travis/build/JuliaWeb/HTTP.jl/test/async.jl:17</span> handle_stream at <span class="pl-k">/</span>Users<span class="pl-k">/</span>travis<span class="pl-k">/</span>build<span class="pl-k">/</span>JuliaWeb<span class="pl-k">/</span>HTTP<span class="pl-k">.</span>jl<span class="pl-k">/</span>src<span class="pl-k">/</span>Servers<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">481</span> <span class="pl-c"><span class="pl-c">#</span>54 at ./task.jl:259</span> jl_apply at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<span class="pl-k">/</span>build<span class="pl-k">/</span>src<span class="pl-k">/./</span>julia<span class="pl-k">.</span>h<span class="pl-k">:</span><span class="pl-c1">1558</span> [inlined] start_task at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<span class="pl-k">/</span>build<span class="pl-k">/</span>src<span class="pl-k">/</span>task<span class="pl-k">.</span>c<span class="pl-k">:</span><span class="pl-c1">271</span> Allocations<span class="pl-k">:</span> <span class="pl-c1">88437210</span> (Pool<span class="pl-k">:</span> <span class="pl-c1">88416323</span>; Big<span class="pl-k">:</span> <span class="pl-c1">20887</span>); GC<span class="pl-k">:</span> <span class="pl-c1">198</span> ERROR<span class="pl-k">:</span> Package HTTP errored during testing Stacktrace<span class="pl-k">:</span> [<span class="pl-c1">1</span>] <span class="pl-c1">pkgerror</span>(<span class="pl-k">::</span><span class="pl-c1">String</span>, <span class="pl-k">::</span><span class="pl-c1">Vararg{String,N}</span> <span class="pl-k">where</span> N) at <span class="pl-k">/</span>Users<span class="pl-k">/</span>osx<span class="pl-k">/</span>buildbot<span class="pl-k">/</span>slave<span class="pl-k">/</span>package_osx64<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">1</span><span class="pl-k">/</span>Pkg<span class="pl-k">/</span>src<span class="pl-k">/</span>Types<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">120</span> [<span class="pl-c1">2</span>] <span class="pl-k">macro</span> expansion at <span class="pl-k">./</span>logging<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">313</span> [inlined] [<span class="pl-c1">3</span>] <span class="pl-c"><span class="pl-c">#</span>test#61(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1284</span> [<span class="pl-c1">4</span>] <span class="pl-c"><span class="pl-c">#</span>test at ./none:0 [inlined]</span> [<span class="pl-c1">5</span>] <span class="pl-c"><span class="pl-c">#</span>test#42(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:267</span> [<span class="pl-c1">6</span>] <span class="pl-c"><span class="pl-c">#</span>test at ./none:0 [inlined]</span> [<span class="pl-c1">7</span>] <span class="pl-c"><span class="pl-c">#</span>test#41 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:250 [inlined]</span> [<span class="pl-c1">8</span>] <span class="pl-c"><span class="pl-c">#</span>test at ./none:0 [inlined]</span> [<span class="pl-c1">9</span>] <span class="pl-c"><span class="pl-c">#</span>test#38(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:coverage,),Tuple{Bool}}}, ::Function) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:247</span> [<span class="pl-c1">10</span>] (<span class="pl-k">::</span><span class="pl-c1">getfield</span>(Pkg<span class="pl-k">.</span>API, <span class="pl-c1">Symbol</span>(<span class="pl-s"><span class="pl-pds">"</span>#kw##test<span class="pl-pds">"</span></span>)))(<span class="pl-k">::</span><span class="pl-c1">NamedTuple{(:coverage,),Tuple{Bool}}</span>, <span class="pl-k">::</span><span class="pl-c1">typeof</span>(Pkg<span class="pl-k">.</span>API<span class="pl-k">.</span>test)) at <span class="pl-k">./</span>none<span class="pl-k">:</span><span class="pl-c1">0</span> [<span class="pl-c1">11</span>] top<span class="pl-k">-</span>level scope at none<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div> <p dir="auto">I'm wondering if we need some kind of assertion around </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/JuliaLang/julia/blob/5c1d4a33b2b2850282297c69e15601bbad669073/stdlib/Sockets/src/Sockets.jl#L601">julia/stdlib/Sockets/src/Sockets.jl</a> </p> <p class="mb-0 color-fg-muted"> Line 601 in <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/5c1d4a33b2b2850282297c69e15601bbad669073">5c1d4a3</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="L601" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="601"></td> <td id="LC601" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> r <span class="pl-k">=</span> <span class="pl-c1">ccall</span>(<span class="pl-c1">:jl_tcp_getsockname</span>, Int32, </td> </tr> </tbody></table> </div> </div> . The docs say it's only valid for connected sockets, so I imagine the HTTP.jl tests got into a situation where that happened to be the case (saw this error on 1/4 builds for a single PR).<p></p>
<p dir="auto">Could probably be an error instead?</p> <p dir="auto"><code class="notranslate">sock.handle</code> is a null pointer here<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/JuliaLang/julia/blob/5dbf45a2997acd26e0f72abaa320c9d0d54956a1/stdlib/Sockets/src/Sockets.jl#L817">julia/stdlib/Sockets/src/Sockets.jl</a> </p> <p class="mb-0 color-fg-muted"> Line 817 in <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/5dbf45a2997acd26e0f72abaa320c9d0d54956a1">5dbf45a</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="L817" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="817"></td> <td id="LC817" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> sock<span class="pl-k">.</span>handle, rport, raddress, rfamily) </td> </tr> </tbody></table> </div> </div> and here <div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/JuliaLang/julia/blob/5dbf45a2997acd26e0f72abaa320c9d0d54956a1/stdlib/Sockets/src/Sockets.jl#L821">julia/stdlib/Sockets/src/Sockets.jl</a> </p> <p class="mb-0 color-fg-muted"> Line 821 in <a data-pjax="true" class="commit-tease-sha" href="/JuliaLang/julia/commit/5dbf45a2997acd26e0f72abaa320c9d0d54956a1">5dbf45a</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="L821" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="821"></td> <td id="LC821" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> sock<span class="pl-k">.</span>handle, rport, raddress, rfamily) </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">Would <code class="notranslate">peer = isopen(sock) ? getpeername(sock) : nothing</code> be a safe alternative to avoid this segfault (or error if this issue is fixed)?</p>
1
<p dir="auto">As shown in screenshot the select tag is not properly styled.<br> Tested on stock browser on android 4.1.2 and 4.2.1.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/bae69501dbd1600b03804bdbec0a4a4e4911018c7079b63092b8cfbc8cc8748f/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3134323635382f313332303139302f39636365616164632d333334352d313165332d396564612d6339353734343138326266362e706e67"><img src="https://camo.githubusercontent.com/bae69501dbd1600b03804bdbec0a4a4e4911018c7079b63092b8cfbc8cc8748f/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3134323635382f313332303139302f39636365616164632d333334352d313165332d396564612d6339353734343138326266362e706e67" alt="screenshot_2013-10-12-19-14-47" data-canonical-src="https://f.cloud.github.com/assets/142658/1320190/9cceaadc-3345-11e3-9eda-c95744182bf6.png" style="max-width: 100%;"></a></p>
<p dir="auto">Bootstrap version 2.3.1<br> Samsung S3 default android browser<br> android 4.1.1</p> <p dir="auto">the &lt;select&gt; looks identical to an &lt;input&gt; -- there's no dropdown "icon" on the right side.. for multiple &lt;select multiple="multiple"&gt; there's no "scrollbar" or content</p> <p dir="auto">to duplicate, use default browser, surf to:</p> <p dir="auto"><a href="http://twitter.github.io/bootstrap/base-css.html#forms" rel="nofollow">http://twitter.github.io/bootstrap/base-css.html#forms</a></p> <p dir="auto">scroll down to the select area..<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d3e9fa3add89a63b2ad82ec941953688778850109105d7531ea4f511b76812c2/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313036353935392f3432383738362f35313362666266322d616531662d313165322d383661362d3065383565626538313463312e706e67"><img src="https://camo.githubusercontent.com/d3e9fa3add89a63b2ad82ec941953688778850109105d7531ea4f511b76812c2/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313036353935392f3432383738362f35313362666266322d616531662d313165322d383661362d3065383565626538313463312e706e67" alt="Screenshot_2013-04-25-22-06-07" data-canonical-src="https://f.cloud.github.com/assets/1065959/428786/513bfbf2-ae1f-11e2-86a6-0e85ebe814c1.png" style="max-width: 100%;"></a></p>
1
<p dir="auto">The solution suggested in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125284470" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/6382" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/6382/hovercard" href="https://github.com/microsoft/TypeScript/issues/6382">#6382</a> doesn't work as expected. It creates false <code class="notranslate">define()</code> statements in the JavaScript file:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9283914/12215840/1d3aea52-b6cd-11e5-9e71-e374709b1974.png"><img src="https://cloud.githubusercontent.com/assets/9283914/12215840/1d3aea52-b6cd-11e5-9e71-e374709b1974.png" alt="importerror" style="max-width: 100%;"></a></p> <p dir="auto">I believe the TypeScript compiler doesn't react correctly in regard to bundled files.</p> <p dir="auto">IMHO, <code class="notranslate">import { module1.Identifier2, module2.Identifier1 module3.Identifier1 } from "./moduleFile"</code> should be the only valid syntax here.</p> <p dir="auto">That syntax should result in loading the bundle file and import all the required modules (which I suppose should become <code class="notranslate">namespace</code>s in the generated, <em>i.e. referenced, bundled,</em> JavaScript file) and identifiers from there.</p>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="74445037" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3089" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3089/hovercard" href="https://github.com/microsoft/TypeScript/issues/3089">#3089</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68134267" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2743" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2743/hovercard" href="https://github.com/microsoft/TypeScript/issues/2743">#2743</a>, and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="37906625" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/17" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/17/hovercard" href="https://github.com/microsoft/TypeScript/issues/17">#17</a>.</p> <h1 dir="auto">Goals</h1> <ul dir="auto"> <li>Bundle <em>js emit</em> for TS projects while preserving internal modular structure (complete with ES6 semantics and <em>despite</em> being concatenated into a single file), <em>but not exposing it publicly</em> and wrapping the chosen entrypoint with a loader for the desired external module system.</li> </ul> <h1 dir="auto">Proposal</h1> <p dir="auto">When all of <code class="notranslate">--bundle</code>, <code class="notranslate">--module</code> and <code class="notranslate">--out</code> are specified, the TS compiler should emit a single amalgamated <code class="notranslate">js</code> file as output. <code class="notranslate">--bundle</code> is a new compiler flag, indicating that the modules used should be concatenated into the output file and loaded with a microloader at runtime. The semantics of this microloader should preserve ES6 module semantics, <em>but may not support TS-specific ES6 module semantics, such as <code class="notranslate">import a = require</code> or <code class="notranslate">exports =</code></em>. This is a major point of discussion, as to if these TS-specific syntax extensions are worth continuing to support with new language features. Additionally, this should wrap the result file with <code class="notranslate">--module</code>-specific declaration wrappers, if need be.</p> <p dir="auto">Supporting ES6 semantics is some effort - some rewriting/moving and declaration hoisting needs to be done to support circular references between internal modules.</p> <p dir="auto">Most of the effort involved here involves the design of the microloader and emit for said microloader - since this is compile time, and we don't want to register any new external dependencies at runtime (with this loader), I expect we can make some optimizations compared to, say, using an internal copy of systemjs.</p> <p dir="auto">Additionally, we need to decide if we want to make further optimizations based on the chosen <code class="notranslate">--module</code> - if the system chosen supports asynchronous module resolution (so not <code class="notranslate">commonjs</code>), then we can potentially use a more lazy, async dependency resolver internally, too.</p> <p dir="auto">So, to give an example of the emit (let's say we use a system-like thing internally and are emitting a system module):</p> <p dir="auto">Given:<br> <code class="notranslate">a.ts</code>:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from './b'; export * from './c';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./b'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./c'</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><code class="notranslate">b.ts</code>:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export interface Foo {} export class Bar { constructor() { console.log(''); } do(): Foo { throw new Error('Not implemented.'); } }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">do</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">'Not implemented.'</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"><code class="notranslate">c.ts</code>:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class Baz {} export interface Foo {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">Baz</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">Hypothetically, with <code class="notranslate">--out appLib.js</code>, <code class="notranslate">--bundle a.ts</code> and <code class="notranslate">--module system</code> arguments, we should get something like<br> <code class="notranslate">appLib.js</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System.register([], function (exports_1) { var __system = /* loader code */; //a.ts __system.register('./a', ['./b', './c'], function(exports_1) { function exportStar_1(m) { var exports = {}; for(var n in m) { if (n !== &quot;default&quot;) exports[n] = m[n]; } exports_1(exports); } return { setters:[ function (_b_1) { exportStar_1(_b_1); }, function (_c_1) { exportStar_1(_c_1); }], execute: function() { } } }); //b.ts __system.register('./b', [], function(exports_1) { var Bar; return { setters:[], execute: function() { Bar = (function () { function Bar() { console.log(''); } Bar.prototype.do = function () { throw new Error('Not implemented.'); }; return Bar; })(); exports_1(&quot;Bar&quot;, Bar); } } }); //c.ts __system.register('./c', [], function(exports_1) { var Baz; return { setters:[], execute: function() { Baz = (function () { function Baz() { } return Baz; })(); exports_1(&quot;Baz&quot;, Baz); } } }); function exportStar_1(m) { var exports = {}; for(var n in m) { if (n !== &quot;default&quot;) exports[n] = m[n]; } exports_1(exports); } return { setters: [], execute: function() { __system.import('./a').then(function (_pub_1) { exportStar_1(_pub_1); }); }; });"><pre class="notranslate"><span class="pl-v">System</span><span class="pl-kos">.</span><span class="pl-en">register</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-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">__system</span> <span class="pl-c1">=</span> <span class="pl-c">/* loader code */</span><span class="pl-kos">;</span> <span class="pl-c">//a.ts</span> <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./a'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">'./b'</span><span class="pl-kos">,</span> <span class="pl-s">'./c'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">function</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">n</span> <span class="pl-k">in</span> <span class="pl-s1">m</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">n</span> <span class="pl-c1">!==</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span><span class="pl-kos">[</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-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">setters</span>:<span class="pl-kos">[</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_b_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_b_1</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-kos">(</span><span class="pl-s1">_c_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_c_1</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">execute</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-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">//b.ts</span> <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./b'</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-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-v">Bar</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">setters</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">Bar</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">function</span> <span class="pl-v">Bar</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">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-v">Bar</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">do</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'Not implemented.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-v">Bar</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"Bar"</span><span class="pl-kos">,</span> <span class="pl-v">Bar</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-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">//c.ts</span> <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./c'</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-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-v">Baz</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">setters</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">Baz</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">function</span> <span class="pl-v">Baz</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-v">Baz</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"Baz"</span><span class="pl-kos">,</span> <span class="pl-v">Baz</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">n</span> <span class="pl-k">in</span> <span class="pl-s1">m</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">n</span> <span class="pl-c1">!==</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span><span class="pl-kos">[</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-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">setters</span>: <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-en">execute</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">__system</span><span class="pl-kos">.</span><span class="pl-en">import</span><span class="pl-kos">(</span><span class="pl-s">'./a'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_pub_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_pub_1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos"></span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
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>[] 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: master</li> <li>Operating System version: deepin 15.9</li> <li>Java version: 8</li> </ul> <p dir="auto">I want to know more about dubbo.And I found this code in module dubbo-metrics/dubbo-metrics-api/.../MetrcLevel</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="static { for (MetricLevel level : MetricLevel.values()) { if (level.ordinal() &lt; 0) { throw new RuntimeException(&quot;MetricLevel can not &lt; 0&quot;); } } }"><pre class="notranslate"><code class="notranslate">static { for (MetricLevel level : MetricLevel.values()) { if (level.ordinal() &lt; 0) { throw new RuntimeException("MetricLevel can not &lt; 0"); } } } </code></pre></div> <p dir="auto">I think this code is futility.Is it possible of level.ordinal() &lt; 0?</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.4.1</li> <li>Operating System version: mac</li> <li>Java version: 8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <h4 dir="auto">错误</h4> <blockquote> <p dir="auto">020-04-10 10:36:22.117 WARN 12008 --- [Report-thread-1] o.a.d.m.s.z.ZookeeperMetadataReport : [DUBBO] Failed to save service store file, cause: 文件名、目录名或卷标语法不正确。, dubbo version: 2.7.4.1.ZDUBBO-SNAPSHOT, current host: 10.45.19.17<br> java.io.IOException: 文件名、目录名或卷标语法不正确。<br> at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_101]<br> at java.io.File.createNewFile(File.java:1012) ~[na:1.8.0_101]<br> at org.apache.dubbo.metadata.support.AbstractMetadataReport.doSaveProperties(AbstractMetadataReport.java:144) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]<br> at org.apache.dubbo.metadata.support.AbstractMetadataReport.access$100(AbstractMetadataReport.java:70) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]<br> at org.apache.dubbo.metadata.support.AbstractMetadataReport$SaveProperties.run(AbstractMetadataReport.java:224) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]<br> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]<br> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]<br> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]</p> </blockquote> <p dir="auto">配置zk地址配置成:127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183就会出现,改成<br> zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183 就好了</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <p dir="auto"><strong>BEFORE</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df_india.groupby('sector').id.count().sort_values().plot.bar();"><pre class="notranslate"><span class="pl-s1">df_india</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'sector'</span>).<span class="pl-s1">id</span>.<span class="pl-en">count</span>().<span class="pl-en">sort_values</span>().<span class="pl-s1">plot</span>.<span class="pl-en">bar</span>();</pre></div> <p dir="auto">would result in a bar plot with all bars having the same color</p> <p dir="auto"><strong>AFTER</strong> version 0.20</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df_india.groupby('sector').id.count().sort_values().plot.bar(color='cornflowerblue');"><pre class="notranslate"><span class="pl-s1">df_india</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'sector'</span>).<span class="pl-s1">id</span>.<span class="pl-en">count</span>().<span class="pl-en">sort_values</span>().<span class="pl-s1">plot</span>.<span class="pl-en">bar</span>(<span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'cornflowerblue'</span>);</pre></div> <p dir="auto">I need to explicitly provide a color, else each bar is colored differently</p> <p dir="auto">Minimal reproducible code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd df = pd.DataFrame({'account-start': ['2017-02-03', '2017-03-03', '2017-01-01'], 'client': ['Alice Anders', 'Bob Baker', 'Charlie Chaplin'], 'balance': [-1432.32, 10.43, 30000.00], 'db-id': [1234, 2424, 251], 'proxy-id': [525, 1525, 2542], 'rank': [52, 525, 32], }) df.client.value_counts().plot.bar()"><pre class="notranslate"><code class="notranslate">import pandas as pd df = pd.DataFrame({'account-start': ['2017-02-03', '2017-03-03', '2017-01-01'], 'client': ['Alice Anders', 'Bob Baker', 'Charlie Chaplin'], 'balance': [-1432.32, 10.43, 30000.00], 'db-id': [1234, 2424, 251], 'proxy-id': [525, 1525, 2542], 'rank': [52, 525, 32], }) df.client.value_counts().plot.bar() </code></pre></div> <p dir="auto">Output:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3866405/38206924-d34dffcc-36c9-11e8-866c-57364f90042b.png"><img src="https://user-images.githubusercontent.com/3866405/38206924-d34dffcc-36c9-11e8-866c-57364f90042b.png" alt="download" style="max-width: 100%;"></a></p> <h4 dir="auto">Problem description</h4> <p dir="auto">Why was the behavior of Series.plot.bar changed to plot bars with different color? Visually these colors add nothing to the plot as different colors should only be used when they correspond to differences of meaning in the data.</p> <p dir="auto">Why is the default behavior to provide an unnecessarily visually overwhelming graph? It took me some time to realize why my bars suddenly started acting strangely. Now, I pass color='cornflowerblue' to get all my bars the same pleasant hue.</p> <p dir="auto">Reference for visual appeal and the use of colors: <a href="http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf" rel="nofollow">http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf</a></p> <p dir="auto">Would it be possible to revert to the pre-0.20 behavior?</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <p dir="auto">[paste the output of <code class="notranslate">pd.show_versions()</code> here below this line]</p> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.4.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.9.0-5-amd64<br> machine: x86_64<br> processor:<br> byteorder: little<br> LC_ALL: C.UTF-8<br> LANG: C.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.22.0<br> pytest: 3.2.1<br> pip: 9.0.1<br> setuptools: 38.5.2<br> Cython: 0.26.1<br> numpy: 1.14.2<br> scipy: 1.0.0<br> pyarrow: 0.8.0<br> xarray: 0.10.1<br> IPython: 6.1.0<br> sphinx: 1.6.3<br> patsy: 0.4.1<br> dateutil: 2.6.0<br> pytz: 2018.3<br> blosc: None<br> bottleneck: 1.2.1<br> tables: 3.4.2<br> numexpr: 2.6.2<br> feather: 0.4.0<br> matplotlib: 2.1.0<br> openpyxl: 2.4.8<br> xlrd: 1.1.0<br> xlwt: 1.3.0<br> xlsxwriter: 1.0.2<br> lxml: 4.1.0<br> bs4: 4.6.0<br> html5lib: 0.9999999<br> sqlalchemy: 1.1.13<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: 0.6.0</p> </details>
<h4 dir="auto">Code Sample</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Series([10**x for x in range(5)]).plot.bar() Series([10**x for x in range(5)]).plot.bar(logy=True)"><pre class="notranslate"><span class="pl-v">Series</span>([<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-s1">x</span> <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>)]).<span class="pl-s1">plot</span>.<span class="pl-en">bar</span>() <span class="pl-v">Series</span>([<span class="pl-c1">10</span><span class="pl-c1">**</span><span class="pl-s1">x</span> <span class="pl-k">for</span> <span class="pl-s1">x</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">5</span>)]).<span class="pl-s1">plot</span>.<span class="pl-en">bar</span>(<span class="pl-s1">logy</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The behavior changed from last version, 0.20. In last version, <code class="notranslate">Series.plot.bar</code> uses one color for bars. In the new version, it uses different colors for bars even for a single series. When using <code class="notranslate">logy</code> argument, the bars cannot be seen. It seems the fill color is same as the background color.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1349042/33044244-31e3451e-ce16-11e7-9c2e-ca86ac0664ec.png"><img src="https://user-images.githubusercontent.com/1349042/33044244-31e3451e-ce16-11e7-9c2e-ca86ac0664ec.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1349042/33044250-363cfc68-ce16-11e7-9dec-1b115e399369.png"><img src="https://user-images.githubusercontent.com/1349042/33044250-363cfc68-ce16-11e7-9dec-1b115e399369.png" alt="image" style="max-width: 100%;"></a></p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.3.final.0<br> python-bits: 64<br> OS: Windows<br> OS-release: 10<br> machine: AMD64<br> processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel<br> byteorder: little<br> LC_ALL: None<br> LANG: None<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.21.0<br> pytest: 3.2.1<br> pip: 9.0.1<br> setuptools: 36.5.0.post20170921<br> Cython: 0.26.1<br> numpy: 1.13.3<br> scipy: 1.0.0<br> pyarrow: 0.7.0<br> xarray: None<br> IPython: 6.1.0<br> sphinx: 1.6.3<br> patsy: 0.4.1<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: 1.2.1<br> tables: 3.4.2<br> numexpr: 2.6.2<br> feather: 0.4.0<br> matplotlib: 2.1.0<br> openpyxl: 2.4.8<br> xlrd: 1.1.0<br> xlwt: 1.3.0<br> xlsxwriter: 1.0.2<br> lxml: 4.1.0<br> bs4: 4.6.0<br> html5lib: 0.999999999<br> sqlalchemy: 1.1.13<br> pymysql: 0.7.11.None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: 0.5.0]</p> </details>
1
<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 random str_values = ['a', 'b'] data = [[random.choice(str_values), random.choice(str_values), random.randint(0, 10), random.randint(1, 20), random.random()] for _ in range(100)] df = pd.DataFrame(data, columns=['s0', 's1', 'int0', 'int1', 'float0']) group_index_true = df.groupby(['s0', 's1'], as_index=True) print(group_index_true.mean()) print(group_index_true.std()) group_index_false = df.groupby(['s0', 's1'], as_index=False) print(group_index_false.mean()) print(group_index_false.std()) "><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">random</span> <span class="pl-s1">str_values</span> <span class="pl-c1">=</span> [<span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>] <span class="pl-s1">data</span> <span class="pl-c1">=</span> [[<span class="pl-s1">random</span>.<span class="pl-en">choice</span>(<span class="pl-s1">str_values</span>), <span class="pl-s1">random</span>.<span class="pl-en">choice</span>(<span class="pl-s1">str_values</span>), <span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10</span>), <span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">1</span>, <span class="pl-c1">20</span>), <span class="pl-s1">random</span>.<span class="pl-en">random</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">100</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">data</span>, <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'s0'</span>, <span class="pl-s">'s1'</span>, <span class="pl-s">'int0'</span>, <span class="pl-s">'int1'</span>, <span class="pl-s">'float0'</span>]) <span class="pl-s1">group_index_true</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'s0'</span>, <span class="pl-s">'s1'</span>], <span class="pl-s1">as_index</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-en">print</span>(<span class="pl-s1">group_index_true</span>.<span class="pl-en">mean</span>()) <span class="pl-en">print</span>(<span class="pl-s1">group_index_true</span>.<span class="pl-en">std</span>()) <span class="pl-s1">group_index_false</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'s0'</span>, <span class="pl-s">'s1'</span>], <span class="pl-s1">as_index</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-en">print</span>(<span class="pl-s1">group_index_false</span>.<span class="pl-en">mean</span>()) <span class="pl-en">print</span>(<span class="pl-s1">group_index_false</span>.<span class="pl-en">std</span>())</pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">The last line gives an <code class="notranslate">AtributeError</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;pandasbug.py&quot;, line 17, in &lt;module&gt; print(group_index_false.std()) File &quot;/home/user/pyenv/lib/python3.5/site-packages/pandas/core/groupby.py&quot;, line 1083, in std return np.sqrt(self.var(ddof=ddof, **kwargs)) AttributeError: 'str' object has no attribute 'sqrt'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "pandasbug.py", line 17, in &lt;module&gt; print(group_index_false.std()) File "/home/user/pyenv/lib/python3.5/site-packages/pandas/core/groupby.py", line 1083, in std return np.sqrt(self.var(ddof=ddof, **kwargs)) AttributeError: 'str' object has no attribute 'sqrt' </code></pre></div> <p dir="auto">If the <code class="notranslate">as_index</code> is set to <code class="notranslate">False</code> in the <code class="notranslate">groupby</code> operation, the sqrt is applied to all the columns, even to the columns that where used to group, which raises an error when at least one column is not numeric.</p> <p dir="auto">This error is related to issues: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110987537" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11300" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/11300/hovercard" href="https://github.com/pandas-dev/pandas/pull/11300">#11300</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="186382820" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14547" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/14547/hovercard" href="https://github.com/pandas-dev/pandas/issues/14547">#14547</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114766613" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11507" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/11507/hovercard" href="https://github.com/pandas-dev/pandas/pull/11507">#11507</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="88354046" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/10355" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/10355/hovercard" href="https://github.com/pandas-dev/pandas/issues/10355">#10355</a></p> <h4 dir="auto">Expected Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" int0 int1 float0 s0 s1 a a 4.440000 11.080000 0.498588 b 4.352941 11.941176 0.557430 b a 5.619048 10.190476 0.442739 b 4.864865 11.648649 0.522814 int0 int1 float0 s0 s1 a a 3.176476 4.864155 0.274068 b 3.936070 4.955686 0.260301 b a 3.138092 6.384505 0.341268 b 3.172470 6.051704 0.260665 s0 s1 int0 int1 float0 0 a a 4.440000 11.080000 0.498588 1 a b 4.352941 11.941176 0.557430 2 b a 5.619048 10.190476 0.442739 3 b b 4.864865 11.648649 0.522814 s0 s1 int0 int1 float0 0 a a 3.176476 4.864155 0.274068 1 a b 3.936070 4.955686 0.260301 2 b a 3.138092 6.384505 0.341268 3 b b 3.172470 6.051704 0.260665"><pre class="notranslate"><code class="notranslate"> int0 int1 float0 s0 s1 a a 4.440000 11.080000 0.498588 b 4.352941 11.941176 0.557430 b a 5.619048 10.190476 0.442739 b 4.864865 11.648649 0.522814 int0 int1 float0 s0 s1 a a 3.176476 4.864155 0.274068 b 3.936070 4.955686 0.260301 b a 3.138092 6.384505 0.341268 b 3.172470 6.051704 0.260665 s0 s1 int0 int1 float0 0 a a 4.440000 11.080000 0.498588 1 a b 4.352941 11.941176 0.557430 2 b a 5.619048 10.190476 0.442739 3 b b 4.864865 11.648649 0.522814 s0 s1 int0 int1 float0 0 a a 3.176476 4.864155 0.274068 1 a b 3.936070 4.955686 0.260301 2 b a 3.138092 6.384505 0.341268 3 b b 3.172470 6.051704 0.260665 </code></pre></div> <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.4.0-81-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: es_ES.UTF-8 LOCALE: es_ES.UTF-8 <p dir="auto">pandas: 0.20.2<br> pytest: None<br> pip: 9.0.1<br> setuptools: 36.0.1<br> Cython: 0.25.1<br> numpy: 1.13.0<br> scipy: 0.18.1<br> xarray: None<br> IPython: 5.1.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.0<br> pytz: 2017.2<br> blosc: None<br> bottleneck: 1.2.0<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: 1.5.3<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: 0.7.3<br> lxml: None<br> bs4: 4.4.1<br> html5lib: 0.999<br> sqlalchemy: 1.1.5<br> pymysql: None<br> psycopg2: 2.6.2 (dt dec pq3 ext lo64)<br> jinja2: 2.8<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="186382820" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/14547" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/14547/hovercard" href="https://github.com/pandas-dev/pandas/issues/14547">#14547</a> for other tests</p> <p dir="auto">In pandas 0.16.2 (and already in 0.16.0), using std() for aggregation after a groupby( 'my_column', as_index=False) modifies 'my_column' by taking its sqrt(). Example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="df = pandas.DataFrame({ 'a' : [1,1,1,2,2,2,3,3,3], 'b' : [1,2,3,4,5,6,7,8,9], }) df.groupby('a',as_index=False).std() Out[5]: a b 0 1.000000 1 1 1.414214 1 2 1.732051 1"><pre class="notranslate"><span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-v">DataFrame</span>({ <span class="pl-s">'a'</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">2</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-s">'b'</span> : [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">3</span>,<span class="pl-c1">4</span>,<span class="pl-c1">5</span>,<span class="pl-c1">6</span>,<span class="pl-c1">7</span>,<span class="pl-c1">8</span>,<span class="pl-c1">9</span>], }) <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>(<span class="pl-s">'a'</span>,<span class="pl-s1">as_index</span><span class="pl-c1">=</span><span class="pl-c1">False</span>).<span class="pl-en">std</span>() <span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: <span class="pl-s1">a</span> <span class="pl-s1">b</span> <span class="pl-c1">0</span> <span class="pl-c1">1.000000</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1.414214</span> <span class="pl-c1">1</span> <span class="pl-c1">2</span> <span class="pl-c1">1.732051</span> <span class="pl-c1">1</span></pre></div> <p dir="auto">The square root values of 'a' are returned instead of 1, 2, 3.</p> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.9.final.0<br> python-bits: 32<br> OS: Windows<br> OS-release: 7<br> machine: AMD64<br> processor: Intel64 Family 6 Model 45 Stepping 7, GenuineIntel<br> byteorder: little<br> LC_ALL: None<br> LANG: fr_CH</p> <p dir="auto">pandas: 0.16.2<br> nose: 1.3.4<br> Cython: 0.22<br> numpy: 1.9.2<br> scipy: 0.15.1<br> statsmodels: None<br> IPython: 3.0.0<br> sphinx: 1.3.1<br> patsy: 0.3.0<br> dateutil: 2.4.0<br> pytz: 2015.2<br> bottleneck: None<br> tables: 3.1.1<br> numexpr: 2.4<br> matplotlib: 1.4.3<br> openpyxl: None<br> xlrd: 0.9.3<br> xlwt: None<br> xlsxwriter: 0.7.1<br> lxml: None<br> bs4: 4.3.2<br> html5lib: None<br> httplib2: None<br> apiclient: None<br> sqlalchemy: 0.9.9<br> pymysql: None<br> psycopg2: None</p>
1
<p dir="auto">Current webpack modules have several details that are not exactly spec-compliant, particularly when circular references are involved. It is "good enough" for most current cases, but in order to be as close to the spec as we can get without <code class="notranslate">Proxy</code>, I was thinking of how to change the way webpack emits ES modules.</p> <p dir="auto">This tries to emit modules as close to the ES2017 and the current draft of EPS 002 as possible.</p> <ul dir="auto"> <li>To simplify things, I'll write the emits as if NamedModulesPlugin is being used.<br> The generated export names are also not minified here, but should (usually) be minified by webpack.</li> <li>The actual values of the generated identifiers don't matter; e.g.<br> <code class="notranslate">__imported_NAME__</code> could still be the same <code class="notranslate">__WEBPACK_IMPORTED_MODULE_N_NAME__</code>; I'm only using it as a shorthand.</li> <li>The helpers attached to <code class="notranslate">__webpack_require__</code> would also, of course, be minimized similarly to current helpers.</li> <li>It is not yet decided for sure whether commonjs modules will expose object keys, or only as a default export. It is, however, decided, that the namespace created for commonjs modules will still be a module namespace exotic object, so commonjs exports are never directly returned.</li> </ul> <h1 dir="auto"><code class="notranslate">__webpack_require__</code> helpers</h1> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.module = function module(moduleId) { // Check if module is in cache if(installedModules[moduleId] &amp;&amp; installedModules[moduleId].ns /*namespace*/) return installedModules[moduleId].ns; var exports = __webpack_require__(moduleId); // this should actually be in the base __webpack_require__, // should any commonjs require of an ES module happen. if (installedModules[moduleId].m) { installedModules[moduleId].exports = installedModules[moduleId].ns; } if (!installedModules[moduleId].m/*odule*/) { if (exports.__esModule) { installedModules[moduleId].ns = exports; } else { // https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md#541-default-imports // is it safe to capture 'exports' instead of 'installedModules[moduleId]' even when hot reloading? var defs = { &quot;default&quot;: function() { return installedModules[moduleId].exports; } }; for (var name in exports) { if (name === &quot;default&quot;) continue; if (!Object.prototype.hasOwnProperty.call(exports, name)) continue; defs[name] = function() { return installedModules[moduleId].exports[name]; }; } __webpack_require__.export(installedModules[moduleId], defs); installedModules[moduleId].m = 0; // falsy; minifies better than false } } return installedModules[moduleId].ns; }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-smi">module</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// Check if module is in cache</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">ns</span> <span class="pl-c">/*namespace*/</span><span class="pl-kos">)</span> <span class="pl-k">return</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">ns</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">exports</span> <span class="pl-c1">=</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// this should actually be in the base __webpack_require__,</span> <span class="pl-c">// should any commonjs require of an ES module happen.</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">ns</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">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-c">/*odule*/</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">exports</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">ns</span> <span class="pl-c1">=</span> <span class="pl-s1">exports</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-c">// https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md#541-default-imports</span> <span class="pl-c">// is it safe to capture 'exports' instead of 'installedModules[moduleId]' even when hot reloading?</span> <span class="pl-k">var</span> <span class="pl-s1">defs</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">exports</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">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">name</span> <span class="pl-k">in</span> <span class="pl-s1">exports</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">name</span> <span class="pl-c1">===</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-s1">defs</span><span class="pl-kos">[</span><span class="pl-s1">name</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-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">exports</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">defs</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">m</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-c">// falsy; minifies better than false</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-c1">ns</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><code class="notranslate">compat</code> is only <code class="notranslate">true</code> when the module is also consumed by a commonjs module. <code class="notranslate">nofreeze</code> is used<br> to support chaining with the other helpers; but the last helper called should always be allowed to<br> freeze the namespace.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export = function export(module, specifiers, nofreeze, compat) { module.m/*odule*/ = 1; // truthy; 1 minifies better than true var ns = module.ns /*namespace*/ = module.ns || (Object.create ? Object.create(null) : {}); if (typeof Symbol === &quot;function&quot; &amp;&amp; Symbol.toStringTag) { Object.defineProperty(ns, Symbol.toStringTag, { value: &quot;Module&quot; }) } if (compat) { Object.defineProperty(ns, &quot;__esModule&quot;, { value: true }); } for (var name of specifiers) { if (!Object.prototype.hasOwnProperty.call(specifiers, name)) continue; Object.defineProperty(ns, name, { enumerable: true, get: specifiers[name] }); } if (!nofreeze) Object.freeze(ns); }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">specifiers</span><span class="pl-kos">,</span> <span class="pl-s1">nofreeze</span><span class="pl-kos">,</span> <span class="pl-s1">compat</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-c">/*odule*/</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span> <span class="pl-c">// truthy; 1 minifies better than true</span> <span class="pl-k">var</span> <span class="pl-s1">ns</span> <span class="pl-c1">=</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">ns</span> <span class="pl-c">/*namespace*/</span> <span class="pl-c1">=</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">ns</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">create</span> ? <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span> : <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-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-v">Symbol</span> <span class="pl-c1">===</span> <span class="pl-s">"function"</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">toStringTag</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">toStringTag</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">value</span>: <span class="pl-s">"Module"</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">compat</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-s">"__esModule"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">value</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-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">name</span> <span class="pl-k">of</span> <span class="pl-s1">specifiers</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-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">specifiers</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">enumerable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">get</span>: <span class="pl-s1">specifiers</span><span class="pl-kos">[</span><span class="pl-s1">name</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">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">nofreeze</span><span class="pl-kos">)</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">freeze</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This helper is used when accessing a property that cannot be statically verified<br> to exist in the namespace.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.namespaceGet = function namespaceGet(ns, name) { if (!Object.prototype.hasOwnProperty.call(ns, name)) throw new SyntaxError(&quot;Unknown export &quot; + name); return ns[name]; }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">namespaceGet</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-en">namespaceGet</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-s1">name</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-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">SyntaxError</span><span class="pl-kos">(</span><span class="pl-s">"Unknown export "</span> <span class="pl-c1">+</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">ns</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This helper is only used if <a href="https://gist.github.com/Kovensky/2caf0eaefc9c00b46ab5afaed59ebd0b">implicit dependencies are allowed by the spec</a>.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.reexport = function reexport(module, reexports, nofreeze, compat) { if (!module.m) __webpack_require__.export(module, {}, true, compat); var specifiers = {}; for (var name in reexports) { if (typeof reexports[name] !== &quot;object&quot;) { specifiers[name] = makeNsReexport(reexports[name]); } else { var moduleId = reexports[name][0]; var reexport = reexports[name][1]; specifiers[name] = makeReexport(moduleId, reexport); } } __webpack_require__.export(module, specifiers, nofreeze) function makeNsReexport(moduleId) { return function () { return __webpack_require__.module(moduleId); } } function makeReexport(moduleId, reexport) { return function() { return __webpack_require__.module(moduleId)[reexport]; } } }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexport</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-en">reexport</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">reexports</span><span class="pl-kos">,</span> <span class="pl-s1">nofreeze</span><span class="pl-kos">,</span> <span class="pl-s1">compat</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">module</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-kos">)</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">module</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">true</span><span class="pl-kos">,</span> <span class="pl-s1">compat</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">specifiers</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">name</span> <span class="pl-k">in</span> <span class="pl-s1">reexports</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">reexports</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">!==</span> <span class="pl-s">"object"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">specifiers</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">makeNsReexport</span><span class="pl-kos">(</span><span class="pl-s1">reexports</span><span class="pl-kos">[</span><span class="pl-s1">name</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-k">var</span> <span class="pl-s1">moduleId</span> <span class="pl-c1">=</span> <span class="pl-s1">reexports</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">reexport</span> <span class="pl-c1">=</span> <span class="pl-s1">reexports</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">specifiers</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">makeReexport</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">,</span> <span class="pl-s1">reexport</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">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">specifiers</span><span class="pl-kos">,</span> <span class="pl-s1">nofreeze</span><span class="pl-kos">)</span> <span class="pl-k">function</span> <span class="pl-en">makeNsReexport</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</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">makeReexport</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">,</span> <span class="pl-s1">reexport</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span><span class="pl-kos">[</span><span class="pl-s1">reexport</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">reexportAll always should always be the last helper called, so it always freezes the exports.<br> This should only be called for reexporting commonjs dependencies, or other modules whose set of exports is not known (if they, say, reexport a commonjs dependency).</p> <p dir="auto">This helper (and the special case for out-of-order importing) is only needed because EPS 002 says the module.export keys should be hoisted. Should that requirement be removed and the only apparent export is <code class="notranslate">default</code>, all <code class="notranslate">reexportAll</code> can just compile into corresponding <code class="notranslate">import</code>s -- <code class="notranslate">default</code> keys are never reexported via star reexporting.</p> <p dir="auto">It must necessarily require the modules in order to be able to see their exports and add the<br> accessors before the freeze. The exports are added after requiring each module to avoid further<br> trouble with circular references.</p> <p dir="auto">The duplicate reexports actually should be allowable when their values are <code class="notranslate">SameValue</code>,<br> but it is unclear how that should apply to mutable bindings, since they can always mutate to not<br> be <code class="notranslate">SameValue</code> anymore.</p> <p dir="auto">The reexport getters call <code class="notranslate">__webpack_require__.module</code> to try and deal better with hot reloading.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.reexportAll = function reexportAll(module, cjsDeps, ownExports, compat) { if (!module.m) __webpack_require__.export(module, {}, true, compat); for (var i = 0; i &lt; cjsDeps.length; i++) { var dep = cjsDeps[i]; var specifiers = {}; var ns = __webpack_require__.module(dep); for (var name of ns) { if (name === &quot;default&quot;) continue; if (!Object.prototype.hasOwnProperty.call(ns, name)) continue; if (ownExports.indexOf(name) &gt;= 0) continue; if (Object.prototype.hasOwnProperty.call(module.ns, name)) throw new SyntaxError(&quot;Duplicate reexport &quot; + name); specifiers[name] = makeReexportAll(dep, name); } __webpack_require__.export(module, specifiers, true); } Object.freeze(module.ns); function makeReexportAll(moduleId, reexport) { return function() { return __webpack_require__.namespaceGet(__webpack_require__.module(moduleId), reexport); } } }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexportAll</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-en">reexportAll</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">cjsDeps</span><span class="pl-kos">,</span> <span class="pl-s1">ownExports</span><span class="pl-kos">,</span> <span class="pl-s1">compat</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">module</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-kos">)</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">module</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">true</span><span class="pl-kos">,</span> <span class="pl-s1">compat</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">cjsDeps</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">dep</span> <span class="pl-c1">=</span> <span class="pl-s1">cjsDeps</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">specifiers</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">ns</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s1">dep</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">name</span> <span class="pl-k">of</span> <span class="pl-s1">ns</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">name</span> <span class="pl-c1">===</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">ns</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">ownExports</span><span class="pl-kos">.</span><span class="pl-en">indexOf</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-c1">&gt;=</span> <span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">ns</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">SyntaxError</span><span class="pl-kos">(</span><span class="pl-s">"Duplicate reexport "</span> <span class="pl-c1">+</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">specifiers</span><span class="pl-kos">[</span><span class="pl-s1">name</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">makeReexportAll</span><span class="pl-kos">(</span><span class="pl-s1">dep</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">specifiers</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">freeze</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">ns</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">makeReexportAll</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">,</span> <span class="pl-s1">reexport</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">namespaceGet</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">reexport</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">This helper should be called by the DelegatedModule plugin when the exposed module<br> is an ES module. CJS modules should be exposed with the currently existing template.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.expose = function expose(module, moduleId) { __webpack_require__.module(moduleId); var exposed = installedModules[moduleId]; module.m = exposed.m; module.ns = exposed.ns; module.exports = exposed.exports; }"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">expose</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-en">expose</span><span class="pl-kos">(</span><span class="pl-s1">module</span><span class="pl-kos">,</span> <span class="pl-s1">moduleId</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s1">moduleId</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">exposed</span> <span class="pl-c1">=</span> <span class="pl-s1">installedModules</span><span class="pl-kos">[</span><span class="pl-s1">moduleId</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">m</span> <span class="pl-c1">=</span> <span class="pl-s1">exposed</span><span class="pl-kos">.</span><span class="pl-c1">m</span><span class="pl-kos">;</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">ns</span> <span class="pl-c1">=</span> <span class="pl-s1">exposed</span><span class="pl-kos">.</span><span class="pl-c1">ns</span><span class="pl-kos">;</span> <span class="pl-s1">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">exposed</span><span class="pl-kos">.</span><span class="pl-c1">exports</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h1 dir="auto">Imports</h1> <p dir="auto">All imports and export default should use <code class="notranslate">let</code> for correct TDZ, but the emit would not be Uglify-compatible, so they are written with <code class="notranslate">var</code>.</p> <p dir="auto">All of the sample code has an implied <code class="notranslate">"use strict"</code> unless noted.</p> <h2 dir="auto">default</h2> <p dir="auto">A default import of, say, <code class="notranslate">import identifier from</code> will be treated exactly as <code class="notranslate">import { default as identifier } from</code>, that is, it's seen as a named import.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import defaultExport from './esmodule' defaultExport"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">defaultExport</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-s1">defaultExport</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); __imported_esmodule__[&quot;default&quot;];"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <h2 dir="auto">named</h2> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { named as renamed } from './esmodule' renamed"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">named</span> <span class="pl-k">as</span> <span class="pl-s1">renamed</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-s1">renamed</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); __imported_esmodule__.named;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">.</span><span class="pl-c1">named</span><span class="pl-kos">;</span></pre></div> <h2 dir="auto">namespace with static member access</h2> <p dir="auto">This includes bracketed access with statically-analyzable keys.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as namespace from './esmodule' namespace.named"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">namespace</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-s1">namespace</span><span class="pl-kos">.</span><span class="pl-c1">named</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); __imported_esmodule__.named;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">.</span><span class="pl-c1">named</span><span class="pl-kos">;</span></pre></div> <h2 dir="auto">namespace with dynamic member access</h2> <p dir="auto">This cannot have perfect coverage without using <code class="notranslate">Proxy</code>, but should be close<br> enough for most cases.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as namespace from './esmodule' namespace[(() =&gt; 'named')()]"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">namespace</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-s1">namespace</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">=&gt;</span> <span class="pl-s">'named'</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">]</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); __webpack_require__.namespaceGet(__imported_esmodule__, (() =&gt; 'named')());"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">namespaceGet</span><span class="pl-kos">(</span><span class="pl-s1">__imported_esmodule__</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">=&gt;</span> <span class="pl-s">'named'</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> <h1 dir="auto">commonjs require</h1> <p dir="auto">Should have no changes.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const namespace = require('./esmodule')"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">namespace</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'./esmodule'</span><span class="pl-kos">)</span></pre></div> <p dir="auto">Output should not have an implied <code class="notranslate">"use strict"</code>.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const namespace = __webpack_require__(&quot;./esmodule.js&quot;);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">namespace</span> <span class="pl-c1">=</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h1 dir="auto">Exports</h1> <p dir="auto">In ES modules, the wrapper function should be changed to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function (__webpack_module__, _ignored_unique_identifier, /* rest */)"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-s1">_ignored_unique_identifier</span><span class="pl-kos">,</span> <span class="pl-c">/* rest */</span><span class="pl-kos">)</span></pre></div> <p dir="auto">None of the helpers, or any of the generated code, should depend on the second argument to the wrapper<br> function. However, it still needs to be provided for compatibility with CJS modules.</p> <p dir="auto">The <code class="notranslate">__webpack_default__</code> identifier mentioned in the output should be a guaranteed-unique<br> identifier (i.e. not visible from user code). Ideally, this would be the same with <code class="notranslate">__webpack_module__</code>,<br> but it must still be available to support webpack's meta-properties like <code class="notranslate">module.hot</code>.</p> <p dir="auto">Speaking of the meta-properties, they should be automatically translated from <code class="notranslate">module</code> to apply to<br> <code class="notranslate">__webpack_module__</code> instead.</p> <h2 dir="auto"><code class="notranslate">export default</code></h2> <h3 dir="auto">of anonymous function</h3> <p dir="auto">Note the <code class="notranslate">{default: function() {}}.default</code> wrapper. This is needed to ensure the anonymous function or class receives the correct <code class="notranslate">Function#name</code>. This also should be hoisted to happen immediately after the <code class="notranslate">"use strict";</code>, before any helpers or imports are called (barring special cases like ProvidePlugin).</p> <p dir="auto">This also applies to <code class="notranslate">async function</code>.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default function () {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</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-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var __webpack_default__ = { &quot;default&quot;: function () {} }[&quot;default&quot;]; __webpack_require__.export(__webpack_module__, { &quot;default&quot;: function() { return __webpack_default__; } });"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">__webpack_default__</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</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-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_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></pre></div> <h3 dir="auto">of anonymous class</h3> <p dir="auto">The same wrapper is employed, but it is not hoisted like in the anonymous function case. All engines that support <code class="notranslate">class</code> also support <code class="notranslate">let</code>, so it should be safe to use <code class="notranslate">let</code> in this case to ensure proper TDZ.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;default&quot;: function() { return __webpack_default__; } }); let __webpack_default__ = { &quot;default&quot;: class {} }[&quot;default&quot;];"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_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">let</span> <span class="pl-s1">__webpack_default__</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">class</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">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <h3 dir="auto">of named function or class</h3> <p dir="auto">No <code class="notranslate">__webpack_default__</code> or explicit hoisting involved.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default class Name {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">Name</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;default&quot;: function() { return Name; } }); class Name {}"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Name</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">class</span> <span class="pl-v">Name</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <h3 dir="auto">of expression (i.e. anything else)</h3> <p dir="auto">No hoisting allowed.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default 1 + 1"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-c1">1</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;default&quot;: function() { return __webpack_default__; } }); var __webpack_default__ = (1 + 1);"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_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">var</span> <span class="pl-s1">__webpack_default__</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-c1">1</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <h2 dir="auto">Named export</h2> <h3 dir="auto">With specifier</h3> <p dir="auto">A specifier without <code class="notranslate">as</code> is treated as if it was exported <code class="notranslate">as</code> itself. For example, <code class="notranslate">export { foo }</code> is treated the same as <code class="notranslate">export { foo as foo }</code>.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let foo = 1 export { foo as bar }"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">foo</span> <span class="pl-k">as</span> <span class="pl-s1">bar</span> <span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;bar&quot;: function () { return foo; } }); let foo = 1"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"bar"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</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">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span></pre></div> <h3 dir="auto">With declarations</h3> <p dir="auto">The emit is the same regardless of the declaration type; however, <code class="notranslate">var</code>, <code class="notranslate">let</code> and <code class="notranslate">const</code> can specify more than one name.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export function foo () {} export class Bar {} export let hoge, fuga"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">foo</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">class</span> <span class="pl-v">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">let</span> <span class="pl-s1">hoge</span><span class="pl-kos">,</span> <span class="pl-s1">fuga</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;foo&quot;: function () { return foo; }, &quot;Bar&quot;: function () { return Bar; }, &quot;hoge&quot;: function () { return hoge; }, &quot;fuga&quot;: function () { return fuga; } }); function foo () {} class Bar {} let hoge, fuga"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"Bar"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Bar</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"hoge"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">hoge</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"fuga"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">fuga</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">foo</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-v">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">let</span> <span class="pl-s1">hoge</span><span class="pl-kos">,</span> <span class="pl-s1">fuga</span></pre></div> <h1 dir="auto">Reexports</h1> <p dir="auto">This depends on the answer to <a href="https://gist.github.com/Kovensky/2caf0eaefc9c00b46ab5afaed59ebd0b">https://gist.github.com/Kovensky/2caf0eaefc9c00b46ab5afaed59ebd0b</a></p> <p dir="auto">If it's allowed to be an implicit dependency, a much simpler reexport emit can be produced.</p> <p dir="auto">If it has to be a TDZ error, then reexports are emitted identically to <code class="notranslate">import { name } from</code> followed by <code class="notranslate">export { name }</code>.</p> <h2 dir="auto">of namespace</h2> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as namespace from './esmodule' export { namespace }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">namespace</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">namespace</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Implicit dependency:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.reexport(__webpack_module__, { &quot;namespace&quot;: &quot;./esmodule.js&quot; }); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;);"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexport</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"namespace"</span>: <span class="pl-s">"./esmodule.js"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">TDZ (doesn't quite work because of the <code class="notranslate">var</code> instead of <code class="notranslate">const</code>, but...):</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;namespace&quot;: function () { return __imported_esmodule__; } }); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;);"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"namespace"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_esmodule__</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">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">If the exported namespace comes from a cjs module, or a harmony module that reexports<br> a cjs module, all accesses to members of this export should use the <code class="notranslate">namespaceGet</code> helper.</p> <h2 dir="auto">of named</h2> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export { default, foo as bar } from './esmodule'"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">default</span><span class="pl-kos">,</span> <span class="pl-s1">foo</span> <span class="pl-k">as</span> <span class="pl-s1">bar</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span></pre></div> <p dir="auto">Implicit dependency:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.reexport(__webpack_module__, { &quot;default&quot;: [&quot;./esmodule.js&quot;, &quot;default&quot;], &quot;bar&quot;: [&quot;./esmodule.js&quot;, &quot;foo&quot;] }); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;);"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexport</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-kos">[</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">,</span> <span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s">"bar"</span>: <span class="pl-kos">[</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">,</span> <span class="pl-s">"foo"</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">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">TDZ:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;default&quot;: function () { return __imported_esmodule__[&quot;default&quot;]; } &quot;bar&quot;: function () { return __imported_esmodule__[&quot;foo&quot;]; } }); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;);"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-s">"bar"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">[</span><span class="pl-s">"foo"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Webpack will not be able to statically check if the reexported symbols actually<br> exist in a commonjs module, so when reexporting names from them, the generated<br> getter should <code class="notranslate">return</code> something similar to<br> <code class="notranslate">__webpack_require__.namespaceGet(__imported_cjs__, "foo")</code>.</p> <h1 dir="auto">Star Reexports</h1> <p dir="auto">Assuming "./esmodule.js" has <code class="notranslate">default</code>, <code class="notranslate">foo</code> and <code class="notranslate">bar</code> as exports.</p> <h2 dir="auto">of ES module</h2> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from './esmodule' export function foo () {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">foo</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">Implicit dependency:</p> <p dir="auto">As, in this example, exports are combined with reexports, an additional argument to <code class="notranslate">__webpack_require__.export</code> is required.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;foo&quot;: function () { return foo; } }, true); __webpack_require__.reexport(__webpack_module__, { &quot;bar&quot;: [ &quot;./esmodule.js&quot;, &quot;bar&quot; ] }); var __imported_esmodule__ = __webpack_require__(&quot;./esmodule.js&quot;); function foo () {}"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</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">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexport</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"bar"</span>: <span class="pl-kos">[</span> <span class="pl-s">"./esmodule.js"</span><span class="pl-kos">,</span> <span class="pl-s">"bar"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">foo</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">TDZ:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;foo&quot;: function () { return foo; }, &quot;bar&quot;: function () { return __imported_esmodule__[&quot;bar&quot;]; } }); var __imported_esmodule__ = __webpack_require__(&quot;./esmodule.js&quot;); function foo () {}"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"bar"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">[</span><span class="pl-s">"bar"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-en">foo</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <h2 dir="auto">of CJS module</h2> <p dir="auto">This emit is the same regardless of Implicit dependency or TDZ.</p> <p dir="auto"><code class="notranslate">reexportAll</code> receives the list of all named exports local to this module.<br> This includes explicit reexports, but does <em>not</em> include names coming from<br> other star reexports.</p> <p dir="auto">As <code class="notranslate">reexportAll</code> will freeze the exports, it will have to internally<br> <code class="notranslate">__webpack_require__</code> the dependent modules in order to be able to expose<br> their exports.</p> <p dir="auto">This also poisons all imports of this module such that they have to use<br> the <code class="notranslate">__webpack_require__.namespaceGet</code> helper to be able to read any<br> export that is not statically known to exist.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from './cjs' export function foo () {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./cjs'</span> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">foo</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="__webpack_require__.export(__webpack_module__, { &quot;foo&quot;: function () { return foo; } }, true); __webpack_require__.reexportAll(__webpack_module__, [ &quot;./cjs.js&quot; ], [ &quot;foo&quot; ]) function foo () {}"><pre class="notranslate"><span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</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">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexportAll</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"./cjs.js"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"foo"</span> <span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-k">function</span> <span class="pl-en">foo</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <h1 dir="auto">All export kinds combined</h1> <p dir="auto">With the same esmodule as the previous section.</p> <p dir="auto">Also has an import and a default anonymous export to demonstrate ordering.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import * as some from 'some-module' export { some } export default function () {} require('other-module') export let foo export { default as baz } from './esmodule' export * from './esmodule'; export * from './cjs';"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">some</span> <span class="pl-k">from</span> <span class="pl-s">'some-module'</span> <span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">some</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'other-module'</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">let</span> <span class="pl-s1">foo</span> <span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-s1">default</span> <span class="pl-k">as</span> <span class="pl-s1">baz</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span> <span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./esmodule'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./cjs'</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Implicit dependency:</p> <p dir="auto">When combining ES star reexport with CJS star reexport, a <code class="notranslate">true</code> third argument is required on <code class="notranslate">reexport</code> as well.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//exports var __webpack_default__ = { &quot;default&quot;: function () {} }[&quot;default&quot;]; __webpack_require__.export(__webpack_module__, { &quot;default&quot;: function () { return __webpack_default__; }, &quot;foo&quot;: function () { return foo; } }, true); __webpack_require__.reexport(__webpack_module__, { &quot;some&quot;: &quot;some-module&quot;, &quot;baz&quot;: [ &quot;./esmodule.js&quot;, &quot;default&quot; ] }, true); __webpack_require__.reexportAll(__webpack_module__, [ &quot;./cjs.js&quot; ], [ &quot;some&quot;, &quot;foo&quot;, &quot;baz&quot; ]); // imports var __imported_some_module__ = __webpack_require__.module(&quot;some-module&quot;); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); // code __webpack_require__(&quot;other-module&quot;); let foo;"><pre class="notranslate"><span class="pl-c">//exports</span> <span class="pl-k">var</span> <span class="pl-s1">__webpack_default__</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</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-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_default__</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</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">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexport</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"some"</span>: <span class="pl-s">"some-module"</span><span class="pl-kos">,</span> <span class="pl-s">"baz"</span>: <span class="pl-kos">[</span> <span class="pl-s">"./esmodule.js"</span><span class="pl-kos">,</span> <span class="pl-s">"default"</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexportAll</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"./cjs.js"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"some"</span><span class="pl-kos">,</span> <span class="pl-s">"foo"</span><span class="pl-kos">,</span> <span class="pl-s">"baz"</span> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// imports</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_some_module__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"some-module"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// code</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s">"other-module"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span></pre></div> <p dir="auto">TDZ:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// exports var __webpack_default__ = { &quot;default&quot;: function () {} }[&quot;default&quot;]; __webpack_require__.export(__webpack_module__, { &quot;some&quot;: function () { return __imported_some_module__; }, &quot;default&quot;: function () { return __webpack_default__; }, &quot;foo&quot;: function () { return foo; }, &quot;baz&quot;: function () { return __imported_esmodule__[&quot;default&quot;]; } }, true); __webpack_require__.reexportAll(__webpack_module__, [ &quot;./cjs.js&quot; ], [ &quot;some&quot;, &quot;foo&quot;, &quot;baz&quot; ]); // imports var __imported_some_module__ = __webpack_require__.module(&quot;some-module&quot;); var __imported_esmodule__ = __webpack_require__.module(&quot;./esmodule.js&quot;); // code __webpack_require__(&quot;other-module&quot;); let foo;"><pre class="notranslate"><span class="pl-c">// exports</span> <span class="pl-k">var</span> <span class="pl-s1">__webpack_default__</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-s">"default"</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-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">export</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-s">"some"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_some_module__</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"default"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__webpack_default__</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"foo"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s">"baz"</span>: <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">__imported_esmodule__</span><span class="pl-kos">[</span><span class="pl-s">"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-c1">true</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">reexportAll</span><span class="pl-kos">(</span><span class="pl-s1">__webpack_module__</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"./cjs.js"</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-s">"some"</span><span class="pl-kos">,</span> <span class="pl-s">"foo"</span><span class="pl-kos">,</span> <span class="pl-s">"baz"</span> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// imports</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_some_module__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"some-module"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">__imported_esmodule__</span> <span class="pl-c1">=</span> <span class="pl-s1">__webpack_require__</span><span class="pl-kos">.</span><span class="pl-en">module</span><span class="pl-kos">(</span><span class="pl-s">"./esmodule.js"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// code</span> <span class="pl-en">__webpack_require__</span><span class="pl-kos">(</span><span class="pl-s">"other-module"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">let</span> <span class="pl-s1">foo</span><span class="pl-kos">;</span></pre></div>
<h1 dir="auto">Bug report</h1> <p dir="auto">I have an issue with <a href="https://www.npmjs.com/package/planout" rel="nofollow">planout</a> that bundled fine with Webpack 4 but no longer works with Webpack 5.</p> <p dir="auto"><strong>What is the current behavior?</strong><br> Module is not loaded:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught TypeError: Getter must be a function: A at Function.defineProperty (&lt;anonymous&gt;) at Function.__webpack_require__.d (bundle.js:963) at eval (index.js:2) at Module../build/index.js (planout.js:102) at __nested_webpack_require_539__ (planout.js:25) at eval (planout.js:89) at eval (planout.js:92) at webpackUniversalModuleDefinition (planout.js:3) at eval (planout.js:5) at Object../node_modules/planout/dist/planout.js (bundle.js:291)"><pre class="notranslate"><code class="notranslate">Uncaught TypeError: Getter must be a function: A at Function.defineProperty (&lt;anonymous&gt;) at Function.__webpack_require__.d (bundle.js:963) at eval (index.js:2) at Module../build/index.js (planout.js:102) at __nested_webpack_require_539__ (planout.js:25) at eval (planout.js:89) at eval (planout.js:92) at webpackUniversalModuleDefinition (planout.js:3) at eval (planout.js:5) at Object../node_modules/planout/dist/planout.js (bundle.js:291) </code></pre></div> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br> Repo Here:</p> <p dir="auto"><a href="https://github.com/gita-v/webpack_issue">https://github.com/gita-v/webpack_issue</a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">For module to load :)</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.3.2<br> Node.js version: 14.14.0</p>
0
<p dir="auto">When bundling code that uses the <code class="notranslate">renderToString</code> method, multiple versions of react-dom are included in the bundle.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { renderToString } from 'react-dom/server';"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">renderToString</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom/server'</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This is the visualised breakdown of the code included in a bundle assembled with <a href="https://esbuild.github.io/" rel="nofollow">esbuild</a> with the following options (it is bundled up for use in a server rather than client):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ plugins: [pnpPlugin()], bundle: true, entryPoints: [`${routesDir}/${config.relativeFilePath}`], external: [ 'aws-sdk', // included in Lambda runtime environment ], minify: true, platform: 'node', format: 'cjs', target: 'node16.0', treeShaking: true, sourcemap: true, outfile: getOutFileForLambda(config), metafile: true, }"><pre class="notranslate"><code class="notranslate">{ plugins: [pnpPlugin()], bundle: true, entryPoints: [`${routesDir}/${config.relativeFilePath}`], external: [ 'aws-sdk', // included in Lambda runtime environment ], minify: true, platform: 'node', format: 'cjs', target: 'node16.0', treeShaking: true, sourcemap: true, outfile: getOutFileForLambda(config), metafile: true, } </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1448524/177215014-bc1caa58-2890-4b46-97d7-d3a0e52c57c1.png"><img src="https://user-images.githubusercontent.com/1448524/177215014-bc1caa58-2890-4b46-97d7-d3a0e52c57c1.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Note here the following files are included:</p> <ul dir="auto"> <li><code class="notranslate">react-dom-server-legacy.node.production.min.js</code></li> <li><code class="notranslate">react-dom-server.node.production.min.js</code></li> <li><code class="notranslate">react-dom-server.node.development.js</code></li> <li><code class="notranslate">react-dom-server-legacy.node.development.js</code></li> <li><code class="notranslate">react-dom.production.min.js</code></li> <li><code class="notranslate">react-dom.development.js</code></li> </ul> <p dir="auto">I would assume only two of these should be required (one for <code class="notranslate">react-dom</code> and one for <code class="notranslate">react-dom-server</code>).</p> <p dir="auto">Note I carefully cleaned the dependency tree of the project to ensure there is only one version of <code class="notranslate">react</code> and <code class="notranslate">react-dom</code> referenced.</p> <p dir="auto">The workspace this was tested in was created using Yarn 3.</p> <p dir="auto">React version: 18.2.0</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Create a file <code class="notranslate">render.ts</code> that contains a call to the renderToString method.</li> </ol> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import type React from 'react'; import { renderToString } from 'react-dom/server'; renderToString(&lt;div&gt;Hi&lt;/div&gt;);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-k">type</span> <span class="pl-smi">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">renderToString</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom/server'</span><span class="pl-kos">;</span> <span class="pl-s1">renderToString</span><span class="pl-kos">(</span><span class="pl-kos">&lt;</span><span class="pl-smi">div</span><span class="pl-kos">&gt;</span><span class="pl-smi">Hi</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span>div&gt;<span class="pl-kos">)</span>;</pre></div> <ol start="2" dir="auto"> <li>Provide this file as the <a href="https://esbuild.github.io/api/#entry-points" rel="nofollow"><code class="notranslate">entrypoint</code></a> to bundle it with esbuild</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="esbuild render.ts --bundle --metafile=meta.json --platform=node"><pre class="notranslate"><code class="notranslate">esbuild render.ts --bundle --metafile=meta.json --platform=node </code></pre></div> <ol start="3" dir="auto"> <li>Visualise <code class="notranslate">meta.json</code> with <a href="https://www.npmjs.com/package/esbuild-visualizer" rel="nofollow"><code class="notranslate">esbuild-visualizer</code></a></li> </ol> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="esbuild-visualizer --metadata ./meta.json"><pre class="notranslate">esbuild-visualizer --metadata ./meta.json</pre></div> <h2 dir="auto">The current behavior</h2> <p dir="auto">When using the <code class="notranslate">renderToString</code> method in a file that is bundled, the following files are included in the bundle.</p> <ul dir="auto"> <li><code class="notranslate">react-dom-server-legacy.node.production.min.js</code></li> <li><code class="notranslate">react-dom-server.node.production.min.js</code></li> <li><code class="notranslate">react-dom-server.node.development.js</code></li> <li><code class="notranslate">react-dom-server-legacy.node.development.js</code></li> <li><code class="notranslate">react-dom.production.min.js</code></li> <li><code class="notranslate">react-dom.development.js</code></li> </ul> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Only one instance of <code class="notranslate">react-dom</code> and <code class="notranslate">react-dom-server</code> should be included in the bundle.</p> <p dir="auto">Note there is some reference to a legacy dom server in <code class="notranslate">react/server.node.js</code> which maybe causing this issue:</p> <p dir="auto"><a href="https://github.com/facebook/react/blob/main/packages/react-dom/server.node.js#L15">https://github.com/facebook/react/blob/main/packages/react-dom/server.node.js#L15</a></p>
<p dir="auto">Using destructuring assignment on objects falsely triggers <code class="notranslate">use-exhaustive-deps</code>. For example, I would expect the following not to trigger lint rule:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const object = { hello: 'world', foo: 'bar' } useEffect(() =&gt; { const { hello } = object console.log(hello) }, [object.hello])"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">object</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">hello</span>: <span class="pl-s">'world'</span><span class="pl-kos">,</span> <span class="pl-c1">foo</span>: <span class="pl-s">'bar'</span> <span class="pl-kos">}</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> hello <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">object</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">hello</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">object</span><span class="pl-kos">.</span><span class="pl-c1">hello</span><span class="pl-kos">]</span><span class="pl-kos">)</span></pre></div> <p dir="auto">The linter insists I pass <code class="notranslate">object</code> to the dependency array which is problematic since objects are compared by reference instead of value. I could destructure out of the useEffect block but this can cause naming collisions for bigger components/hooks. I can also assign variables the old fashioned way but that conflicts with our coding style.</p> <p dir="auto">The linting rule also has trouble with safety operator:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const object = { hello: 'world', foo: 'bar' } useEffect(() =&gt; { const hello = object?.hello console.log(hello) }, [object.hello])"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">object</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">hello</span>: <span class="pl-s">'world'</span><span class="pl-kos">,</span> <span class="pl-c1">foo</span>: <span class="pl-s">'bar'</span> <span class="pl-kos">}</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">hello</span> <span class="pl-c1">=</span> <span class="pl-s1">object</span><span class="pl-kos">?.</span><span class="pl-c1">hello</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">hello</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">object</span><span class="pl-kos">.</span><span class="pl-c1">hello</span><span class="pl-kos">]</span><span class="pl-kos">)</span></pre></div> <p dir="auto">will cause it to ask for object in the dependency array.</p>
0
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export 'CC=gcc -lgcc' export LDSHARED=&quot;/opt/freeware/lib64/python3.7/config-3.7m/ld_so_aix gcc -bI:/opt/freeware/lib64/python3.7/config-3.7m/python.exp&quot; export CFLAGS=&quot;-pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts&quot; # oslevel -s 6100-09-12-1837 # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/lto-wrapper Target: powerpc-ibm-aix6.1.0.0 Configured with: ../gcc-6.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix6.1.0.0 Thread model: aix gcc version 6.3.0 (GCC) # python -V Python 3.7.4 # pip list Package Version ---------- ------- Cython 0.29.16 numpy 1.16.0 pip 19.1 setuptools 40.8.0 # python3 Python 3.7.4 (default, Nov 7 2019, 21:34:34) [GCC 6.3.0] on aix6 Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import numpy as np Traceback (most recent call last): File &quot;/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/__init__.py&quot;, line 16, in &lt;module&gt; from . import multiarray File &quot;/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/multiarray.py&quot;, line 12, in &lt;module&gt; from . import overrides File &quot;/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/overrides.py&quot;, line 9, in &lt;module&gt; from numpy.core._multiarray_umath import add_docstring, ndarray ImportError: 0509-022 Cannot load module /opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/_multiarray_umath.so. 0509-026 System error: Cannot run a file that does not have a valid format. 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;/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/__init__.py&quot;, line 142, in &lt;module&gt; from . import core File &quot;/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/__init__.py&quot;, line 47, in &lt;module&gt; raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. Here is how to proceed: - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. - If you are simply trying to use the numpy version that you have installed: your installation is broken - please reinstall numpy. - If you have already reinstalled and that did not fix the problem, then: 1. Check that you are using the Python you expect (you're using /usr/bin/python3), and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy versions you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: 0509-022 Cannot load module /opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/_multiarray_umath.so. 0509-026 System error: Cannot run a file that does not have a valid format."><pre class="notranslate"><code class="notranslate">export 'CC=gcc -lgcc' export LDSHARED="/opt/freeware/lib64/python3.7/config-3.7m/ld_so_aix gcc -bI:/opt/freeware/lib64/python3.7/config-3.7m/python.exp" export CFLAGS="-pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts" # oslevel -s 6100-09-12-1837 # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/lto-wrapper Target: powerpc-ibm-aix6.1.0.0 Configured with: ../gcc-6.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix6.1.0.0 Thread model: aix gcc version 6.3.0 (GCC) # python -V Python 3.7.4 # pip list Package Version ---------- ------- Cython 0.29.16 numpy 1.16.0 pip 19.1 setuptools 40.8.0 # python3 Python 3.7.4 (default, Nov 7 2019, 21:34:34) [GCC 6.3.0] on aix6 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import numpy as np Traceback (most recent call last): File "/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/__init__.py", line 16, in &lt;module&gt; from . import multiarray File "/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/multiarray.py", line 12, in &lt;module&gt; from . import overrides File "/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/overrides.py", line 9, in &lt;module&gt; from numpy.core._multiarray_umath import add_docstring, ndarray ImportError: 0509-022 Cannot load module /opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/_multiarray_umath.so. 0509-026 System error: Cannot run a file that does not have a valid format. 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 "/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/__init__.py", line 142, in &lt;module&gt; from . import core File "/opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/__init__.py", line 47, in &lt;module&gt; raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. Here is how to proceed: - If you're working with a numpy git repository, try `git clean -xdf` (removes all files not under version control) and rebuild numpy. - If you are simply trying to use the numpy version that you have installed: your installation is broken - please reinstall numpy. - If you have already reinstalled and that did not fix the problem, then: 1. Check that you are using the Python you expect (you're using /usr/bin/python3), and that you have no directories in your PATH or PYTHONPATH that can interfere with the Python and numpy versions you're trying to use. 2. If (1) looks fine, you can open a new issue at https://github.com/numpy/numpy/issues. Please include details on: - how you installed Python - how you installed numpy - your operating system - whether or not you have multiple versions of Python installed - if you built from source, your compiler versions and ideally a build log Note: this error has many possible causes, so please don't comment on an existing issue about this - open a new one instead. Original error was: 0509-022 Cannot load module /opt/freeware/lib64/python3.7/site-packages/numpy-1.16.0-py3.7-aix-6.1.egg/numpy/core/_multiarray_umath.so. 0509-026 System error: Cannot run a file that does not have a valid format. </code></pre></div>
<p dir="auto">bash-5.0# gcc -v<br> Using built-in specs.<br> COLLECT_GCC=gcc<br> COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/lto-wrapper<br> Target: powerpc-ibm-aix6.1.0.0<br> Configured with: ../gcc-6.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix6.1.0.0<br> Thread model: aix<br> gcc version 6.3.0 (GCC)<br> bash-5.0# python -V<br> Python 3.6.6</p> <p dir="auto">bash-5.0# python<br> Python 3.6.6 (default, Jul 11 2018, 05:41:50)<br> [GCC 6.3.0] on aix6<br> Type "help", "copyright", "credits" or "license" for more information.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">import numpy<br> Traceback (most recent call last):<br> File "/opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/<strong>init</strong>.py", line 16, in <br> from . import multiarray<br> File "/opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/multiarray.py", line 12, in <br> from . import overrides<br> File "/opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/overrides.py", line 9, in <br> from numpy.core._multiarray_umath import add_docstring, ndarray<br> ImportError: 0509-022 Cannot load module /opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/_multiarray_umath.so.<br> 0509-026 System error: Cannot run a file that does not have a valid format.</p> </blockquote> </blockquote> </blockquote> <p dir="auto">During handling of the above exception, another exception occurred:</p> <p dir="auto">Traceback (most recent call last):<br> File "", line 1, in <br> File "/opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/<strong>init</strong>.py", line 142, in <br> from . import core<br> File "/opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/<strong>init</strong>.py", line 47, in <br> raise ImportError(msg)<br> ImportError:</p> <p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p> <p dir="auto">Importing the multiarray numpy extension module failed. Most<br> likely you are trying to import a failed build of numpy.<br> Here is how to proceed:</p> <ul dir="auto"> <li>If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br> (removes all files not under version control) and rebuild numpy.</li> <li>If you are simply trying to use the numpy version that you have installed:<br> your installation is broken - please reinstall numpy.</li> <li>If you have already reinstalled and that did not fix the problem, then: <ol dir="auto"> <li> <p dir="auto">Check that you are using the Python you expect (you're using /usr/bin/python),<br> and that you have no directories in your PATH or PYTHONPATH that can<br> interfere with the Python and numpy versions you're trying to use.</p> </li> <li> <p dir="auto">If (1) looks fine, you can open a new issue at<br> <a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>. Please include details on:</p> <ul dir="auto"> <li>how you installed Python</li> <li>how you installed numpy</li> <li>your operating system</li> <li>whether or not you have multiple versions of Python installed</li> <li>if you built from source, your compiler versions and ideally a build log</li> </ul> <p dir="auto">Note: this error has many possible causes, so please don't comment on<br> an existing issue about this - open a new one instead.</p> </li> </ol> </li> </ul> <p dir="auto">Original error was: 0509-022 Cannot load module /opt/freeware/lib64/python3.6/site-packages/numpy-1.16.0-py3.6-aix-6.1.egg/numpy/core/_multiarray_umath.so.<br> 0509-026 System error: Cannot run a file that does not have a valid format.</p>
1
<ul dir="auto"> <li>VSCode Version: Latest insiders</li> <li>OS Version: Win10</li> </ul> <p dir="auto">see gif<br> i have settings javascript.validation.enable set to false</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5f16dda9afe5d3531ddaedde8d1c0f73a359627a655b1e048307e04644d27e59/687474703a2f2f672e7265636f726469742e636f2f75556c4552374e364a722e676966"><img src="https://camo.githubusercontent.com/5f16dda9afe5d3531ddaedde8d1c0f73a359627a655b1e048307e04644d27e59/687474703a2f2f672e7265636f726469742e636f2f75556c4552374e364a722e676966" alt="record" data-animated-image="" data-canonical-src="http://g.recordit.co/uUlER7N6Jr.gif" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>VSCode Version: 0.10.13 (insider)</li> <li>OS Version: OS X 10.10.5</li> </ul> <p dir="auto">Steps to Reproduce:</p> <p dir="auto">1.create a new .js file and past the following example code in:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default function promiseMiddleware () { return next =&gt; action =&gt; { const {promise , type , ...rest} = action; if (!promise) return next(action); const SUCCESS = type; const REQUEST = type + '_REQUEST'; const FAILURE = type + '_FAILURE'; next({...rest,type: REQUEST}); return promise .then(res =&gt; { next({res,type: SUCCESS}); return true; }) .catch(error =&gt; { next({...rest,error,type: FAILURE}); return false; }); }; }"><pre class="notranslate"><code class="notranslate">export default function promiseMiddleware () { return next =&gt; action =&gt; { const {promise , type , ...rest} = action; if (!promise) return next(action); const SUCCESS = type; const REQUEST = type + '_REQUEST'; const FAILURE = type + '_FAILURE'; next({...rest,type: REQUEST}); return promise .then(res =&gt; { next({res,type: SUCCESS}); return true; }) .catch(error =&gt; { next({...rest,error,type: FAILURE}); return false; }); }; } </code></pre></div> <p dir="auto">2.<code class="notranslate">cmd-shift-p</code> then type <code class="notranslate">format code</code></p> <p dir="auto">With the spread operator (<code class="notranslate">...rest</code>) this causes a weird formatting issue (indent level) resulting in:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default function promiseMiddleware() { return next =&gt; action =&gt; { const {promise, type, ...rest} = action; if (!promise) return next(action); const SUCCESS = type; const REQUEST = type + '_REQUEST'; const FAILURE = type + '_FAILURE'; next({...rest, type: REQUEST}); return promise .then(res =&gt; { next({ res, type: SUCCESS }); return true; }) .catch(error =&gt; { next({...rest, error, type: FAILURE}); return false; }); }; }"><pre class="notranslate"><code class="notranslate">export default function promiseMiddleware() { return next =&gt; action =&gt; { const {promise, type, ...rest} = action; if (!promise) return next(action); const SUCCESS = type; const REQUEST = type + '_REQUEST'; const FAILURE = type + '_FAILURE'; next({...rest, type: REQUEST}); return promise .then(res =&gt; { next({ res, type: SUCCESS }); return true; }) .catch(error =&gt; { next({...rest, error, type: FAILURE}); return false; }); }; } </code></pre></div> <p dir="auto">Removing all instances of the spread operator (<code class="notranslate">...rest</code>) and repeating step 2 formats the code properly</p>
1
<p dir="auto">I'm trying to pass an <code class="notranslate">Input</code> component styled with styled-components into select and getting the warning:<br> <code class="notranslate">Material-UI: you have provided an invalid value to the </code>input<code class="notranslate">property., We expect an element instance of the</code>Input<code class="notranslate"> component.</code></p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I should be able to pass an Input styled with styled components to Select</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const StyledInput = styled(Input) &lt;Select input={&lt;StyledInput /&gt;} /&gt;"><pre class="notranslate"><code class="notranslate">const StyledInput = styled(Input) &lt;Select input={&lt;StyledInput /&gt;} /&gt; </code></pre></div> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Throws warning:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="warning( isMuiElement(input, ['Input']), [ 'Material-UI: you have provided an invalid value to the `input` property.', 'We expect an element instance of the `Input` component.', ].join('\n'), );"><pre class="notranslate"><code class="notranslate">warning( isMuiElement(input, ['Input']), [ 'Material-UI: you have provided an invalid value to the `input` property.', 'We expect an element instance of the `Input` component.', ].join('\n'), ); </code></pre></div> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/4qql0opo0w" rel="nofollow">https://codesandbox.io/s/4qql0opo0w</a></p> <h2 dir="auto">Context</h2> <p dir="auto">I'm trying to compose some custom mui elements</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.26</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> <tr> <td>StyledComponents</td> <td>2.2.4</td> </tr> <tr> <td>browser</td> <td>63.0.3239.84</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><code class="notranslate">&lt;TextField type="number" min="0" max="10" step="1" /&gt;</code> should compile with Typescript</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Receive following Typescript error for min, similar for max and step: <code class="notranslate">[ts] Property 'min' does not exist on type 'IntrinsicAttributes &amp; TextFieldProps &amp; { children?: ReactNode; }'.</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.0-beta.21</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>Typescript</td> <td>2.6.1</td> </tr> </tbody> </table>
0
<p dir="auto">There seems to be an outdated tutorial page online at <a href="https://matplotlib.org/users/beginner.html" rel="nofollow">https://matplotlib.org/users/beginner.html</a> . It has the old “Matplotlib 2.0.0rc2 is available – Install the release candidate now!“ banner.</p> <p dir="auto">I guess it’s not reachable from the main page, but it comes up in Google results.</p>
<p dir="auto">On the current live docs, the examples page claims to be from release <code class="notranslate">2.0.2</code>, but it should be <code class="notranslate">2.1</code>: <a href="http://matplotlib.org/examples/index.html" rel="nofollow">http://matplotlib.org/examples/index.html</a></p>
1
<p dir="auto">Looking at the demos on <a href="http://material-ui.com" rel="nofollow">http://material-ui.com</a> for Buttons I noticed the click effect is broken in Firefox. The click effect works fine on Lists though, so there's just something weird going on with buttons in Firefox. It works fine on Chrome.</p>
<p dir="auto">I am using Firefox 45 on Linux, and the demo app at <a href="http://www.material-ui.com/#/customization/themes" rel="nofollow">http://www.material-ui.com/#/customization/themes</a> (version 0.14.4) shows that the ripple effect works well for everything but the buttons.</p> <p dir="auto">That includes the Tab headers, which I suspect are buttons as well.</p> <p dir="auto">The problem is present with alphas for 0.15 as well</p>
1
<p dir="auto">I have a DAE model that previews fine in macOS Catalina with animation. Drag and dropping into GLTF converter (<a href="https://blackthread.io/gltf-converter/" rel="nofollow">https://blackthread.io/gltf-converter/</a>) shows the model but not the animation. Animations from a test FBX do show.</p> <p dir="auto">MacOS 10.15.1 DAE Preview (it is animating)</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13670112/71232430-d3b52100-22a6-11ea-9b07-6abafce4ed2d.png"><img width="212" alt="Screen Shot 2019-12-19 at 9 27 25 PM" src="https://user-images.githubusercontent.com/13670112/71232430-d3b52100-22a6-11ea-9b07-6abafce4ed2d.png" style="max-width: 100%;"></a></p> <p dir="auto">The same DAE file also loads properly into Cheetah3D with working animation.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13670112/71232968-ea5c7780-22a8-11ea-8379-59e7d4b5adb5.png"><img width="1165" alt="Screen Shot 2019-12-19 at 9 29 07 PM" src="https://user-images.githubusercontent.com/13670112/71232968-ea5c7780-22a8-11ea-8379-59e7d4b5adb5.png" style="max-width: 100%;"></a></p> <p dir="auto">Model File Attached:</p> <p dir="auto"><a href="https://github.com/mrdoob/three.js/files/3986899/Ezreal_Idle.dae.zip">Ezreal_Idle.dae.zip</a></p> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r111</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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" checked=""> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5> <p dir="auto">MacBook Pro 13" i5 1.4Ghz<br> Intel Iris Plus Graphics 645 1536 MB</p>
<h5 dir="auto">Description of the problem</h5> <p dir="auto">Hello,</p> <p dir="auto">The following is a <strong>solution</strong> to a problem I have just faced with the <strong>animations</strong> parsed by the new ColladaLoader.</p> <p dir="auto">I use Autodesk Maya 2017, and when exporting the 3D model containing animations, an extra <code class="notranslate">&lt;animation&gt;</code> tag has been added under the "real" <code class="notranslate">&lt;animation&gt;</code> tag.</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;animation id=​&quot;xxx-anim&quot; name=​&quot;xxx&quot;&gt; ​&lt;animation&gt; ​&lt;source id=​&quot;xxx-Matrix-animation-input&quot;&gt;​&lt;/source&gt;​ &lt;source id=​&quot;xxx-Matrix-animation-output-transform&quot;&gt;&lt;/source&gt; ​&lt;source id=​&quot;xxx-Interpolations&quot;&gt;​​&lt;/source&gt;​ &lt;sampler id=​&quot;xxx-Matrix-animation-transform&quot;&gt;​&lt;/sampler&gt; ​&lt;channel source=​&quot;#xxx-Matrix-animation-transform&quot; target=​&quot;xxx/​matrix&quot;&gt;​&lt;/channel&gt;​ &lt;/animation&gt; ​&lt;/animation&gt;"><pre class="notranslate">&lt;<span class="pl-ent">animation</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-anim<span class="pl-pds">"</span></span> <span class="pl-e">name</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx<span class="pl-pds">"</span></span>&gt; ​&lt;<span class="pl-ent">animation</span>&gt; ​&lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-input<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">source</span>&gt;​ &lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-output-transform<span class="pl-pds">"</span></span>&gt;&lt;/<span class="pl-ent">source</span>&gt; ​&lt;<span class="pl-ent">source</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Interpolations<span class="pl-pds">"</span></span>&gt;​​&lt;/<span class="pl-ent">source</span>&gt;​ &lt;<span class="pl-ent">sampler</span> <span class="pl-e">id</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx-Matrix-animation-transform<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">sampler</span>&gt; ​&lt;<span class="pl-ent">channel</span> <span class="pl-e">source</span>=​<span class="pl-s"><span class="pl-pds">"</span>#xxx-Matrix-animation-transform<span class="pl-pds">"</span></span> <span class="pl-e">target</span>=​<span class="pl-s"><span class="pl-pds">"</span>xxx/​matrix<span class="pl-pds">"</span></span>&gt;​&lt;/<span class="pl-ent">channel</span>&gt;​ &lt;/<span class="pl-ent">animation</span>&gt; ​&lt;/<span class="pl-ent">animation</span>&gt;</pre></div> <p dir="auto">I digged into the source code of the <code class="notranslate">ColladaLoader</code> and I added the following lines into the <code class="notranslate">parseAnimation( xml )</code> function in order to handle this extra tag:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="switch ( child.nodeName ) { /* Handling 'source', 'sampler' and 'channel' */ case 'animation': child.setAttribute( 'id', xml.getAttribute( 'id' ) ); child.setAttribute( 'name', xml.getAttribute( 'name' ) ); parseAnimation( child ); return; }"><pre class="notranslate"><span class="pl-k">switch</span> <span class="pl-kos">(</span> <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-c1">nodeName</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">/* Handling 'source', 'sampler' and 'channel' */</span> <span class="pl-k">case</span> <span class="pl-s">'animation'</span>: <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-en">setAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'id'</span><span class="pl-kos">,</span> <span class="pl-s1">xml</span><span class="pl-kos">.</span><span class="pl-en">getAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'id'</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">child</span><span class="pl-kos">.</span><span class="pl-en">setAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'name'</span><span class="pl-kos">,</span> <span class="pl-s1">xml</span><span class="pl-kos">.</span><span class="pl-en">getAttribute</span><span class="pl-kos">(</span> <span class="pl-s">'name'</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">parseAnimation</span><span class="pl-kos">(</span> <span class="pl-s1">child</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r92</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li> </ul>
1
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">A monitor edge management screen to virtually link monitor edges to allow the mouse to flow from one to another. Currently available program called littlebigmouse isn't the most reliable and is no longer active. When it works it is extremely smooth. I have 4 monitors setup and from left to right I want to be able to go from one monitor to either middle monitor back to one monitor. The default windows setup is extremely annoying because when moving from the middle top to the far left monitor you always get stuck on an edge. This combined with fancy zones is a very smooth experience.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/515162/86196174-a7654180-bb20-11ea-9f18-3864539ad05d.PNG"><img src="https://user-images.githubusercontent.com/515162/86196174-a7654180-bb20-11ea-9f18-3864539ad05d.PNG" alt="big mouse" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/515162/86196549-789b9b00-bb21-11ea-9e9a-4b4d11721619.PNG"><img src="https://user-images.githubusercontent.com/515162/86196549-789b9b00-bb21-11ea-9e9a-4b4d11721619.PNG" alt="mouse bad" style="max-width: 100%;"></a></p> <p dir="auto">The UI for littlebigmouse conceptually makes a lot of sense. It unfortunately is very difficult to get setup due to a busy screen and hard to control interface.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">I want to be able to share my zones independently as screens in Teams etc.<br> e.g. 4K screen split into 4x1080p zones - I want different applications in each zone and the ability to share a zone rather than an application or screen.<br> Is this a FancyZones enhancement or a Teams integration request?</p>
0
<h2 dir="auto">Environment info</h2> <ul dir="auto"> <li><code class="notranslate">transformers</code> version: 4.0.0 --rc1</li> <li>Platform: Colab</li> <li>Python version: 3.6.9</li> <li>PyTorch version (GPU?): TESLA V4</li> <li>Tensorflow version (GPU?): 2.3.0</li> <li>Using GPU in script?: YES</li> <li>Using distributed or parallel set-up in script?: NO</li> </ul> <h3 dir="auto">Who can help</h3> <h2 dir="auto">Information</h2> <p dir="auto">Model I am using (Bert, XLNet ...): T5-1.1</p> <p dir="auto">The problem arises when using:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> the official example scripts: (give details below)</li> <li>[X ] my own modified scripts: (give details below)</li> </ul> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from transformers import T5TokenizerFast, T5ForConditionalGeneration TOKENIZER_NAME = 't5-base' MODEL_NAME = 'google/t5-v1_1-base' tokenizer = T5TokenizerFast.from_pretrained(MODEL_NAME) special_tokens_dict = {'additional_special_tokens': ['&lt;ORG&gt;','&lt;PERSON&gt;']} num_added_toks = tokenizer.add_special_tokens(special_tokens_dict) model = T5ForConditionalGeneration.from_pretrained('google/t5-v1_1-base', return_dict=True) model.resize_token_embeddings(len(tokenizer)) model.to(&quot;cuda&quot;)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">transformers</span> <span class="pl-k">import</span> <span class="pl-v">T5TokenizerFast</span>, <span class="pl-v">T5ForConditionalGeneration</span> <span class="pl-v">TOKENIZER_NAME</span> <span class="pl-c1">=</span> <span class="pl-s">'t5-base'</span> <span class="pl-v">MODEL_NAME</span> <span class="pl-c1">=</span> <span class="pl-s">'google/t5-v1_1-base'</span> <span class="pl-s1">tokenizer</span> <span class="pl-c1">=</span> <span class="pl-v">T5TokenizerFast</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-v">MODEL_NAME</span>) <span class="pl-s1">special_tokens_dict</span> <span class="pl-c1">=</span> {<span class="pl-s">'additional_special_tokens'</span>: [<span class="pl-s">'&lt;ORG&gt;'</span>,<span class="pl-s">'&lt;PERSON&gt;'</span>]} <span class="pl-s1">num_added_toks</span> <span class="pl-c1">=</span> <span class="pl-s1">tokenizer</span>.<span class="pl-en">add_special_tokens</span>(<span class="pl-s1">special_tokens_dict</span>) <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">T5ForConditionalGeneration</span>.<span class="pl-en">from_pretrained</span>(<span class="pl-s">'google/t5-v1_1-base'</span>, <span class="pl-s1">return_dict</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">model</span>.<span class="pl-en">resize_token_embeddings</span>(<span class="pl-en">len</span>(<span class="pl-s1">tokenizer</span>)) <span class="pl-s1">model</span>.<span class="pl-en">to</span>(<span class="pl-s">"cuda"</span>)</pre></div> <p dir="auto">The tasks I am working on is:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> an official GLUE/SQUaD task: (give the name)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> my own task or dataset: (give details below)<br> Custom dataset</li> </ul> <h2 dir="auto">To reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Attempting to add Entity tokens to T5 1.1, upon loading from pretrained the following error occurs:<br> <code class="notranslate">size mismatch for lm_head.weight: copying a param with shape torch.Size([32128, 768]) from checkpoint, the shape in current model is torch.Size([32102, 768]).</code></li> </ol> <p dir="auto">I am assuming the addition of the special tokens did not get propagated to the lm head size.</p> <p dir="auto">I would expect the LM Head to be resized in addition to the standard layers.</p> <p dir="auto">Many Thanks,<br> Chris</p>
<h2 dir="auto">Environment info</h2> <p dir="auto">Google colab</p> <h3 dir="auto">Who can help</h3> <p dir="auto">T5: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patrickvonplaten/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patrickvonplaten">@patrickvonplaten</a></p> <h2 dir="auto">Information</h2> <p dir="auto">I'm noticing something strange with T5. The model embedding size and the tokenizer size does not match.<br> When I try to resize the model to have a smaller embedding this crashes CUDA. This is probably two bugs - one for the size mismatch, and one for shortening the embedding causing a crash.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained(&quot;t5-base&quot;) print (len(tokenizer)) model = AutoModel.from_pretrained(&quot;t5-base&quot;) print (model.shared) model.resize_token_embeddings(len(tokenizer)) model.to('cuda')"><pre class="notranslate"><code class="notranslate">from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("t5-base") print (len(tokenizer)) model = AutoModel.from_pretrained("t5-base") print (model.shared) model.resize_token_embeddings(len(tokenizer)) model.to('cuda') </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Expected behaviour is regular loading of the model into cuda.</p> <h2 dir="auto">What I got instead was:<br> 32100<br> Some weights of T5Model were not initialized from the model checkpoint at t5-base and are newly initialized: ['encoder.embed_tokens.weight', 'decoder.embed_tokens.weight']<br> You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.<br> Embedding(32128, 768)</h2> <p dir="auto">RuntimeError Traceback (most recent call last)<br> in ()<br> 5 print (model.shared)<br> 6 model.resize_token_embeddings(len(tokenizer))<br> ----&gt; 7 model.to('cuda')</p> <p dir="auto">3 frames<br> /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in convert(t)<br> 608 if convert_to_format is not None and t.dim() == 4:<br> 609 return t.to(device, dtype if t.is_floating_point() else None, non_blocking, memory_format=convert_to_format)<br> --&gt; 610 return t.to(device, dtype if t.is_floating_point() else None, non_blocking)<br> 611<br> 612 return self._apply(convert)</p> <p dir="auto">RuntimeError: CUDA error: device-side assert triggered</p>
1
<p dir="auto">Given a role:</p> <p dir="auto">web_server /<br> tasks /<br> main.yml<br> files /<br> httpd.conf</p> <p dir="auto">And a task:</p> <ul dir="auto"> <li>name: sync | httpd confnig<br> synchronize: src=httpd.conf dest=/etc/apache2/conf.d/widget.conf</li> </ul> <p dir="auto">You'll get an error because it assumes httpd.conf is based in the same directory you call ansible playbook from. The copy module however will happily check files/ for you.</p> <h5 dir="auto">Issue Type:</h5> <p dir="auto">What kind of ticket is this? You can say “Bug Report�, “Feature Idea�, “Feature Pull Request�, “New Module Pull Request�, “Bugfix Pull Request�, “Documentation Report�, or “Docs Pull Request�.</p> <h5 dir="auto">Ansible Version:</h5> <p dir="auto">Please supply the verbatim output from running “ansible --version�.</p> <h5 dir="auto">Environment:</h5> <p dir="auto">What OS are you running Ansible from and what OS are you managing? Examples include RHEL 5/6, Centos 5/6, Ubuntu 12.04/13.10, *BSD, Solaris. If this is a generic feature request or it doesn’t apply, just say “N/A�.</p> <h5 dir="auto">Summary:</h5> <p dir="auto">Please summarize your request in this space. You will earn bonus points for being succinct, but please add enough detail so we can understand the request.</p> <h5 dir="auto">Steps To Reproduce:</h5> <p dir="auto">If this is a bug ticket, please enter the steps you use to reproduce the problem in the space below. If this is a feature request, please enter the steps you would use to use the feature. If an example playbook is useful, please include a short reproducer inline, indented by four spaces. If a longer one is necessary, please link one uploaded to gist.github.com.</p> <h5 dir="auto">Expected Results:</h5> <p dir="auto">Please enter your expected results in this space. When running the steps supplied above, what would you expect to happen? If showing example output, indent your output by four spaces so it will render correctly in GitHub.</p> <h5 dir="auto">Actual Results:</h5> <p dir="auto">Please enter your actual results in this space. When running the steps supplied above, what actually happened? If showing example output, indent your output by four spaces so it will render correctly in GitHub.</p>
<p dir="auto">When trying to run a playbook with the synchronize module, the relative path is relative to where you are executing the playbook from, and it does not follow the roles logic.</p> <p dir="auto">Example Playbook:</p> <p dir="auto">-- roles/server/files/etc/scripts/test1.txt<br> -- roles/server/files/etc/scripts/test2.txt</p> <p dir="auto">-- roles/server/tasks/keep_files_synchronized.yml<br> --&gt; name: copy files to server<br> --&gt; synchronize: src=etc/scripts/ dest=/etc/scripts/ delete=yes</p>
1
<p dir="auto">Maybe related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="225224445" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/24139" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/24139/hovercard" href="https://github.com/ansible/ansible/issues/24139">#24139</a><br> Different HTTP error code 500</p> <h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">contrib/inventory/proxmox.py</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">ansible 2.3.0.0<br> config file = /etc/ansible/ansible.cfg<br> configured module search path = [u'/usr/lib/python2.7/site-packages/ansible/modules/extras', u'/usr/lib/python2.7/site-packages/ansible/modules/core']<br> python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]</p> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">nothing special</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">CentOS 7.3</p> <h5 dir="auto">SUMMARY</h5> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - hosts: 127.0.0.1 connection: local vars: - proxmox_user: ansible@pve - proxmox_password: badpasswd - proxmox_host: 1.2.3.4 tasks: - proxmox: state: present # vmid: 103 # validate_certs: no node: 'pve' api_user: &quot;{{ proxmox_user }}&quot; api_password: &quot;{{ proxmox_password }}&quot; api_host: &quot;{{ proxmox_host }}&quot; # disk: 8 storage: 'pve-storage' # memory: 512 # swap: 512 password: evenbetterpasswd hostname: lxctest ostemplate: 'pve-templates:vztmpl/centos-7-default_20160205_amd64.tar.xz' # netif: '{&quot;net0&quot;:&quot;name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0,tag=2&quot;}'"><pre class="notranslate">--- - <span class="pl-ent">hosts</span>: <span class="pl-s">127.0.0.1</span> <span class="pl-ent">connection</span>: <span class="pl-s">local</span> <span class="pl-ent">vars</span>: - <span class="pl-ent">proxmox_user</span>: <span class="pl-s">ansible@pve</span> - <span class="pl-ent">proxmox_password</span>: <span class="pl-s">badpasswd</span> - <span class="pl-ent">proxmox_host</span>: <span class="pl-s">1.2.3.4</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">proxmox</span>: <span class="pl-ent">state</span>: <span class="pl-s">present</span> <span class="pl-c"><span class="pl-c">#</span> vmid: 103</span> <span class="pl-c"><span class="pl-c">#</span> validate_certs: no</span> <span class="pl-ent">node</span>: <span class="pl-s"><span class="pl-pds">'</span>pve<span class="pl-pds">'</span></span> <span class="pl-ent">api_user</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ proxmox_user }}<span class="pl-pds">"</span></span> <span class="pl-ent">api_password</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ proxmox_password }}<span class="pl-pds">"</span></span> <span class="pl-ent">api_host</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ proxmox_host }}<span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> disk: 8</span> <span class="pl-ent">storage</span>: <span class="pl-s"><span class="pl-pds">'</span>pve-storage<span class="pl-pds">'</span></span> <span class="pl-c"><span class="pl-c">#</span> memory: 512</span> <span class="pl-c"><span class="pl-c">#</span> swap: 512</span> <span class="pl-ent">password</span>: <span class="pl-s">evenbetterpasswd</span> <span class="pl-ent">hostname</span>: <span class="pl-s">lxctest</span> <span class="pl-ent">ostemplate</span>: <span class="pl-s"><span class="pl-pds">'</span>pve-templates:vztmpl/centos-7-default_20160205_amd64.tar.xz<span class="pl-pds">'</span></span> <span class="pl-c"><span class="pl-c">#</span> netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0,tag=2"}'</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">LXC container created</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="5.6.7.8 - - [28/May/2017:20:15:57 +0200] &quot;POST /api2/json/access/ticket HTTP/1.1&quot; 200 663 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/version HTTP/1.1&quot; 200 108 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/cluster/nextid HTTP/1.1&quot; 200 14 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/cluster/resources?type=vm HTTP/1.1&quot; 200 11 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/cluster/resources?type=vm HTTP/1.1&quot; 200 11 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/nodes HTTP/1.1&quot; 200 196 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;GET /api2/json/nodes/pve/storage/pve-templates/content HTTP/1.1&quot; 200 492 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] &quot;POST /api2/json/nodes/pve/lxc HTTP/1.1&quot; 500 13"><pre class="notranslate"><code class="notranslate">5.6.7.8 - - [28/May/2017:20:15:57 +0200] "POST /api2/json/access/ticket HTTP/1.1" 200 663 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/version HTTP/1.1" 200 108 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/cluster/nextid HTTP/1.1" 200 14 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/cluster/resources?type=vm HTTP/1.1" 200 11 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/cluster/resources?type=vm HTTP/1.1" 200 11 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/nodes HTTP/1.1" 200 196 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "GET /api2/json/nodes/pve/storage/pve-templates/content HTTP/1.1" 200 492 5.6.7.8 - ansible@pve [28/May/2017:20:15:57 +0200] "POST /api2/json/nodes/pve/lxc HTTP/1.1" 500 13 </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [127.0.0.1]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_args&quot;: { &quot;api_host&quot;: &quot;192.168.1.10&quot;, &quot;api_password&quot;: &quot;VALUE_SPECIFIED_IN_NO_LOG_PARAMETER&quot;, &quot;api_user&quot;: &quot;ansible@pve&quot;, &quot;cpus&quot;: 1, &quot;cpuunits&quot;: 1000, &quot;disk&quot;: &quot;3&quot;, &quot;force&quot;: false, &quot;hostname&quot;: &quot;lxctest&quot;, &quot;ip_address&quot;: null, &quot;memory&quot;: 512, &quot;mounts&quot;: null, &quot;nameserver&quot;: null, &quot;netif&quot;: null, &quot;node&quot;: &quot;pve&quot;, &quot;onboot&quot;: false, &quot;ostemplate&quot;: &quot;pve-templates:vztmpl/centos-7-default_20160205_amd64.tar.xz&quot;, &quot;password&quot;: &quot;VALUE_SPECIFIED_IN_NO_LOG_PARAMETER&quot;, &quot;pool&quot;: null, &quot;pubkey&quot;: null, &quot;searchdomain&quot;: null, &quot;state&quot;: &quot;present&quot;, &quot;storage&quot;: &quot;pve-storage&quot;, &quot;swap&quot;: 0, &quot;timeout&quot;: 30, &quot;unprivileged&quot;: false, &quot;validate_certs&quot;: false, &quot;vmid&quot;: null } }, &quot;msg&quot;: &quot;creation of lxc VM 103 failed with exception: 500 Internal Server Error&quot; "><pre class="notranslate"><code class="notranslate">fatal: [127.0.0.1]: FAILED! =&gt; { "changed": false, "failed": true, "invocation": { "module_args": { "api_host": "192.168.1.10", "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "api_user": "ansible@pve", "cpus": 1, "cpuunits": 1000, "disk": "3", "force": false, "hostname": "lxctest", "ip_address": null, "memory": 512, "mounts": null, "nameserver": null, "netif": null, "node": "pve", "onboot": false, "ostemplate": "pve-templates:vztmpl/centos-7-default_20160205_amd64.tar.xz", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "pool": null, "pubkey": null, "searchdomain": null, "state": "present", "storage": "pve-storage", "swap": 0, "timeout": 30, "unprivileged": false, "validate_certs": false, "vmid": null } }, "msg": "creation of lxc VM 103 failed with exception: 500 Internal Server Error" </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">contrib/inventory/proxmox.py</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0 config file = .../moon-ansible.windows/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = .../moon-ansible.windows/ansible.cfg configured module search path = Default w/o overrides python version = 2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults] inventory = ./inventory"><pre class="notranslate"><code class="notranslate">[defaults] inventory = ./inventory </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <h5 dir="auto">SUMMARY</h5> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">All you see is either a 500 Forbidden or a 400 Bad request error. No follow up errors why it happens.</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - name: create prox serves hosts: 127.0.0.1 connection: local gather_facts: false tasks: - proxmox: node: 'pve2' api_user: 'xxx' api_password: 'xxx' api_host: '127.0.0.1' ostemplate: 'data:vztmpl/debian-8.0-standard_8.6-1_amd64.tar.gz' pubkey: '...' "><pre class="notranslate">--- - <span class="pl-ent">name</span>: <span class="pl-s">create prox serves</span> <span class="pl-ent">hosts</span>: <span class="pl-s">127.0.0.1</span> <span class="pl-ent">connection</span>: <span class="pl-s">local</span> <span class="pl-ent">gather_facts</span>: <span class="pl-c1">false</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">proxmox</span>: <span class="pl-ent">node</span>: <span class="pl-s"><span class="pl-pds">'</span>pve2<span class="pl-pds">'</span></span> <span class="pl-ent">api_user</span>: <span class="pl-s"><span class="pl-pds">'</span>xxx<span class="pl-pds">'</span></span> <span class="pl-ent">api_password</span>: <span class="pl-s"><span class="pl-pds">'</span>xxx<span class="pl-pds">'</span></span> <span class="pl-ent">api_host</span>: <span class="pl-s"><span class="pl-pds">'</span>127.0.0.1<span class="pl-pds">'</span></span> <span class="pl-ent">ostemplate</span>: <span class="pl-s"><span class="pl-pds">'</span>data:vztmpl/debian-8.0-standard_8.6-1_amd64.tar.gz<span class="pl-pds">'</span></span> <span class="pl-ent">pubkey</span>: <span class="pl-s"><span class="pl-pds">'</span>...<span class="pl-pds">'</span></span> </pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">A VM or Container to be created.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">`</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [127.0.0.1]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_args&quot;: { &quot;api_host&quot;: &quot;xxx&quot;, &quot;api_password&quot;: &quot;VALUE_SPECIFIED_IN_NO_LOG_PARAMETER&quot;, &quot;api_user&quot;: &quot;xxx@pve&quot;, &quot;cpus&quot;: 1, &quot;cpuunits&quot;: 1000, &quot;disk&quot;: &quot;3&quot;, &quot;force&quot;: false, &quot;hostname&quot;: null, &quot;ip_address&quot;: null, &quot;memory&quot;: 512, &quot;mounts&quot;: null, &quot;nameserver&quot;: null, &quot;netif&quot;: { &quot;node0&quot;: &quot;gw=xxx,bridge=vmbr1,name=eth0,ip=xxx/25&quot; }, &quot;node&quot;: &quot;pve2&quot;, &quot;onboot&quot;: false, &quot;ostemplate&quot;: &quot;data:vztmpl/debian-8.0-standard_8.6-1_amd64.tar.gz&quot;, &quot;password&quot;: null, &quot;pool&quot;: null, &quot;pubkey&quot;: &quot;...&quot;, &quot;searchdomain&quot;: null, &quot;state&quot;: &quot;present&quot;, &quot;storage&quot;: &quot;local&quot;, &quot;swap&quot;: 0, &quot;timeout&quot;: 30, &quot;unprivileged&quot;: false, &quot;validate_certs&quot;: false, &quot;vmid&quot;: null } }, &quot;msg&quot;: &quot;creation of lxc VM 198 failed with exception: 400 Bad Request&quot; }"><pre class="notranslate"><code class="notranslate">fatal: [127.0.0.1]: FAILED! =&gt; { "changed": false, "failed": true, "invocation": { "module_args": { "api_host": "xxx", "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "api_user": "xxx@pve", "cpus": 1, "cpuunits": 1000, "disk": "3", "force": false, "hostname": null, "ip_address": null, "memory": 512, "mounts": null, "nameserver": null, "netif": { "node0": "gw=xxx,bridge=vmbr1,name=eth0,ip=xxx/25" }, "node": "pve2", "onboot": false, "ostemplate": "data:vztmpl/debian-8.0-standard_8.6-1_amd64.tar.gz", "password": null, "pool": null, "pubkey": "...", "searchdomain": null, "state": "present", "storage": "local", "swap": 0, "timeout": 30, "unprivileged": false, "validate_certs": false, "vmid": null } }, "msg": "creation of lxc VM 198 failed with exception: 400 Bad Request" } </code></pre></div> <p dir="auto">You can't debug the proxmox api easily. No idea why it's throwing a bad request and the provider isn't helpful either.</p>
1
<p dir="auto">From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/weaseal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/weaseal">@weaseal</a> on 2016-12-02T01:49:18Z</p> <h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">component: ec2_ami</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version /usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 DeprecationWarning ansible 2.2.0.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">$ ansible --version /usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 DeprecationWarning ansible 2.2.0.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">n/a</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">$ cat /etc/redhat-release<br> Red Hat Enterprise Linux Server release 6.7 (Santiago)<br> $ sudo pip list | grep -i boto<br> DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6<br> boto (2.43.0)<br> boto3 (1.4.2)<br> botocore (1.4.81)</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">ec2_ami module crashes and fails to save AMI</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Set up an instance and try to save it using ec2_ami module</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Save the app server as an AMI ec2_ami: description: &quot;App server - created {{ ansible_date_time.iso8601 }}&quot; instance_id: &quot;{{ item.id }}&quot; name: &quot;Appserver.{{ ansible_date_time.date }}.{{ ansible_date_time.hour }}.{{ ansible_date_time.minute }}.{{ ansible_date_time.second }} {{ ansible_date_time.tz_offset }} {{ scm_branch.stdout }}&quot; region: &quot;{{ item.region }}&quot; wait: yes launch_permissions: user_ids: [&quot;{{ aws_account_number_prod }}&quot;] tags: git_branch: &quot;{{ scm_branch.stdout }}&quot; with_items: &quot;{{ ec2.instances }}&quot; register: saved_ami "><pre class="notranslate"><code class="notranslate">- name: Save the app server as an AMI ec2_ami: description: "App server - created {{ ansible_date_time.iso8601 }}" instance_id: "{{ item.id }}" name: "Appserver.{{ ansible_date_time.date }}.{{ ansible_date_time.hour }}.{{ ansible_date_time.minute }}.{{ ansible_date_time.second }} {{ ansible_date_time.tz_offset }} {{ scm_branch.stdout }}" region: "{{ item.region }}" wait: yes launch_permissions: user_ids: ["{{ aws_account_number_prod }}"] tags: git_branch: "{{ scm_branch.stdout }}" with_items: "{{ ec2.instances }}" register: saved_ami </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">For it to not crash.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [save_ami : Save the app server as an AMI] ****************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'Image' object has no attribute 'creationDate' failed: [127.0.0.1] (item={u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-10-10-0-140.eu-central-1.compute.internal', u'public_ip': u'xx.xx.xx.xx', u'private_ip': u'10.10.0.140', u'id': u'i-718cb3cd', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'architecture': u'x86_64', u'ramdisk': None, u'block_device_mapping': {u'/dev/sdb': {u'status': u'attached', u'delete_on_termination': False, u'volume_id': u'vol-xxxxxxxx'}, u'/dev/sda1': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-xxxxxxxx'}, u'/dev/sdc': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-xxxxxxxx'}}, u'key_name': u'xxxxxxxx', u'image_id': u'ami-xxxxxxxx', u'tenancy': u'default', u'groups': {u'sg-xxxxxxx': u'image_build'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'Name': u'image_build xxxxxxxx'}, u'placement': u'eu-central-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'eu-central-1', u'launch_time': u'2016-12-02T01:03:35.000Z', u'instance_type': u't2.small', u'root_device_name': u'/dev/sda1', u'hypervisor': u'xen'}) =&gt; {&quot;failed&quot;: true, &quot;item&quot;: {&quot;ami_launch_index&quot;: &quot;0&quot;, &quot;architecture&quot;: &quot;x86_64&quot;, &quot;block_device_mapping&quot;: {&quot;/dev/sda1&quot;: {&quot;delete_on_termination&quot;: true, &quot;status&quot;: &quot;attached&quot;, &quot;volume_id&quot;: &quot;vol-xxxxxxxx&quot;}, &quot;/dev/sdb&quot;: {&quot;delete_on_termination&quot;: false, &quot;status&quot;: &quot;attached&quot;, &quot;volume_id&quot;: &quot;vol-xxxxxxxx&quot;}, &quot;/dev/sdc&quot;: {&quot;delete_on_termination&quot;: true, &quot;status&quot;: &quot;attached&quot;, &quot;volume_id&quot;: &quot;vol-xxxxxxxx&quot;}}, &quot;dns_name&quot;: &quot;&quot;, &quot;ebs_optimized&quot;: false, &quot;groups&quot;: {&quot;sg-xxxxxxxx&quot;: &quot;image_build&quot;}, &quot;hypervisor&quot;: &quot;xen&quot;, &quot;id&quot;: &quot;i-718cb3cd&quot;, &quot;image_id&quot;: &quot;ami-xxxxxxxx&quot;, &quot;instance_type&quot;: &quot;t2.small&quot;, &quot;kernel&quot;: null, &quot;key_name&quot;: &quot;xxxxxxxx&quot;, &quot;launch_time&quot;: &quot;2016-12-02T01:03:35.000Z&quot;, &quot;placement&quot;: &quot;eu-central-1b&quot;, &quot;private_dns_name&quot;: &quot;ip-10-10-0-140.eu-central-1.compute.internal&quot;, &quot;private_ip&quot;: &quot;10.10.0.140&quot;, &quot;public_dns_name&quot;: &quot;&quot;, &quot;public_ip&quot;: &quot;xx.xx.xx.xx&quot;, &quot;ramdisk&quot;: null, &quot;region&quot;: &quot;eu-central-1&quot;, &quot;root_device_name&quot;: &quot;/dev/sda1&quot;, &quot;root_device_type&quot;: &quot;ebs&quot;, &quot;state&quot;: &quot;running&quot;, &quot;state_code&quot;: 16, &quot;tags&quot;: {&quot;Name&quot;: &quot;image_build&quot;}, &quot;tenancy&quot;: &quot;default&quot;, &quot;virtualization_type&quot;: &quot;hvm&quot;}, &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/tmp/ansible_ault7w/ansible_module_ec2_ami.py\&quot;, line 560, in &lt;module&gt;\n main()\n File \&quot;/tmp/ansible_ault7w/ansible_module_ec2_ami.py\&quot;, line 552, in main\n create_image(module, ec2)\n File \&quot;/tmp/ansible_ault7w/ansible_module_ec2_ami.py\&quot;, line 419, in create_image\n module.exit_json(msg=\&quot;AMI creation operation complete\&quot;, changed=True, **get_ami_info(img))\n File \&quot;/tmp/ansible_ault7w/ansible_module_ec2_ami.py\&quot;, line 332, in get_ami_info\n creationDate=image.creationDate,\nAttributeError: 'Image' object has no attribute 'creationDate'\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;}"><pre class="notranslate"><code class="notranslate">TASK [save_ami : Save the app server as an AMI] ****************** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'Image' object has no attribute 'creationDate' failed: [127.0.0.1] (item={u'kernel': None, u'root_device_type': u'ebs', u'private_dns_name': u'ip-10-10-0-140.eu-central-1.compute.internal', u'public_ip': u'xx.xx.xx.xx', u'private_ip': u'10.10.0.140', u'id': u'i-718cb3cd', u'ebs_optimized': False, u'state': u'running', u'virtualization_type': u'hvm', u'architecture': u'x86_64', u'ramdisk': None, u'block_device_mapping': {u'/dev/sdb': {u'status': u'attached', u'delete_on_termination': False, u'volume_id': u'vol-xxxxxxxx'}, u'/dev/sda1': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-xxxxxxxx'}, u'/dev/sdc': {u'status': u'attached', u'delete_on_termination': True, u'volume_id': u'vol-xxxxxxxx'}}, u'key_name': u'xxxxxxxx', u'image_id': u'ami-xxxxxxxx', u'tenancy': u'default', u'groups': {u'sg-xxxxxxx': u'image_build'}, u'public_dns_name': u'', u'state_code': 16, u'tags': {u'Name': u'image_build xxxxxxxx'}, u'placement': u'eu-central-1b', u'ami_launch_index': u'0', u'dns_name': u'', u'region': u'eu-central-1', u'launch_time': u'2016-12-02T01:03:35.000Z', u'instance_type': u't2.small', u'root_device_name': u'/dev/sda1', u'hypervisor': u'xen'}) =&gt; {"failed": true, "item": {"ami_launch_index": "0", "architecture": "x86_64", "block_device_mapping": {"/dev/sda1": {"delete_on_termination": true, "status": "attached", "volume_id": "vol-xxxxxxxx"}, "/dev/sdb": {"delete_on_termination": false, "status": "attached", "volume_id": "vol-xxxxxxxx"}, "/dev/sdc": {"delete_on_termination": true, "status": "attached", "volume_id": "vol-xxxxxxxx"}}, "dns_name": "", "ebs_optimized": false, "groups": {"sg-xxxxxxxx": "image_build"}, "hypervisor": "xen", "id": "i-718cb3cd", "image_id": "ami-xxxxxxxx", "instance_type": "t2.small", "kernel": null, "key_name": "xxxxxxxx", "launch_time": "2016-12-02T01:03:35.000Z", "placement": "eu-central-1b", "private_dns_name": "ip-10-10-0-140.eu-central-1.compute.internal", "private_ip": "10.10.0.140", "public_dns_name": "", "public_ip": "xx.xx.xx.xx", "ramdisk": null, "region": "eu-central-1", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "state": "running", "state_code": 16, "tags": {"Name": "image_build"}, "tenancy": "default", "virtualization_type": "hvm"}, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_ault7w/ansible_module_ec2_ami.py\", line 560, in &lt;module&gt;\n main()\n File \"/tmp/ansible_ault7w/ansible_module_ec2_ami.py\", line 552, in main\n create_image(module, ec2)\n File \"/tmp/ansible_ault7w/ansible_module_ec2_ami.py\", line 419, in create_image\n module.exit_json(msg=\"AMI creation operation complete\", changed=True, **get_ami_info(img))\n File \"/tmp/ansible_ault7w/ansible_module_ec2_ami.py\", line 332, in get_ami_info\n creationDate=image.creationDate,\nAttributeError: 'Image' object has no attribute 'creationDate'\n", "module_stdout": "", "msg": "MODULE FAILURE"} </code></pre></div> <p dir="auto">Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="193012665" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/5790" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/5790/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/5790">ansible/ansible-modules-core#5790</a></p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">ec2_ami module</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0 config file = /home/user/deployment/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] Also 2.2 fails on same error boto 2.46.1"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = /home/user/deployment/ansible/ansible.cfg configured module search path = Default w/o overrides python version = 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] Also 2.2 fails on same error boto 2.46.1 </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">[defaults]<br> inventory=hosts<br> roles_path=roles<br> host_key_checking=False<br> timeout=60<br> [privilege_escalation]<br> become_method=sudo</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Debian Jessie x86_64</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">ec2_ami module creates an AMI, but fails with AttributeError: 'Image' object has no attribute 'creationDate'</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Create a role or tasks which uses ec2_ami to create an AMI from instance</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Generate AMI from one of it (are equal) to use in ASG - name: Create AMI ec2_ami: aws_access_key: &quot;{{ ec2_access_key }}&quot; aws_secret_key: &quot;{{ ec2_secret_key }}&quot; region: &quot;{{ ec2_region }}&quot; instance_id: &quot;{{ ec2_remote_facts.instances.0.id }}&quot; wait: yes description: Backend provisioned {{ ansible_date_time.iso8601 }} name: backend-{{ ansible_date_time.epoch }} tags: Name: Backend {{ ansible_date_time.iso8601 }} Environment: Production register: image"><pre class="notranslate"><code class="notranslate"># Generate AMI from one of it (are equal) to use in ASG - name: Create AMI ec2_ami: aws_access_key: "{{ ec2_access_key }}" aws_secret_key: "{{ ec2_secret_key }}" region: "{{ ec2_region }}" instance_id: "{{ ec2_remote_facts.instances.0.id }}" wait: yes description: Backend provisioned {{ ansible_date_time.iso8601 }} name: backend-{{ ansible_date_time.epoch }} tags: Name: Backend {{ ansible_date_time.iso8601 }} Environment: Production register: image </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">The AMI is created and its data is returned in variable "image"</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">The AMI is created successfully, but data is not recovered and in fact task fails with</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [172.31.51.42]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\&quot;, line 640, in &lt;module&gt;\n main()\n File \&quot;/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\&quot;, line 632, in main\n create_image(module, ec2)\n File \&quot;/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\&quot;, line 496, in create_image\n module.exit_json(msg=\&quot;AMI creation operation complete\&quot;, changed=True, **get_ami_info(img))\n File \&quot;/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\&quot;, line 389, in get_ami_info\n creationDate=image.creationDate,\nAttributeError: 'Image' object has no attribute 'creationDate'\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 0}"><pre class="notranslate"><code class="notranslate">fatal: [172.31.51.42]: FAILED! =&gt; {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\", line 640, in &lt;module&gt;\n main()\n File \"/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\", line 632, in main\n create_image(module, ec2)\n File \"/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\", line 496, in create_image\n module.exit_json(msg=\"AMI creation operation complete\", changed=True, **get_ami_info(img))\n File \"/tmp/ansible_Cdn7m2/ansible_module_ec2_ami.py\", line 389, in get_ami_info\n creationDate=image.creationDate,\nAttributeError: 'Image' object has no attribute 'creationDate'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0} </code></pre></div>
1
<p dir="auto">Playwright transpiles test files with Babel. However, by default, Babel reads browserslist config although Playwright actually doesn't need it. This introduces conflicts when the root project uses browserslist.</p> <p dir="auto">For example, when the package.json contains:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &quot;browserslist&quot;: [ &quot;chrome 113&quot; ],"><pre class="notranslate"><code class="notranslate"> "browserslist": [ "chrome 113" ], </code></pre></div> <p dir="auto">Running <code class="notranslate">npx playwright test</code> with Playwright 1.32 will get <code class="notranslate">Error: Unknown version 113 of chrome</code>. To fix the issue, we have to upgrade Playwright to 1.33. This behavior forces us to always upgrade Playwright if we want to specify some latest browser versions in browserslist config even if our root project depends on the latest version of browserslist.</p> <p dir="auto">To fix this issue, the following change works for me:</p> <div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="diff --git a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts index 0f4ab2979..2a9b24624 100644 --- a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts +++ b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts @@ -76,6 +76,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins } return { + browserslistConfigFile: false, babelrc: false, configFile: false, assumptions: {"><pre class="notranslate"><span class="pl-c1">diff --git a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts</span> index 0f4ab2979..2a9b24624 100644 <span class="pl-md">--- a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts</span> <span class="pl-mi1">+++ b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts</span> <span class="pl-mdr">@@ -76,6 +76,7 @@</span> function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins } return { <span class="pl-mi1"><span class="pl-mi1">+</span> browserslistConfigFile: false,</span> babelrc: false, configFile: false, assumptions: {</pre></div> <h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.33.0</li> <li>Operating System: macOS 13</li> <li>Browser: All</li> </ul> <h3 dir="auto">Source code</h3> <p dir="auto">package.json:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;name&quot;: &quot;playwright-babel-demo&quot;, &quot;browserslist&quot;: [ &quot;chrome 119&quot; ], &quot;devDependencies&quot;: { &quot;@playwright/test&quot;: &quot;^1.33.0&quot; } }"><pre class="notranslate">{ <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>playwright-babel-demo<span class="pl-pds">"</span></span>, <span class="pl-ent">"browserslist"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>chrome 119<span class="pl-pds">"</span></span> ], <span class="pl-ent">"devDependencies"</span>: { <span class="pl-ent">"@playwright/test"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.33.0<span class="pl-pds">"</span></span> } }</pre></div> <p dir="auto">tests/test.spec.ts</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, expect } from '@playwright/test'; test('has title', async ({ page }) =&gt; { await page.goto('https://playwright.dev/'); // Expect a title &quot;to contain&quot; a substring. await expect(page).toHaveTitle(/Playwright/); });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'has title'</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">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://playwright.dev/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Expect a title "to contain" a substring.</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-kos">.</span><span class="pl-en">toHaveTitle</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>Playwright<span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Steps</strong></p> <ul dir="auto"> <li>Create the two files as listed above.</li> <li>Run <code class="notranslate">npx playwright test</code>.</li> </ul> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">The tests run successfully.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">It shows an error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ npx playwright test Error: Unknown version 119 of chrome Error: No tests found"><pre class="notranslate"><code class="notranslate">$ npx playwright test Error: Unknown version 119 of chrome Error: No tests found </code></pre></div>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.31.2</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"><a href="https://github.com/esau-morais/next-movies/blob/main/.github/workflows/playwright.yml">Repo</a></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="name: Playwright Tests on: push: branches: - main jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: version: 6.32.9 - uses: actions/setup-node@v3 with: node-version: '18' cache: 'pnpm' - name: Install dependencies run: pnpm install --frozen-lockfile - name: Install Playwright Browsers run: pnpm exec playwright install --with-deps - name: Run Playwright tests env: NEXT_PUBLIC_API_BASE_URL: ${{ secrets.NEXT_PUBLIC_API_BASE_URL }} API_KEY: ${{ secrets.API_KEY }} run: pnpm exec playwright test - uses: actions/upload-artifact@v3 if: always() with: name: playwright-report path: playwright-report/ retention-days: 30"><pre class="notranslate"><span class="pl-ent">name</span>: <span class="pl-s">Playwright Tests</span> <span class="pl-ent">on</span>: <span class="pl-ent">push</span>: <span class="pl-ent">branches</span>: - <span class="pl-s">main</span> <span class="pl-ent">jobs</span>: <span class="pl-ent">test</span>: <span class="pl-ent">timeout-minutes</span>: <span class="pl-c1">60</span> <span class="pl-ent">runs-on</span>: <span class="pl-s">ubuntu-latest</span> <span class="pl-ent">steps</span>: - <span class="pl-ent">uses</span>: <span class="pl-s">actions/checkout@v3</span> - <span class="pl-ent">uses</span>: <span class="pl-s">pnpm/action-setup@v2</span> <span class="pl-ent">with</span>: <span class="pl-ent">version</span>: <span class="pl-s">6.32.9</span> - <span class="pl-ent">uses</span>: <span class="pl-s">actions/setup-node@v3</span> <span class="pl-ent">with</span>: <span class="pl-ent">node-version</span>: <span class="pl-s"><span class="pl-pds">'</span>18<span class="pl-pds">'</span></span> <span class="pl-ent">cache</span>: <span class="pl-s"><span class="pl-pds">'</span>pnpm<span class="pl-pds">'</span></span> - <span class="pl-ent">name</span>: <span class="pl-s">Install dependencies</span> <span class="pl-ent">run</span>: <span class="pl-s">pnpm install --frozen-lockfile</span> - <span class="pl-ent">name</span>: <span class="pl-s">Install Playwright Browsers</span> <span class="pl-ent">run</span>: <span class="pl-s">pnpm exec playwright install --with-deps</span> - <span class="pl-ent">name</span>: <span class="pl-s">Run Playwright tests</span> <span class="pl-ent">env</span>: <span class="pl-ent">NEXT_PUBLIC_API_BASE_URL</span>: <span class="pl-s">${{ secrets.NEXT_PUBLIC_API_BASE_URL }}</span> <span class="pl-ent">API_KEY</span>: <span class="pl-s">${{ secrets.API_KEY }}</span> <span class="pl-ent">run</span>: <span class="pl-s">pnpm exec playwright test</span> - <span class="pl-ent">uses</span>: <span class="pl-s">actions/upload-artifact@v3</span> <span class="pl-ent">if</span>: <span class="pl-s">always()</span> <span class="pl-ent">with</span>: <span class="pl-ent">name</span>: <span class="pl-s">playwright-report</span> <span class="pl-ent">path</span>: <span class="pl-s">playwright-report/</span> <span class="pl-ent">retention-days</span>: <span class="pl-c1">30</span></pre></div> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { defineConfig, devices } from '@playwright/test' import dotenv from 'dotenv' import path from 'path' /** * Read environment variables from file. * https://github.com/motdotla/dotenv */ require('dotenv').config() // Alternatively, read from &quot;../my.env&quot; file. dotenv.config({ path: path.resolve(__dirname, '.env.local') }) /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './src/tests/e2e/', /* Maximum time one test can run for. */ timeout: 30 * 1000, expect: { /** * Maximum time expect() should wait for the condition to be met. * For example in `await expect(locator).toHaveText();` */ timeout: 5000, }, /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ actionTimeout: 0, /* Base URL to use in actions like `await page.goto('/')`. */ // baseURL: 'http://localhost:3000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, { name: 'firefox', use: { ...devices['Desktop Firefox'] }, }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, /* Test against mobile viewports. */ // { // name: 'Mobile Chrome', // use: { ...devices['Pixel 5'] }, // }, // { // name: 'Mobile Safari', // use: { ...devices['iPhone 12'] }, // }, /* Test against branded browsers. */ // { // name: 'Microsoft Edge', // use: { channel: 'msedge' }, // }, // { // name: 'Google Chrome', // use: { channel: 'chrome' }, // }, ], /* Folder for test artifacts such as screenshots, videos, traces, etc. */ // outputDir: 'test-results/', /* Run your local dev server before starting the tests */ // webServer: { // command: 'npm run start', // port: 3000, // }, })"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span> <span class="pl-k">import</span> <span class="pl-s1">dotenv</span> <span class="pl-k">from</span> <span class="pl-s">'dotenv'</span> <span class="pl-k">import</span> <span class="pl-s1">path</span> <span class="pl-k">from</span> <span class="pl-s">'path'</span> <span class="pl-c">/**</span> <span class="pl-c"> * Read environment variables from file.</span> <span class="pl-c"> * https://github.com/motdotla/dotenv</span> <span class="pl-c"> */</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'dotenv'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">config</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">// Alternatively, read from "../my.env" file.</span> <span class="pl-s1">dotenv</span><span class="pl-kos">.</span><span class="pl-en">config</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">path</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'.env.local'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c">/**</span> <span class="pl-c"> * See https://playwright.dev/docs/test-configuration.</span> <span class="pl-c"> */</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">testDir</span>: <span class="pl-s">'./src/tests/e2e/'</span><span class="pl-kos">,</span> <span class="pl-c">/* Maximum time one test can run for. */</span> <span class="pl-c1">timeout</span>: <span class="pl-c1">30</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span> <span class="pl-c1">expect</span>: <span class="pl-kos">{</span> <span class="pl-c">/**</span> <span class="pl-c"> * Maximum time expect() should wait for the condition to be met.</span> <span class="pl-c"> * For example in `await expect(locator).toHaveText();`</span> <span class="pl-c"> */</span> <span class="pl-c1">timeout</span>: <span class="pl-c1">5000</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">/* Run tests in files in parallel */</span> <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c">/* Fail the build on CI if you accidentally left test.only in the source code. */</span> <span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span> <span class="pl-c">/* Retry on CI only */</span> <span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c">/* Opt out of parallel tests on CI. */</span> <span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-c">/* Reporter to use. See https://playwright.dev/docs/test-reporters */</span> <span class="pl-c1">reporter</span>: <span class="pl-s">'html'</span><span class="pl-kos">,</span> <span class="pl-c">/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c">/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */</span> <span class="pl-c1">actionTimeout</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c">/* Base URL to use in actions like `await page.goto('/')`. */</span> <span class="pl-c">// baseURL: 'http://localhost:3000',</span> <span class="pl-c">/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */</span> <span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-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-c1">name</span>: <span class="pl-s">'firefox'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Firefox'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'webkit'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Safari'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">/* Test against mobile viewports. */</span> <span class="pl-c">// {</span> <span class="pl-c">// name: 'Mobile Chrome',</span> <span class="pl-c">// use: { ...devices['Pixel 5'] },</span> <span class="pl-c">// },</span> <span class="pl-c">// {</span> <span class="pl-c">// name: 'Mobile Safari',</span> <span class="pl-c">// use: { ...devices['iPhone 12'] },</span> <span class="pl-c">// },</span> <span class="pl-c">/* Test against branded browsers. */</span> <span class="pl-c">// {</span> <span class="pl-c">// name: 'Microsoft Edge',</span> <span class="pl-c">// use: { channel: 'msedge' },</span> <span class="pl-c">// },</span> <span class="pl-c">// {</span> <span class="pl-c">// name: 'Google Chrome',</span> <span class="pl-c">// use: { channel: 'chrome' },</span> <span class="pl-c">// },</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c">/* Folder for test artifacts such as screenshots, videos, traces, etc. */</span> <span class="pl-c">// outputDir: 'test-results/',</span> <span class="pl-c">/* Run your local dev server before starting the tests */</span> <span class="pl-c">// webServer: {</span> <span class="pl-c">// command: 'npm run start',</span> <span class="pl-c">// port: 3000,</span> <span class="pl-c">// },</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Test should pass</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">Passing tests locally</p>
0
<p dir="auto">I made a simple example script to showcase what I experienced</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests import time print('About to do a request that will timeout') start_time = int(time.time()) try: response = requests.get('http://www.google.com:81/', timeout=4) except requests.exceptions.RequestException as e: print(f'Exception: {str(e)}') elapsed_secs = int(time.time()) - start_time print(f'After request that should timeout. Elapsed seconds: {elapsed_secs}')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span> <span class="pl-k">import</span> <span class="pl-s1">time</span> <span class="pl-en">print</span>(<span class="pl-s">'About to do a request that will timeout'</span>) <span class="pl-s1">start_time</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">time</span>.<span class="pl-en">time</span>()) <span class="pl-k">try</span>: <span class="pl-s1">response</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-en">get</span>(<span class="pl-s">'http://www.google.com:81/'</span>, <span class="pl-s1">timeout</span><span class="pl-c1">=</span><span class="pl-c1">4</span>) <span class="pl-k">except</span> <span class="pl-s1">requests</span>.<span class="pl-s1">exceptions</span>.<span class="pl-v">RequestException</span> <span class="pl-k">as</span> <span class="pl-s1">e</span>: <span class="pl-en">print</span>(<span class="pl-s">f'Exception: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-en">str</span>(<span class="pl-s1">e</span>)<span class="pl-kos">}</span></span>'</span>) <span class="pl-s1">elapsed_secs</span> <span class="pl-c1">=</span> <span class="pl-en">int</span>(<span class="pl-s1">time</span>.<span class="pl-en">time</span>()) <span class="pl-c1">-</span> <span class="pl-s1">start_time</span> <span class="pl-en">print</span>(<span class="pl-s">f'After request that should timeout. Elapsed seconds: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">elapsed_secs</span><span class="pl-kos">}</span></span>'</span>)</pre></div> <h2 dir="auto">Expected Result</h2> <p dir="auto">I expected this to timeout after 4 seconds and per the given timeout.</p> <h2 dir="auto">Actual Result</h2> <p dir="auto">What happens instead is that the timeout exception is raised after 2x the given timeout argument.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="About to do a request that will timeout Exception: HTTPConnectionPool(host='www.google.com', port=81): Max retries exceeded with url: / (Caused by ConnectTimeoutError(&lt;urllib3.connection.HTTPConnection object at 0x7f204f680550&gt;, 'Connection to www.google.com timed out. (connect timeout=4)')) After request that should timeout. Elapsed seconds: 8"><pre class="notranslate"><code class="notranslate">About to do a request that will timeout Exception: HTTPConnectionPool(host='www.google.com', port=81): Max retries exceeded with url: / (Caused by ConnectTimeoutError(&lt;urllib3.connection.HTTPConnection object at 0x7f204f680550&gt;, 'Connection to www.google.com timed out. (connect timeout=4)')) After request that should timeout. Elapsed seconds: 8 </code></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;4.0.0&quot; }, &quot;cryptography&quot;: { &quot;version&quot;: &quot;&quot; }, &quot;idna&quot;: { &quot;version&quot;: &quot;2.10&quot; }, &quot;implementation&quot;: { &quot;name&quot;: &quot;CPython&quot;, &quot;version&quot;: &quot;3.7.9&quot; }, &quot;platform&quot;: { &quot;release&quot;: &quot;5.10.16-arch1-1&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.25.1&quot; }, &quot;system_ssl&quot;: { &quot;version&quot;: &quot;101010af&quot; }, &quot;urllib3&quot;: { &quot;version&quot;: &quot;1.26.3&quot; }, &quot;using_pyopenssl&quot;: false } "><pre class="notranslate"><code class="notranslate">{ "chardet": { "version": "4.0.0" }, "cryptography": { "version": "" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.7.9" }, "platform": { "release": "5.10.16-arch1-1", "system": "Linux" }, "pyOpenSSL": { "openssl_version": "", "version": null }, "requests": { "version": "2.25.1" }, "system_ssl": { "version": "101010af" }, "urllib3": { "version": "1.26.3" }, "using_pyopenssl": false } </code></pre></div>
<p dir="auto">I wanted to install using pip and it gives me the following error:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="PS C:\Users\bla&gt; pip install requests Downloading/unpacking requests Real name of requirement requests is requests Downloading requests-0.14.2.tar.gz (361Kb): 361Kb downloaded Running setup.py egg_info for package requests Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 14, in &lt;module&gt; File &quot;C:\Users\patrick\build\requests\setup.py&quot;, line 6, in &lt;module&gt; import requests File &quot;requests\__init__.py&quot;, line 52, in &lt;module&gt; from . import utils File &quot;requests\utils.py&quot;, line 22, in &lt;module&gt; from .compat import parse_http_list as _parse_list_header File &quot;requests\compat.py&quot;, line 112, in &lt;module&gt; from .packages import chardet2 as chardet ImportError: cannot import name chardet2 Complete output from command python setup.py egg_info: Traceback (most recent call last): File &quot;&lt;string&gt;&quot;, line 14, in &lt;module&gt; File &quot;C:\Users\patrick\build\requests\setup.py&quot;, line 6, in &lt;module&gt; import requests File &quot;requests\__init__.py&quot;, line 52, in &lt;module&gt; from . import utils File &quot;requests\utils.py&quot;, line 22, in &lt;module&gt; from .compat import parse_http_list as _parse_list_header File &quot;requests\compat.py&quot;, line 112, in &lt;module&gt; from .packages import chardet2 as chardet ImportError: cannot import name chardet2 ---------------------------------------- Command python setup.py egg_info failed with error code 1"><pre class="notranslate"><span class="pl-v">PS</span> <span class="pl-v">C</span>:\U<span class="pl-s1">sers</span>\b<span class="pl-s1">la</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">requests</span> <span class="pl-v">Downloading</span><span class="pl-c1">/</span><span class="pl-s1">unpacking</span> <span class="pl-s1">requests</span> <span class="pl-v">Real</span> <span class="pl-s1">name</span> <span class="pl-s1">of</span> <span class="pl-s1">requirement</span> <span class="pl-s1">requests</span> <span class="pl-c1">is</span> <span class="pl-s1">requests</span> <span class="pl-v">Downloading</span> <span class="pl-s1">requests</span><span class="pl-c1">-</span><span class="pl-c1">0.14</span>.<span class="pl-c1">2.</span><span class="pl-s1">tar</span>.<span class="pl-en">gz</span> (<span class="pl-c1">361</span><span class="pl-v">Kb</span>): <span class="pl-c1">361</span><span class="pl-v">Kb</span> <span class="pl-s1">downloaded</span> <span class="pl-v">Running</span> <span class="pl-s1">setup</span>.<span class="pl-s1">py</span> <span class="pl-s1">egg_info</span> <span class="pl-k">for</span> <span class="pl-s1">package</span> <span class="pl-s1">requests</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;string&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">14</span>, <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"C:\Users\patrick<span class="pl-cce">\b</span>uild<span class="pl-cce">\r</span>equests\setup.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">6</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">import</span> <span class="pl-s1">requests</span> <span class="pl-v">File</span> <span class="pl-s">"requests\__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">52</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> . <span class="pl-s1">import</span> <span class="pl-s1">utils</span> <span class="pl-v">File</span> <span class="pl-s">"requests\utils.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">22</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> .<span class="pl-s1">compat</span> <span class="pl-s1">import</span> <span class="pl-s1">parse_http_list</span> <span class="pl-k">as</span> <span class="pl-s1">_parse_list_header</span> <span class="pl-v">File</span> <span class="pl-s">"requests\compat.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">112</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> .<span class="pl-s1">packages</span> <span class="pl-s1">import</span> <span class="pl-s1">chardet2</span> <span class="pl-k">as</span> <span class="pl-s1">chardet</span> <span class="pl-v">ImportError</span>: <span class="pl-s1">cannot</span> <span class="pl-k">import</span> <span class="pl-s1">name</span> <span class="pl-s1">chardet2</span> <span class="pl-v">Complete</span> <span class="pl-s1">output</span> <span class="pl-k">from</span> <span class="pl-s1">command</span> <span class="pl-s1">python</span> <span class="pl-s1">setup</span>.<span class="pl-s1">py</span> <span class="pl-s1">egg_info</span>: <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"&lt;string&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">14</span>, <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-v">File</span> <span class="pl-s">"C:\Users\patrick<span class="pl-cce">\b</span>uild<span class="pl-cce">\r</span>equests\setup.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">6</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">import</span> <span class="pl-s1">requests</span> <span class="pl-v">File</span> <span class="pl-s">"requests\__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">52</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> . <span class="pl-s1">import</span> <span class="pl-s1">utils</span> <span class="pl-v">File</span> <span class="pl-s">"requests\utils.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">22</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> .<span class="pl-s1">compat</span> <span class="pl-k">import</span> <span class="pl-s1">parse_http_list</span> <span class="pl-k">as</span> <span class="pl-s1">_parse_list_header</span> <span class="pl-v">File</span> <span class="pl-s">"requests\compat.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">112</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">from</span> .<span class="pl-s1">packages</span> <span class="pl-k">import</span> <span class="pl-s1">chardet2</span> <span class="pl-k">as</span> <span class="pl-s1">chardet</span> <span class="pl-v">ImportError</span>: <span class="pl-s1">cannot</span> <span class="pl-s1">import</span> <span class="pl-s1">name</span> <span class="pl-s1">chardet2</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">Command</span> <span class="pl-s1">python</span> <span class="pl-s1">setup</span>.<span class="pl-s1">py</span> <span class="pl-s1">egg_info</span> <span class="pl-s1">failed</span> <span class="pl-s1">with</span> <span class="pl-s1">error</span> <span class="pl-s1">code</span> <span class="pl-c1">1</span></pre></div> <p dir="auto">I can import chardet as chardet from the interpreter. importing chardet2 fails.<br> i guess this is a dependency that wasn't properly updated.<br> the python version is 3.2.2</p>
0
<pre class="notranslate">To reproduce, create the following three files: testit.go package testit extern_test.go: package testit_test import ( "code.google.com/p/rog-go/testit" ) func init() { testit.Register() unused } intern_test.go: package testit import "testing" var registered bool func Register() { registered = true } func TestPackage(t *testing.T) { if !registered { t.Fatal("registry never called") } } Running the tests gives the error "registry never called", indicating that the code in extern_test.go is never run. Moreover, it's not even compiled - there's no error from the unused variable. While it may look contrived, the above configuration mirrors the way that tests are registered with the popular gocheck testing package - tests that were previously run correctly may now be silently skipped. I have verified that this is a regression since Go 1.2.2. FWIW, there is an easy workaround (define TestPackage in the external test file) but it might be better to avoid the regression.</pre>
<p dir="auto">hi,</p> <p dir="auto">with the upcoming go-1.5 and the import of (a modified version of) the x/tools/go/types package into the stdlib, <code class="notranslate">golang.org/x/tools/go/loader</code> needs to be updated.</p> <p dir="auto">the following program will fail to compile:</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; &quot;go/build&quot; &quot;go/token&quot; &quot;go/types&quot; &quot;log&quot; &quot;os&quot; &quot;golang.org/x/tools/go/loader&quot; ) func main() { path := os.Args[1] fmt.Printf(&quot;&gt;&gt;&gt; inspecting [%s]...\n&quot;, path) cwd, err := os.Getwd() if err != nil { log.Panicf(&quot;error: %v\n&quot;, err) } pkg, err := build.Import(path, cwd, 0) if err != nil { log.Panicf(&quot;error: %v\n&quot;, err) } conf := loader.Config{ Fset: token.NewFileSet(), } prog, err := conf.Load() if err != nil { log.Panicf(&quot;error: %v\n&quot;, err) } var p *types.Package = prog.Created[0].Pkg fmt.Printf(&quot;pkg=%v\n&quot;, p) }"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-k">import</span> ( <span class="pl-s">"fmt"</span> <span class="pl-s">"go/build"</span> <span class="pl-s">"go/token"</span> <span class="pl-s">"go/types"</span> <span class="pl-s">"log"</span> <span class="pl-s">"os"</span> <span class="pl-s">"golang.org/x/tools/go/loader"</span> ) <span class="pl-k">func</span> <span class="pl-en">main</span>() { <span class="pl-s1">path</span> <span class="pl-c1">:=</span> <span class="pl-s1">os</span>.<span class="pl-c1">Args</span>[<span class="pl-c1">1</span>] <span class="pl-s1">fmt</span>.<span class="pl-en">Printf</span>(<span class="pl-s">"&gt;&gt;&gt; inspecting [%s]...<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">path</span>) <span class="pl-s1">cwd</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">os</span>.<span class="pl-en">Getwd</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">log</span>.<span class="pl-en">Panicf</span>(<span class="pl-s">"error: %v<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">err</span>) } <span class="pl-s1">pkg</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">build</span>.<span class="pl-en">Import</span>(<span class="pl-s1">path</span>, <span class="pl-s1">cwd</span>, <span class="pl-c1">0</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">log</span>.<span class="pl-en">Panicf</span>(<span class="pl-s">"error: %v<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">err</span>) } <span class="pl-s1">conf</span> <span class="pl-c1">:=</span> loader.<span class="pl-smi">Config</span>{ <span class="pl-c1">Fset</span>: <span class="pl-s1">token</span>.<span class="pl-en">NewFileSet</span>(), } <span class="pl-s1">prog</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">conf</span>.<span class="pl-en">Load</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">log</span>.<span class="pl-en">Panicf</span>(<span class="pl-s">"error: %v<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">err</span>) } <span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-c1">*</span>types.<span class="pl-smi">Package</span> <span class="pl-c1">=</span> <span class="pl-s1">prog</span>.<span class="pl-c1">Created</span>[<span class="pl-c1">0</span>].<span class="pl-c1">Pkg</span> <span class="pl-s1">fmt</span>.<span class="pl-en">Printf</span>(<span class="pl-s">"pkg=%v<span class="pl-cce">\n</span>"</span>, <span class="pl-s1">p</span>) }</pre></div> <p dir="auto">with the following error:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sh&gt; go run foo.go github.com/go-python/gopy/_examples/hi # command-line-arguments ./foo.go:39: cannot use prog.Created[0].Pkg (type *&quot;golang.org/x/tools/go/types&quot;.Package) as type *&quot;go/types&quot;.Package in assignment"><pre class="notranslate">sh<span class="pl-k">&gt;</span> go run foo.go github.com/go-python/gopy/_examples/hi <span class="pl-c"><span class="pl-c">#</span> command-line-arguments</span> ./foo.go:39: cannot use prog.Created[0].Pkg (type <span class="pl-k">*</span><span class="pl-s"><span class="pl-pds">"</span>golang.org/x/tools/go/types<span class="pl-pds">"</span></span>.Package) as <span class="pl-c1">type</span> <span class="pl-k">*</span><span class="pl-s"><span class="pl-pds">"</span>go/types<span class="pl-pds">"</span></span>.Package <span class="pl-k">in</span> assignment</pre></div>
0
<ul dir="auto"> <li>VSCode Version: <ul dir="auto"> <li>0.10.12-insider</li> <li>Commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/ef2a1fcaa553d14d7731b284a5ac5e4a55c42936/hovercard" href="https://github.com/microsoft/vscode/commit/ef2a1fcaa553d14d7731b284a5ac5e4a55c42936"><tt>ef2a1fc</tt></a></li> <li>Date: 2016-03-21T11:33:38.240Z</li> <li>Shell: 0.35.6</li> <li>Renderer: 45.0.2454.85</li> <li>Node: 4.1.1</li> </ul> </li> <li>OS Version: <ul dir="auto"> <li>Windows 7 64bit</li> </ul> </li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Use Command Pallet in Japanese</li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1937871/14066294/c4e20786-f480-11e5-852c-4a46e97ff853.gif"><img src="https://cloud.githubusercontent.com/assets/1937871/14066294/c4e20786-f480-11e5-852c-4a46e97ff853.gif" alt="command-pallet-i18n" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">I cannot use commands in English.<br> Japanese IME inputs text as hiragana at first. Then we push the space key, then the text is converted to a combination of hiragana, katakana, and kanji.<br> This is meaning we cannot use incremental search efficiently.</p> <p dir="auto">This is very inconvenient.</p> <p dir="auto">Can I turn i18n off?</p>
<ul dir="auto"> <li>VSCode Version: <ul dir="auto"> <li>0.10.12-insider</li> <li>Commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/ef2a1fcaa553d14d7731b284a5ac5e4a55c42936/hovercard" href="https://github.com/microsoft/vscode/commit/ef2a1fcaa553d14d7731b284a5ac5e4a55c42936"><tt>ef2a1fc</tt></a></li> <li>Date: 2016-03-21T11:33:38.240Z</li> <li>Shell: 0.35.6</li> <li>Renderer: 45.0.2454.85</li> <li>Node: 4.1.1</li> </ul> </li> <li>OS Version: <ul dir="auto"> <li>Windows 7 64bit</li> </ul> </li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Use Command Pallet in Japanese</li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1937871/14066294/c4e20786-f480-11e5-852c-4a46e97ff853.gif"><img src="https://cloud.githubusercontent.com/assets/1937871/14066294/c4e20786-f480-11e5-852c-4a46e97ff853.gif" alt="command-pallet-i18n" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">I cannot use commands in English.<br> Japanese IME inputs text as hiragana at first. Then we push the space key, then the text is converted to a combination of hiragana, katakana, and kanji.<br> This is meaning we cannot use incremental search efficiently.</p> <p dir="auto">This is very inconvenient.</p> <p dir="auto">Can I turn i18n off?</p>
1
<p dir="auto">If the metric name/expression is the same as the SORT BY metric, the SORT BY metric is re-added to the SELECT clause (necessary for sorting) which results in selecting the expression twice which then introduces ambiguity resulting in the query engine returning an error.</p> <h3 dir="auto">Expected results</h3> <p dir="auto">The SORT BY metric should not be re-added to the SELECT clause.</p> <h3 dir="auto">Actual results</h3> <p dir="auto">Depending on the engine an error may be thrown, i.e., for Presto:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="line 65:10: Column 'sum(total)' is ambiguous"><pre class="notranslate"><code class="notranslate">line 65:10: Column 'sum(total)' is ambiguous </code></pre></div> <h4 dir="auto">Screenshots</h4> <p dir="auto">If applicable, add screenshots to help explain your problem.</p> <h4 dir="auto">How to reproduce the bug</h4> <ol dir="auto"> <li>Go to explorer.</li> <li>Add a metric to both the <code class="notranslate">METRICS</code> section (chart dependent) and <code class="notranslate">SORT BY</code>.</li> <li>Select a <code class="notranslate">GROUP BY</code>.</li> <li>Click <code class="notranslate">RUN</code>.</li> <li>Possibly see the error and notice that the metric is duplicated in the SQL, i.e.,</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT ... sum(&quot;total&quot;) AS &quot;SUM(total)&quot;, sum(&quot;total&quot;) AS &quot;SUM(total)&quot;"><pre class="notranslate"><code class="notranslate">SELECT ... sum("total") AS "SUM(total)", sum("total") AS "SUM(total)" </code></pre></div> <h3 dir="auto">Environment</h3> <p dir="auto">(please complete the following information):</p> <ul dir="auto"> <li>superset version: <code class="notranslate">master</code></li> <li>python version: <code class="notranslate">3.7</code></li> <li>node.js version: <code class="notranslate">node -v</code></li> </ul> <h3 dir="auto">Checklist</h3> <p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have reproduced the issue with at least the latest released version of superset.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the issue tracker for the same issue and I haven't found one similar.</li> </ul>
<p dir="auto">The workflow docker-ephemeral-env.yml is referencing action aws-actions/amazon-ecr-login using references v1. However this reference is missing the commit <a href="https://github.com/aws-actions/amazon-ecr-login/commits/57206dc28c379a6eebdce44c592109d2e97e031d">57206dc28c379a6eebdce44c592109d2e97e031d</a> which may contain fix to the some vulnerability.<br> The vulnerability fix that is missing by actions version could be related to:<br> (1) CVE fix<br> (2) upgrade of vulnerable dependency<br> (3) fix to secret leak and others.<br> Please consider to update the reference to the action.</p>
0
<ul dir="auto"> <li>VSCode Version: 1.0</li> <li>OS Version: Windows 10, rs1_lkg selfhost</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Turn editor.renderWhitespace on.</li> <li>Open a file with significant whitespace not at the start of a line.</li> </ol> <p dir="auto">Compare Visual Studio Code vs. Sublime Text with the same file:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1544943/14579527/2ed24e04-0362-11e6-8ea7-a877ebc01a3a.png"><img width="1280" alt="2016-04-15_23-25-44" src="https://cloud.githubusercontent.com/assets/1544943/14579527/2ed24e04-0362-11e6-8ea7-a877ebc01a3a.png" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1544943/14579529/3f5287f8-0362-11e6-8d11-68b3238317ed.png"><img width="1280" alt="2016-04-15_23-26-56" src="https://cloud.githubusercontent.com/assets/1544943/14579529/3f5287f8-0362-11e6-8d11-68b3238317ed.png" style="max-width: 100%;"></a></p>
<p dir="auto">I have a use case to render whitespace but we seem to not render whitespace between words in a line:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/900690/13599004/3708247c-e521-11e5-81a0-8bbe6d4218c8.png"><img src="https://cloud.githubusercontent.com/assets/900690/13599004/3708247c-e521-11e5-81a0-8bbe6d4218c8.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">Here I cannot figure out how the help text is formatted unless I use the keyboard.</p>
1
<p dir="auto"><a href="https://archive.today/VkEJb" rel="nofollow">404</a> on the PDF documentation.</p>
<p dir="auto">When I create a new blueprint, the template_folder is added to a Flask defined path, and the precedence to locate a template is</p> <ol dir="auto"> <li><code class="notranslate">app/templates/</code> first</li> <li><code class="notranslate">app/my-blueprint/templates/</code> second</li> </ol> <p dir="auto">I understand this makes sense from the point of view of a developer who's trying to reuse the same blueprints on many different projects. He can plug in an existing blueprint and replace the templates from the main app if needed.<br> There is a different use case however, where this behavior is unwanted and problematic. That is, when I'm structuring my applications into independent "modules" such that different teams can work independently on their own model/blueprint. The biggest problems is, that blueprints hits templates outside their domain, that is templates defied somewhere else in another blueprint folder. With large projects, this becomes a pretty difficult model to reason on and debug, and the blueprints are too much coupled to one another. Secondly, in this development context I would prefer a blueprint to have precedence over the base templates.<br> Ideally, I think Flask should have an option to change the precedence of templates. For example use the current behavior by default, but introduce a new config option "blueprints_templates_first=True/False" to be defined somewhere (either at the app level, or for every single blueprint). The expected behavior would be the opposite of the default behavior:</p> <ol dir="auto"> <li>look in <code class="notranslate">app/my-blueprint/templates/</code> first</li> <li>look in <code class="notranslate">app/templates/</code> second</li> <li><strong>do not</strong> look into other blueprints folders</li> </ol> <p dir="auto">I've seen other people come up with the same issue over the years, and I don't understand why there is so much resistance against supporting this feature. There is a real use case for this. I've always appreciated Flask because it's minimalist, concise, powerful, and doesn't get in the way I choose to structure my project. Opposing this option just seems to me as going against the nature of Flask itself, because the framework is dictating to me how I have to structure my files on disk, something that only bigger frameworks do and that Flask has proudly never done. Every workaround to this, such as adding a new inner folder <code class="notranslate">my-blueprint/templates/my-blueprint/</code>, just feels like a hack that goes against the ideas of simplicity and clarity.</p> <p dir="auto">I, and I believe a lot of other Flask users as well, would really appreciate if you guys could add this configuration option to Flask. Thanks.</p>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>For English only</strong>, other languages will not accept.</p> <p dir="auto">Before report a bug, make sure you have:</p> <ul dir="auto"> <li>Searched open and closed <a href="https://github.com/apache/incubator-shardingsphere/issues">GitHub issues</a>.</li> <li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li> </ul> <p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br> If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p> <p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">4.0.0.R2</p> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <p dir="auto">Sharding-JDBC<br> When executing the following sql (fulltext index was already added):<br> select a from b where MATCH (c) AGAINST ( 'Test*' IN BOOLEAN MODE) limit 100<br> I used EntityManager's native query as:<br> Query query = em.createNativeQuery(querySql);</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">response the query result</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">line 1:233 no viable alternative at input 'MATCH(hc.content)AGAINST(?INBOOLEAN'<br> 2019-09-02 18:35:42.640 ERROR 85171 --- [ault-executor-0] io.grpc.internal.SerializingExecutor : Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed@41ef22cf</p> <p dir="auto">java.lang.ClassCastException: org.antlr.v4.runtime.tree.ErrorNodeImpl cannot be cast to org.antlr.v4.runtime.ParserRuleContext<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.dml.PredicateExtractor.extractPredicate(PredicateExtractor.java:101) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.dml.PredicateExtractor.extractRecursiveWithParen(PredicateExtractor.java:85) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.dml.PredicateExtractor.extractRecursiveWithLogicalOperation(PredicateExtractor.java:71) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.dml.PredicateExtractor.extract(PredicateExtractor.java:65) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.extractor.impl.dml.WhereExtractor.extract(WhereExtractor.java:48) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.extractor.SQLSegmentsExtractorEngine.extract(SQLSegmentsExtractorEngine.java:47) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.core.SQLParseKernel.parse(SQLParseKernel.java:62) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.SQLParseEngine.parse0(SQLParseEngine.java:71) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.parse.SQLParseEngine.parse(SQLParseEngine.java:53) ~[sharding-core-parse-common-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.parse(ParsingSQLRouter.java:66) ~[sharding-core-route-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.route.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:64) ~[sharding-core-route-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.PreparedQueryShardingEngine.route(PreparedQueryShardingEngine.java:60) ~[sharding-core-entry-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:86) ~[sharding-core-entry-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:70) ~[sharding-core-entry-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.shard(ShardingPreparedStatement.java:224) ~[sharding-jdbc-core-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.executeQuery(ShardingPreparedStatement.java:110) ~[sharding-jdbc-core-4.0.0-RC2.jar:4.0.0-RC2]<br> at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.getResultSet(Loader.java:2167) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1930) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1892) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.doQuery(Loader.java:937) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.doList(Loader.java:2689) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.doList(Loader.java:2672) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.Loader.list(Loader.java:2501) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:338) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:2223) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.internal.AbstractSharedSessionContract.list(AbstractSharedSessionContract.java:1069) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.query.internal.NativeQueryImpl.doList(NativeQueryImpl.java:170) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at org.hibernate.query.Query.getResultList(Query.java:132) ~[hibernate-core-5.3.10.Final.jar:5.3.10.Final]<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]<br> at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]<br> at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:403) ~[spring-orm-5.1.9.RELEASE.jar:5.1.9.RELEASE]<br> at com.sun.proxy.$Proxy99.getResultList(Unknown Source) ~[na:na]<br> at xxxxx (my class url)<br> at com.hblinks.data.grpc.DalHsSearchServiceGrpc$MethodHandlers.invoke(DalHsSearchServiceGrpc.java:279) ~[classes/:na]<br> at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:172) ~[grpc-stub-1.23.0.jar:1.23.0]<br> at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:331) ~[grpc-core-1.23.0.jar:1.23.0]<br> at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:808) ~[grpc-core-1.23.0.jar:1.23.0]<br> at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.23.0.jar:1.23.0]<br> at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) ~[grpc-core-1.23.0.jar:1.23.0]<br> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]<br> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]<br> at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]</p> <h3 dir="auto">Reason analyze (If you can)</h3> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">Sharding rule is simply:</p> <p dir="auto">spring.shardingsphere.sharding.default-data-source-name=ds0<br> spring.shardingsphere.datasource.names=ds0<br> spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource<br> spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.cj.jdbc.Driver<br> spring.shardingsphere.datasource.ds0.jdbc-url=<br> spring.shardingsphere.datasource.ds0.username=<br> spring.shardingsphere.datasource.ds0.password=</p> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h2 dir="auto">Bug Report</h2> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">I am using the 4.0.0-RC2 build by myself from the source<br> 【BTW】the build fail in openjdk, success only in Oracle jdk. it seems the build use a tool only available in Oracle jdk</p> <h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3> <p dir="auto">Sharding-Proxy</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">return the limit record when using the match against in boolean mode</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">return all the records when using the match against in boolean mode, but for natural language mode ,it works well.</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">May be in the boolean mode, the proxy didn't send the limit offset to the real db?</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto"><code class="notranslate">SELECT * FROM SMS_SIGN_MISS_REPORT WHERE FINAL_STATUS_ID = 'SignUndefine' and ASSIGN_TO_USER_ID ='_NA_' and MATCH(SIGN_TEXT) AGAINST('+韵达 *快递' in boolean mode ) limit 5 offset 0;</code><br> when I execute this in the real db like</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SELECT * FROM SMS_SIGN_MISS_REPORT_0 WHERE FINAL_STATUS_ID = 'SignUndefine' and ASSIGN_TO_USER_ID ='_NA_' and MATCH(SIGN_TEXT) AGAINST('+韵达 *快递' in boolean mode ) limit 5 offset 0;"><pre class="notranslate"><code class="notranslate">SELECT * FROM SMS_SIGN_MISS_REPORT_0 WHERE FINAL_STATUS_ID = 'SignUndefine' and ASSIGN_TO_USER_ID ='_NA_' and MATCH(SIGN_TEXT) AGAINST('+韵达 *快递' in boolean mode ) limit 5 offset 0; </code></pre></div> <p dir="auto">it works as expected</p> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
1
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p> <p dir="auto">No.</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <p dir="auto">PetSet, Statefulset, PV, persistent volume, AWS</p> <p dir="auto">This is similar to issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="188575995" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/36589" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/36589/hovercard" href="https://github.com/kubernetes/kubernetes/issues/36589">#36589</a> except that (a) it's a StatefulSet, and (b) the kubelets were not restarted.</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <p dir="auto">Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:42:39Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: AWS, EC2, t2.medium</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> </ul> <p dir="auto">NAME="CentOS Linux"<br> VERSION="7 (Core)"<br> ID="centos"<br> ID_LIKE="rhel fedora"<br> VERSION_ID="7"<br> PRETTY_NAME="CentOS Linux 7 (Core)"<br> ANSI_COLOR="0;31"<br> CPE_NAME="cpe:/o:centos:centos:7"<br> HOME_URL="<a href="https://www.centos.org/" rel="nofollow">https://www.centos.org/</a>"<br> BUG_REPORT_URL="<a href="https://bugs.centos.org/" rel="nofollow">https://bugs.centos.org/</a>"</p> <p dir="auto">CENTOS_MANTISBT_PROJECT="CentOS-7"<br> CENTOS_MANTISBT_PROJECT_VERSION="7"<br> REDHAT_SUPPORT_PRODUCT="centos"<br> REDHAT_SUPPORT_PRODUCT_VERSION="7"</p> <ul dir="auto"> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> </ul> <p dir="auto">Linux ip-172-31-47-16.us-west-2.compute.internal 3.10.0-327.10.1.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192559" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/1" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/1/hovercard" href="https://github.com/kubernetes/kubernetes/issues/1">#1</a> SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</p> <ul dir="auto"> <li><strong>Install tools</strong>: kubeadm</li> </ul> <p dir="auto">kubeadm version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.2.380+85fe0f1aadf91e", GitCommit:"85fe0f1aadf91e134102cf3c01a9eed11a7e257f", GitTreeState:"clean", BuildDate:"2016-11-02T14:58:17Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"}</p> <ul dir="auto"> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">All EC2 nodes are set up in an IAM role with EBS management access. To test this, I created a regular PV, which created successfully.</p> <ol dir="auto"> <li> <p dir="auto">Built 4-node cluster on EC2 using the Kubeadm instructions for CentOS, including kubeadm init --cloud-provider=aws</p> </li> <li> <p dir="auto">Had to manually fix SSL certs by creating hard links, due to this bug: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="187027417" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/36150" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/36150/hovercard" href="https://github.com/kubernetes/kubernetes/issues/36150">#36150</a></p> </li> <li> <p dir="auto">Added weave network</p> </li> <li> <p dir="auto">Created this StatefulSet: <a href="https://github.com/jberkus/atomicdb/blob/master/patroni_petset/kubernetes/ps-patroni.yaml">https://github.com/jberkus/atomicdb/blob/master/patroni_petset/kubernetes/ps-patroni.yaml</a><br> (supporting objects are in same dir)</p> </li> <li> <p dir="auto">Service, PVCs, PVs created successfully. Checking AWS, the EBS volumes were created and are available.</p> </li> <li> <p dir="auto">Pods failed, due to an inability to mount the PVs:</p> </li> </ol> <p dir="auto">FirstSeen LastSeen Count From SubobjectPath Type Reason Message</p> <hr> <p dir="auto">20m 20m 1 {default-scheduler } Normal Scheduled Successfully assigned patroni-0 to ip-172-31-43-85<br> 18m 1m 9 {kubelet ip-172-31-43-85} Warning FailedMount Unable to mount volumes for pod "patroni-0_default(a8e441ac-a854-11e6-bb5c-06027ce5ae69)": timeout expired waiting for volumes to attach/mount for pod "patroni-0"/"default". list of unattached/unmounted volumes=[pgdata]<br> 18m 1m 9 {kubelet ip-172-31-43-85} Warning FailedSync Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "patroni-0"/"default". list of unattached/unmounted volumes=[pgdata]<br> 20m 41s 18 {kubelet ip-172-31-43-85} Warning FailedMount MountVolume.SetUp failed for volume "kubernetes.io/aws-ebs/a8e441ac-a854-11e6-bb5c-06027ce5ae69-pvc-a1c46983-a854-11e6-bb5c-06027ce5ae69" (spec.Name: "pvc-a1c46983-a854-11e6-bb5c-06027ce5ae69") pod "a8e441ac-a854-11e6-bb5c-06027ce5ae69" (UID: "a8e441ac-a854-11e6-bb5c-06027ce5ae69") with: mount failed: exit status 32<br> Mounting arguments: /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-west-2a/vol-b893ce0c /var/lib/kubelet/pods/a8e441ac-a854-11e6-bb5c-06027ce5ae69/volumes/kubernetes.io~aws-ebs/pvc-a1c46983-a854-11e6-bb5c-06027ce5ae69 [bind]<br> Output: mount: special device /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/us-west-2a/vol-b893ce0c does not exist<br> 20m 39s 18 {controller-manager } Warning FailedMount Failed to attach volume "pvc-a1c46983-a854-11e6-bb5c-06027ce5ae69" on node "ip-172-31-43-85" with: error finding instance ip-172-31-43-85: instance not found</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">PVs should have mounted on the pod containers, and the remaining pods should have come up.</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <p dir="auto">Follow steps above.</p> <p dir="auto"><strong>Anything else do we need to know</strong>:</p> <ul dir="auto"> <li>kubectl logs and journalctl -xe don't show any errors related to pvs or mounts</li> <li>I can't kube exec into the pod because it's down (to check paths)</li> <li>the same StatefulSet, using only EmptyDir(), works fine.</li> </ul>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <ul dir="auto"> <li>poddisruptionbudget</li> <li>pod disruption budget</li> <li>pdb</li> </ul> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p> <p dir="auto">BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</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;5+&quot;, GitVersion:&quot;v1.5.0-beta.2&quot;, GitCommit:&quot;0776eab45fe28f02bbeac0f05ae1a203051a21eb&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-24T22:35:03Z&quot;, GoVersion:&quot;go1.7.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;5+&quot;, GitVersion:&quot;v1.5.0-beta.2&quot;, GitCommit:&quot;0776eab45fe28f02bbeac0f05ae1a203051a21eb&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-11-24T22:30:23Z&quot;, GoVersion:&quot;go1.7.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:35:03Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-beta.2", GitCommit:"0776eab45fe28f02bbeac0f05ae1a203051a21eb", GitTreeState:"clean", BuildDate:"2016-11-24T22:30:23Z", GoVersion:"go1.7.3", 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>: GCE</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">If a <code class="notranslate">policy/v1alpha1</code> PDB still exists after upgrading the master from <code class="notranslate">v1.4.6</code> to <code class="notranslate">v1.5.0-beta.2</code>, <code class="notranslate">kubectl get poddisruptionbudget</code> is broken (even for subsequently-created <code class="notranslate">policy/v1beta1</code> PDBs). The alpha PDB cannot be deleted through <code class="notranslate">kubectl</code> (neither v1.4.6 nor v1.5.0-beta.2), so the user is stuck in this broken state and must roll back the master.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">The existence of the alpha PDB should not break interactions with beta PDBs.</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <ol dir="auto"> <li>Launch a <code class="notranslate">v1.4.6</code> cluster from an official release build.</li> <li>Create an alpha PDB: <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="apiVersion: policy/v1alpha1 kind: PodDisruptionBudget metadata: name: web spec: selector: matchLabels: app: nginx minAvailable: 4"><pre class="notranslate"><span class="pl-ent">apiVersion</span>: <span class="pl-s">policy/v1alpha1</span> <span class="pl-ent">kind</span>: <span class="pl-s">PodDisruptionBudget</span> <span class="pl-ent">metadata</span>: <span class="pl-ent">name</span>: <span class="pl-s">web</span> <span class="pl-ent">spec</span>: <span class="pl-ent">selector</span>: <span class="pl-ent">matchLabels</span>: <span class="pl-ent">app</span>: <span class="pl-s">nginx</span> <span class="pl-ent">minAvailable</span>: <span class="pl-c1">4</span></pre></div> </li> <li>Upgrade the master to <code class="notranslate">v1.5.0-beta.2</code>: <code class="notranslate">cluster/gce/upgrade.sh -M v1.5.0-beta.2</code></li> <li>Attempt to run <code class="notranslate">kubectl get poddisruptionbudget</code></li> </ol> <p dir="auto">With kubectl v1.4.6:</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ kubectl get poddisruptionbudget error: group map[certificates.k8s.io:0xc8203eb2d0 componentconfig:0xc8203eb340 extensions:0xc8203b6070 policy:0xc8203b60e0 rbac.authorization.k8s.io:0xc8203b6150 apps:0xc8203eae70 authorization.k8s.io:0xc8203eb030 autoscaling:0xc8203eb0a0 storage.k8s.io:0xc8203b61c0 batch:0xc8203eb260 federation:0xc8203ea930 :0xc8203eae00 authentication.k8s.io:0xc8203eaee0] is already registered"><pre class="notranslate">$ <span class="pl-s1">kubectl get poddisruptionbudget</span> <span class="pl-c1">error: group map[certificates.k8s.io:0xc8203eb2d0 componentconfig:0xc8203eb340 extensions:0xc8203b6070 policy:0xc8203b60e0 rbac.authorization.k8s.io:0xc8203b6150 apps:0xc8203eae70 authorization.k8s.io:0xc8203eb030 autoscaling:0xc8203eb0a0 storage.k8s.io:0xc8203b61c0 batch:0xc8203eb260 federation:0xc8203ea930 :0xc8203eae00 authentication.k8s.io:0xc8203eaee0] is already registered</span></pre></div> <p dir="auto">With kubectl v1.5.0-beta.2:</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ kubectl get poddisruptionbudget Error from server: no kind &quot;PodDisruptionBudget&quot; is registered for version &quot;policy/v1alpha1&quot;"><pre class="notranslate">$ <span class="pl-s1">kubectl get poddisruptionbudget</span> <span class="pl-c1">Error from server: no kind "PodDisruptionBudget" is registered for version "policy/v1alpha1"</span></pre></div> <p dir="auto"><strong>Anything else do we need to know</strong>:</p> <p dir="auto">If I try to create a beta PDB with the same name, it says:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error from server (AlreadyExists): error when creating &quot;pdb-beta.yaml&quot;: poddisruptionbudgets.policy &quot;web&quot; already exists"><pre class="notranslate"><code class="notranslate">Error from server (AlreadyExists): error when creating "pdb-beta.yaml": poddisruptionbudgets.policy "web" already exists </code></pre></div> <p dir="auto">Attempting to delete the alpha PDB (either by name or by file) fails with:</p> <div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ kubectl delete poddisruptionbudget web Error from server: no kind &quot;PodDisruptionBudget&quot; is registered for version &quot;policy/v1alpha1&quot; $ kubectl delete -f pdb-alpha.yaml Error from server: error when deleting &quot;pdb-alpha.yaml&quot;: no kind &quot;PodDisruptionBudget&quot; is registered for version &quot;policy/v1alpha1&quot; $ kubectl delete -f pdb-beta.yaml Error from server: error when deleting &quot;pdb-beta.yaml&quot;: no kind &quot;PodDisruptionBudget&quot; is registered for version &quot;policy/v1alpha1&quot;"><pre class="notranslate">$ <span class="pl-s1">kubectl delete poddisruptionbudget web</span> <span class="pl-c1">Error from server: no kind "PodDisruptionBudget" is registered for version "policy/v1alpha1"</span> $ <span class="pl-s1">kubectl delete -f pdb-alpha.yaml </span> <span class="pl-c1">Error from server: error when deleting "pdb-alpha.yaml": no kind "PodDisruptionBudget" is registered for version "policy/v1alpha1"</span> $ <span class="pl-s1">kubectl delete -f pdb-beta.yaml </span> <span class="pl-c1">Error from server: error when deleting "pdb-beta.yaml": no kind "PodDisruptionBudget" is registered for version "policy/v1alpha1"</span></pre></div> <p dir="auto">I can successfully create a beta PDB with a different name and I can specifically <code class="notranslate">kubectl get poddisruptionbudget beta-pdb</code>. However, listing all PDBs (<code class="notranslate">kubectl get poddisruptionbudget</code>) remains broken.</p>
0
<p dir="auto">So I downloaded the new RC2 from the customize section, very excited to try the new grid with the col-xs and col-md on it. I have been pulling my hair why it doesn't work. So I searched the css file with col-xs and it turns out it doesn't exist. :(</p> <p dir="auto">Please correct me if it is just me.</p>
<p dir="auto">When using the customizer, the column classes appear to be the ones from RC1. Not sure if anything else wasn't updated, as this was simply the most noticeable omission.</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 =&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><br> <code class="notranslate">@angular/forms</code> package has a directive for <code class="notranslate">[required]</code> selector which adds a required validator (<code class="notranslate">Validators.required</code>). This directive allows to assign required validator conditionally depending on value of <code class="notranslate">required</code> input parameter. If value of <code class="notranslate">required</code> parameter has changed directive updates state of related control using <code class="notranslate">_onChange</code> function.</p> <p dir="auto">This directive works great until you wrap element having 'required' attribute in <code class="notranslate">*ngIf</code> or other structural directive.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;input *ngIf=&quot;fieldVisible&quot; [required]='someCondition' type='text' formControlName='someControl'&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-smi">input</span> <span class="pl-c1">*</span><span class="pl-s1">ngIf</span><span class="pl-c1">=</span><span class="pl-s">"fieldVisible"</span> <span class="pl-kos">[</span><span class="pl-smi">required</span><span class="pl-kos">]</span><span class="pl-c1">=</span><span class="pl-s">'someCondition'</span> <span class="pl-k">type</span><span class="pl-c1">=</span><span class="pl-s">'text'</span> <span class="pl-s1">formControlName</span><span class="pl-c1">=</span><span class="pl-s">'someControl'</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">In this case if <code class="notranslate">someCondition=true</code> and <code class="notranslate">fieldVisible</code> is modified from <code class="notranslate">true</code> to <code class="notranslate">false</code> corresponding input disappears, but <code class="notranslate">Validators.required</code> (assigned by required directive) remains on the control.</p> <p dir="auto"><strong>Expected behavior</strong><br> If required directive assignes <code class="notranslate">Validators.required</code> it should manage its lifecycle completely and delete it on <code class="notranslate">onDestroy</code> of the directive. Otherwise we have hanging unmanageable validators.</p> <p dir="auto">P. S. Definitely the best approach to work with required validators is to set all validators via control explicitly and catch if this validator was assigned. But this is not possible with the current design of form controls.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> Sometimes its very helpful to store state of the form in reactive controls and have only part of form displayed. In my case I use tab-based form, where only part of form is displayed.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong><br> Any version</p> </li> <li> <p dir="auto"><strong>Browser:</strong><br> Any browser</p> </li> <li> <p dir="auto"><strong>Language:</strong><br> Any language</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong></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 [x] feature request"><pre class="notranslate"><code class="notranslate">[x] bug report [x] feature request </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> New router does not work with ngUpgrade. There is no way to specify a primary app component as in the beta router. And even when you try to do the same, you get an error that states <code class="notranslate">getAllAngularRootElements is not defined</code></p> <p dir="auto"><strong>Expected/desired behavior</strong><br> New router should work with ngUpgrade</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> To reduce re-coding when Angular2 hits release.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.4</li> <li><strong>Browser:</strong> [Chrome 51]</li> <li><strong>Language:</strong> [TypeScript 1.8.10]</li> </ul>
0
<p dir="auto">I'd like the ability to extend the default playwright <code class="notranslate">tsconfig.json</code> beyond just the currently allowed <code class="notranslate">compilerOptions</code> of <code class="notranslate">baseUrl</code> and <code class="notranslate">path</code>.</p> <p dir="auto">I am using playwright to test a charting library in a mono repo and I'd like the ability to import constants from the library to facilitate testing. However, any typescript import from outside of the playwright base directory throws a typescript error.</p> <p dir="auto">The current <a href="https://playwright.dev/docs/test-typescript" rel="nofollow">ability</a> to transpile the tests, and whatever else, before running the playwright tests would work but makes it difficult to store the screenshots in the desired directory.</p> <p dir="auto">I'd like the ability to provide a path to a <code class="notranslate">tsconfig.json</code> or extend a current <code class="notranslate">tsconfig.json</code>. I realize this may open up issues errors when transpiling playwright with an incompatible <code class="notranslate">tsconfig.json</code> but there may be a way to safeguard against this.</p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: 1.28.1</li> <li>Operating System: Win 10</li> <li>Browser: Chrome</li> <li>Coding Lang: Java</li> </ul> <p dir="auto"><strong>Steps</strong></p> <p dir="auto">On the page:</p> <ul dir="auto"> <li> <p dir="auto">Make sure the element in question is not displayed visually and by running the code:<br> <code class="notranslate">page.frameLocator("frame1Selector").frameLocator("frame2Selector").frameLocator("frame3Selector").frameLocator("frame4Selector").locator("spinnerSelector").isHidden() // it returns true</code></p> </li> <li> <p dir="auto">Then, do the waiting:<br> <code class="notranslate">page.frameLocator("frame1Selector").frameLocator("frame2Selector").frameLocator("frame3Selector").frameLocator("frame4Selector").locator("spinnerSelector").waitFor(new WaitForOptions().setState(WaitForSelectorState.HIDDEN))</code></p> </li> </ul> <p dir="auto">NOTE: the locators chain is same as above.</p> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Waiting quickly ends without any error</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">The error gets thrown:</p> <p dir="auto">Error {<br>   message='Timeout 30000ms exceeded.<br> =========================== logs ===========================<br> waiting for frameLocator("frame1Selector").frameLocator("frame2Selector").frameLocator("frame3Selector").frameLocator("frame4Selector") .locator("spinnerSelector") to be hidden<br>   waiting for frameLocator("frame1Selector")</p>
0
<h2 dir="auto">Problem Description</h2> <p dir="auto">onFocus not firing on select element, I essentially have this except it has menu elements inside of it:<br> <code class="notranslate">&lt;SelectField value={value} onFocus={() =&gt; console.log('I am focused')} /&gt;</code><br> and when I click in the select, no event is being fired.</p> <h2 dir="auto">Versions</h2> <ul dir="auto"> <li>Material-UI: v0.15.0-beta.2</li> <li>React: 15</li> <li>Browser: Chrome 49</li> </ul>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/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">In v0.x the Autocapitalize property would prevent mobile device keyboards from capitalizing the first letter - after upgrading to 1.x this does not seem to be the case</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The Autocapitalize property seems to do nothing to prevent (on mobile devices especially) the first letter entered into the Textfield from being automatically capitalized (the device keyboard will SHIFT automatically when the Textfield is selected)</p> <p dir="auto">I have tried every variant I can think of from autoCapitalize="none" (which is what I used in v0.x) to autoCapitalize="off" (which I've seen in various docs on the web) as well as writing the prop out all lowercase (which I believe is the raw html way to do it) and every variation in between.</p> <h2 dir="auto">Context</h2> <p dir="auto">We use the textfield component for our login form - we have case-sensitive usernames which are often not capitalized. I would prefer not to have to revert to v0.x for this one case as this was a working feature and seems like it would be needed for v1.x as well.</p>
0
<p dir="auto">Describe what you were doing when the bug occurred:</p> <p dir="auto">I have a large form with multiple checkboxes. I am trying to see the performance of my value change for the checkboxes. When I record my interaction that works but when I click on the performance timeline commits in the extension it fails with the bellow stack</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.8.2-fed4ae024</p> <p dir="auto">Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17786:17)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17717:25)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)<br> at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)</p> <p dir="auto">Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31701:48)<br> at div<br> at div<br> at div<br> at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23)<br> at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33363:48)<br> at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5)<br> at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32)<br> at div<br> at div<br> at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23)<br> at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23)<br> at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27)<br> at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23)<br> at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)</p>
<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> App doesn't render in IE11 and below.</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 via <a href="https://jsfiddle.net" rel="nofollow">https://jsfiddle.net</a> or similar (template: <a href="https://jsfiddle.net/reactjs/69z2wepo/" rel="nofollow">https://jsfiddle.net/reactjs/69z2wepo/</a>).</strong></p> <ul dir="auto"> <li>Build React app with Webpack</li> <li>Launch IE11 or below (not an emulator)</li> <li>You will see a blank screen or half-compiled React app with the following error:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1647596/20527736/7b9075a8-b097-11e6-8ccb-d205b1908f31.png"><img src="https://cloud.githubusercontent.com/assets/1647596/20527736/7b9075a8-b097-11e6-8ccb-d205b1908f31.png" alt="24f8f6e8-afde-11e6-9a6f-a3cc6355f55c" style="max-width: 100%;"></a></li> </ul> <p dir="auto"><strong>What is the expected behavior?</strong></p> <ul dir="auto"> <li>To render as it does in Chrome, Firefox, etc.</li> </ul> <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> We've temporarily shrink-wrapped our dependencies so that we can continue to serve our app. We're starting to believe that it's coming from a dependency that <code class="notranslate">react</code>, <code class="notranslate">apollo</code> or <code class="notranslate">webpack</code> may be relying on...</p> <p dir="auto">Shrink-wrapped versions of our dependencies (left is the new one that's broken and the right one is the old one that continues to work across all browsers) <a href="https://www.diffchecker.com/SyaJUcsk" rel="nofollow">https://www.diffchecker.com/SyaJUcsk</a></p>
0
<p dir="auto">A number of us have shown interest in implementing seq2seq models in Keras <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="206947870" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/5358" data-hovercard-type="issue" data-hovercard-url="/keras-team/keras/issues/5358/hovercard" href="https://github.com/keras-team/keras/issues/5358">#5358</a>, so I'm creating a central issue for it. We can discuss design decisions and prevent duplication of work here.</p> <p dir="auto">There are a number of existing pull requests related to seq2seq models:</p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="210969976" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/5559" data-hovercard-type="pull_request" data-hovercard-url="/keras-team/keras/pull/5559/hovercard" href="https://github.com/keras-team/keras/pull/5559">#5559</a> (Merged) Specify States of RNN Layers Symbolically. <ul dir="auto"> <li>We have to specify the initial state of the decoder symbolically. This pull request adds the <code class="notranslate">initial_state</code> argument, which is either a tensor or list of tensors, to <code class="notranslate">Recurrent.call</code>.</li> </ul> </li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213621037" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/5731" data-hovercard-type="pull_request" data-hovercard-url="/keras-team/keras/pull/5731/hovercard" href="https://github.com/keras-team/keras/pull/5731">#5731</a> Add <code class="notranslate">return_state</code> flag to RNNs for seq2seq modeling. <ul dir="auto"> <li>We have to retrieve the final state of encoder. This pull request adds the <code class="notranslate">return_state</code> flag to <code class="notranslate">Recurrent.__init__</code>. If <code class="notranslate">True</code>, the output of the RNN will be a list of tensors. The first tensor is the output, and the remaining tensors are the final state.</li> </ul> </li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="213651275" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/5737" data-hovercard-type="pull_request" data-hovercard-url="/keras-team/keras/pull/5737/hovercard" href="https://github.com/keras-team/keras/pull/5737">#5737</a> Implement RNN decoding; feed output t-1 as input t <ul dir="auto"> <li>During test time, we have to feed the output of the decoder back into itself as the input for the next time step. This pull request adds the <code class="notranslate">output_length</code> argument to <code class="notranslate">Recurrent.__init__</code>. It requires <code class="notranslate">unroll=True</code>. If <code class="notranslate">output_length</code> is greater than the length of the input, the output of that layer will be fed back into the RNN as the input for the next time step.</li> <li>Note: During training time, we can use teacher forcing, instead of feeding back the outputs of the decoder.</li> </ul> </li> </ul> <p dir="auto">There is currently a seq2seq example in <code class="notranslate">keras/examples</code>: <code class="notranslate">addition_rnn.py</code>. However, the implementation could be greatly improved. It currently supports only a single layer encoder-decoder architecture. It also does not perform teacher forcing.</p> <p dir="auto">Feel free to comment on any ideas, questions or comments you might have.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/farizrahman4u/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/farizrahman4u">@farizrahman4u</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/fchollet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/fchollet">@fchollet</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/israelg99/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/israelg99">@israelg99</a>.</p>
<p dir="auto">I used code below to combine 2 mobile-net model. After combine i save model as combined.hdf5.<br> Keras version: 2.2.0 Using TensorFlow backend.<br> TensorFlow version: 1.8.0</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="model_A = load_model('mobilenet_A.hdf5', custom_objects={'relu6': mobilenet.relu6}) model_B = load_model('mobilenet_B.hdf5', custom_objects={'relu6': mobilenet.relu6}) inputs = Input(shape=(224, 224, 3)) pred_A = model_A(inputs) pred_B = model_B(inputs) pred_average = keras.layers.Average()([pred_A, pred_B]) model_combined = Model(inputs=inputs, outputs=pred_average) model_combined.save('combined_test.hdf5') model_x = load_model('combined_test.hdf5', custom_objects={'relu6': mobilenet.relu6})"><pre class="notranslate"><code class="notranslate">model_A = load_model('mobilenet_A.hdf5', custom_objects={'relu6': mobilenet.relu6}) model_B = load_model('mobilenet_B.hdf5', custom_objects={'relu6': mobilenet.relu6}) inputs = Input(shape=(224, 224, 3)) pred_A = model_A(inputs) pred_B = model_B(inputs) pred_average = keras.layers.Average()([pred_A, pred_B]) model_combined = Model(inputs=inputs, outputs=pred_average) model_combined.save('combined_test.hdf5') model_x = load_model('combined_test.hdf5', custom_objects={'relu6': mobilenet.relu6}) </code></pre></div> <p dir="auto">When i load saved model, i get error below:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-23-3df9104863a8&gt; in &lt;module&gt;() 1 model_x = load_model('combined_test.hdf5', ----&gt; 2 custom_objects={'relu6': mobilenet.relu6}) ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile) 262 263 # set weights --&gt; 264 load_weights_from_hdf5_group(f['model_weights'], model.layers) 265 266 if compile: ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in load_weights_from_hdf5_group(f, layers, reshape) 914 original_keras_version, 915 original_backend, --&gt; 916 reshape=reshape) 917 if len(weight_values) != len(symbolic_weights): 918 raise ValueError('Layer #' + str(k) + ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 555 weights = convert_nested_time_distributed(weights) 556 elif layer.__class__.__name__ in ['Model', 'Sequential']: --&gt; 557 weights = convert_nested_model(weights) 558 559 if original_keras_version == '1': ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in convert_nested_model(weights) 543 weights=weights[:num_weights], 544 original_keras_version=original_keras_version, --&gt; 545 original_backend=original_backend)) 546 weights = weights[num_weights:] 547 return new_weights ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 555 weights = convert_nested_time_distributed(weights) 556 elif layer.__class__.__name__ in ['Model', 'Sequential']: --&gt; 557 weights = convert_nested_model(weights) 558 559 if original_keras_version == '1': ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in convert_nested_model(weights) 531 weights=weights[:num_weights], 532 original_keras_version=original_keras_version, --&gt; 533 original_backend=original_backend)) 534 weights = weights[num_weights:] 535 ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 673 weights[0] = np.reshape(weights[0], layer_weights_shape) 674 elif layer_weights_shape != weights[0].shape: --&gt; 675 weights[0] = np.transpose(weights[0], (3, 2, 0, 1)) 676 if layer.__class__.__name__ == 'ConvLSTM2D': 677 weights[1] = np.transpose(weights[1], (3, 2, 0, 1)) ~/virtualenvs/AILab/lib/python3.5/site-packages/numpy/core/fromnumeric.py in transpose(a, axes) 548 549 &quot;&quot;&quot; --&gt; 550 return _wrapfunc(a, 'transpose', axes) 551 552 ~/virtualenvs/AILab/lib/python3.5/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds) 55 def _wrapfunc(obj, method, *args, **kwds): 56 try: ---&gt; 57 return getattr(obj, method)(*args, **kwds) 58 59 # An AttributeError occurs if the object does not have ValueError: axes don't match array"><pre class="notranslate"><code class="notranslate">--------------------------------------------------------------------------- ValueError Traceback (most recent call last) &lt;ipython-input-23-3df9104863a8&gt; in &lt;module&gt;() 1 model_x = load_model('combined_test.hdf5', ----&gt; 2 custom_objects={'relu6': mobilenet.relu6}) ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile) 262 263 # set weights --&gt; 264 load_weights_from_hdf5_group(f['model_weights'], model.layers) 265 266 if compile: ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in load_weights_from_hdf5_group(f, layers, reshape) 914 original_keras_version, 915 original_backend, --&gt; 916 reshape=reshape) 917 if len(weight_values) != len(symbolic_weights): 918 raise ValueError('Layer #' + str(k) + ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 555 weights = convert_nested_time_distributed(weights) 556 elif layer.__class__.__name__ in ['Model', 'Sequential']: --&gt; 557 weights = convert_nested_model(weights) 558 559 if original_keras_version == '1': ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in convert_nested_model(weights) 543 weights=weights[:num_weights], 544 original_keras_version=original_keras_version, --&gt; 545 original_backend=original_backend)) 546 weights = weights[num_weights:] 547 return new_weights ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 555 weights = convert_nested_time_distributed(weights) 556 elif layer.__class__.__name__ in ['Model', 'Sequential']: --&gt; 557 weights = convert_nested_model(weights) 558 559 if original_keras_version == '1': ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in convert_nested_model(weights) 531 weights=weights[:num_weights], 532 original_keras_version=original_keras_version, --&gt; 533 original_backend=original_backend)) 534 weights = weights[num_weights:] 535 ~/virtualenvs/AILab/lib/python3.5/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape) 673 weights[0] = np.reshape(weights[0], layer_weights_shape) 674 elif layer_weights_shape != weights[0].shape: --&gt; 675 weights[0] = np.transpose(weights[0], (3, 2, 0, 1)) 676 if layer.__class__.__name__ == 'ConvLSTM2D': 677 weights[1] = np.transpose(weights[1], (3, 2, 0, 1)) ~/virtualenvs/AILab/lib/python3.5/site-packages/numpy/core/fromnumeric.py in transpose(a, axes) 548 549 """ --&gt; 550 return _wrapfunc(a, 'transpose', axes) 551 552 ~/virtualenvs/AILab/lib/python3.5/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds) 55 def _wrapfunc(obj, method, *args, **kwds): 56 try: ---&gt; 57 return getattr(obj, method)(*args, **kwds) 58 59 # An AttributeError occurs if the object does not have ValueError: axes don't match array </code></pre></div>
0
<p dir="auto">hello i am new to this so my issue is i wanna work with flutter but i wanna do it offline but evry time i disconnect from intrenet i cant creat a new project<br> i found online the commande --offline but i dont realy know where to add it</p> <p dir="auto">ps:i am using windows</p>
<p dir="auto">Presumably after having done <code class="notranslate">flutter cache populate</code> or some such while online.</p> <p dir="auto">Right now there are a bunch of cases where we assume online. I think this is far from critical, but there are still times when people are offline and would like to do development. :)</p>
1
<p dir="auto">After the version r74 the BoxHelper does not work for sprites - ( Sprite &amp; SpriteMaterial) because the BoxHelper uses the function Box3 and that function needs geometry to calculate the min, max....</p> <p dir="auto">Before and r74 the Sprite had:</p> <p dir="auto">geometry: THREE.BufferGeometry<br> geometry.type: "BufferGeometry"</p> <p dir="auto">But after r74 the geometry property in the object created with new THREE.Sprite does not exist AND so the Box3 does not work and so the BoxHelper does not work.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r82</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r81</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> ...</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r74</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r73</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> IOS</li> </ul>
<p dir="auto">glTF handles nodes with their indices (<code class="notranslate">nodeIndex</code> or <code class="notranslate">nodeId</code> in <code class="notranslate">GLTFParser</code>). So some extension data in glTF-based file formats (e.g. <a href="https://dwango.github.io/en/vrm/vrm_spec/#model-bone-mapping-json-extensions-vrm-humanoid" rel="nofollow">bone mapping in VRM</a>) depend on node indices.</p> <p dir="auto">However, it seems that objects loaded by current <code class="notranslate">GLTFLoader</code> don't have any indices info. We can get complete node data from <code class="notranslate">data.parser.json.nodes</code>, but cannot link them with parsed objects in <code class="notranslate">data.scene</code> one to one.</p> <p dir="auto">I suggest adding original node info to <code class="notranslate">Object3D.userData</code> or adding an array of nodes with <code class="notranslate">Object3D</code> references to somewhere.</p>
0
<p dir="auto">I can not download the version of the bootstrap 3<br> <a href="https://codeload.github.com/twbs/bootstrap/zip/v3.0.0-rc1-dist">https://codeload.github.com/twbs/bootstrap/zip/v3.0.0-rc1-dist</a></p>
<p dir="auto">The affix component is not working on the doc pages it stays on top of the page.</p>
0
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">will seek reporting this upstream as this likely breaks the SQL standard:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE TABLE ck_cons_test ( -&gt; b1 INT NULL, -&gt; b2 INT NULL, -&gt; CHECK (b1 IN (0, 1)), -&gt; CHECK (b2 IN (0, 1, NULL)) -&gt; ); Query OK, 0 rows affected (0.03 sec) MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (1, 0); Query OK, 1 row affected (0.01 sec) MariaDB [test]&gt; MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (1, NULL); ERROR 4025 (23000): CONSTRAINT `CONSTRAINT_2` failed for `test`.`ck_cons_test` MariaDB [test]&gt; MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (NULL, 0); ERROR 4025 (23000): CONSTRAINT `CONSTRAINT_1` failed for `test`.`ck_cons_test` "><pre class="notranslate"><code class="notranslate">CREATE TABLE ck_cons_test ( -&gt; b1 INT NULL, -&gt; b2 INT NULL, -&gt; CHECK (b1 IN (0, 1)), -&gt; CHECK (b2 IN (0, 1, NULL)) -&gt; ); Query OK, 0 rows affected (0.03 sec) MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (1, 0); Query OK, 1 row affected (0.01 sec) MariaDB [test]&gt; MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (1, NULL); ERROR 4025 (23000): CONSTRAINT `CONSTRAINT_2` failed for `test`.`ck_cons_test` MariaDB [test]&gt; MariaDB [test]&gt; INSERT INTO ck_cons_test (b1, b2) VALUES (NULL, 0); ERROR 4025 (23000): CONSTRAINT `CONSTRAINT_1` failed for `test`.`ck_cons_test` </code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto"><a href="https://mariadb.com/kb/en/library/mariadb-1029-changelog/" rel="nofollow">https://mariadb.com/kb/en/library/mariadb-1029-changelog/</a></p> <p dir="auto">This fixes the CHECK constraint issue <a href="https://jira.mariadb.org/browse/MDEV-13596" rel="nofollow">https://jira.mariadb.org/browse/MDEV-13596</a> that ruins booleans for us, and additionally the DROP issue <a href="https://jira.mariadb.org/browse/MDEV-11114" rel="nofollow">https://jira.mariadb.org/browse/MDEV-11114</a> was fixed as of 10.2.8: <a href="https://mariadb.com/kb/en/library/mariadb-1028-changelog/" rel="nofollow">https://mariadb.com/kb/en/library/mariadb-1028-changelog/</a></p> <p dir="auto">propose a brief warning if mariadb 10.2[&lt;9] is detected then go forward normally with CI support. Will need to test if <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384640259" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/4096" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/4096/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/4096">#4096</a> is still needed.</p>
1
<p dir="auto">The PCG generator used by Numpy has a significant amount self-correlation. That is, for each sequence generated from a seed there is a large number of correlated, nonoverlapping sequences starting from other seeds. By "correlated" I mean that interleaving two such sequences and testing the result you obtain failures that did not appear in each sequence individually.</p> <p dir="auto">The probability that two generators out of large set of terminals get two of those sequences is nonnegligible. Why this happens from a mathematical viewpoint is well known but it is explained here in detail: <a href="http://prng.di.unimi.it/pcg.pgp" rel="nofollow">http://prng.di.unimi.it/pcg.pgp</a> (see "Subsequences within the same generator").</p> <p dir="auto">To show this problem directly, I wrote this simple C program reusing the Numpy code: <a href="http://prng.di.unimi.it/intpcgnumpy.c" rel="nofollow">http://prng.di.unimi.it/intpcgnumpy.c</a> . The program takes two 128-bit states of two generators (with the same LCG constant or "stream") in the form of high and low bits, interleaves their output and writes it in binary form. Once we send it through PractRand, we should see no statistical failure, as the two streams should be independent. But if try to start from two states with the same 64 lower bits, you get:</p> <p dir="auto">./intpcgnumpy 0x596d84dfefec2fc7 0x6b79f81ab9f3e37b 0x8d7deae980a64ab0 0x6b79f81ab9f3e37b | stdbuf -oL ~/svn/c/xorshift/practrand/RNG_test stdin -tf 2 -te 1 -tlmaxonly -multithreaded<br> RNG_test using PractRand version 0.94<br> RNG = RNG_stdin, seed = unknown<br> test set = expanded, folding = extra</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rng=RNG_stdin, seed=unknown length= 128 megabytes (2^27 bytes), time= 2.2 seconds Test Name Raw Processed Evaluation BCFN(0+0,13-2,T) R= +27.6 p = 1.0e-13 FAIL BCFN(0+1,13-2,T) R= +68.0 p = 2.3e-34 FAIL !!! BCFN(0+2,13-3,T) R= +90.8 p = 8.8e-43 FAIL !!! BCFN(0+3,13-3,T) R=+120.6 p = 6.9e-57 FAIL !!!! DC6-6x2Bytes-1 R= +8.9 p = 4.0e-5 mildly suspicious DC6-5x4Bytes-1 R= +15.7 p = 4.3e-9 very suspicious [Low1/8]BCFN(0+0,13-4,T) R= +11.6 p = 4.9e-5 unusual ...and 1074 test result(s) without anomalies"><pre class="notranslate"><code class="notranslate">rng=RNG_stdin, seed=unknown length= 128 megabytes (2^27 bytes), time= 2.2 seconds Test Name Raw Processed Evaluation BCFN(0+0,13-2,T) R= +27.6 p = 1.0e-13 FAIL BCFN(0+1,13-2,T) R= +68.0 p = 2.3e-34 FAIL !!! BCFN(0+2,13-3,T) R= +90.8 p = 8.8e-43 FAIL !!! BCFN(0+3,13-3,T) R=+120.6 p = 6.9e-57 FAIL !!!! DC6-6x2Bytes-1 R= +8.9 p = 4.0e-5 mildly suspicious DC6-5x4Bytes-1 R= +15.7 p = 4.3e-9 very suspicious [Low1/8]BCFN(0+0,13-4,T) R= +11.6 p = 4.9e-5 unusual ...and 1074 test result(s) without anomalies </code></pre></div> <p dir="auto">You can even go lower—you just need the same 58 lower bits:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./intpcgnumpy 0x596d84dfefec2fc7 0x0579f81ab9f3e37b 0x8d7deae980a64ab0 0x6b79f81ab9f3e37b | stdbuf -oL ~/svn/c/xorshift/practrand/RNG_test stdin -tf 2 -te 1 -tlmaxonly -multithreaded [...] rng=RNG_stdin, seed=unknown length= 32 gigabytes (2^35 bytes), time= 453 seconds Test Name Raw Processed Evaluation [Low1/16]FPF-14+6/32:cross R= +11.6 p = 4.0e-10 VERY SUSPICIOUS [Low1/32]FPF-14+6/32:cross R= +16.5 p = 3.2e-14 FAIL [Low1/32]FPF-14+6/16:cross R= +12.8 p = 3.8e-11 VERY SUSPICIOUS [Low1/64]FPF-14+6/64:cross R= +6.8 p = 4.8e-6 mildly suspicious [Low1/64]FPF-14+6/32:cross R= +6.0 p = 1.9e-5 unusual [Low1/64]FPF-14+6/16:cross R= +5.5 p = 5.8e-5 unusual [Low4/32]FPF-14+6/64:all R= +5.8 p = 5.9e-5 unusual [Low4/32]FPF-14+6/32:(0,14-0) R= +7.7 p = 1.0e-6 unusual [Low4/32]FPF-14+6/32:(1,14-0) R= +7.7 p = 9.1e-7 unusual [Low4/32]FPF-14+6/32:all R= +6.5 p = 1.3e-5 unusual [Low4/64]FPF-14+6/64:all R= +5.9 p = 5.1e-5 unusual [Low4/64]FPF-14+6/64:cross R= +8.2 p = 3.0e-7 suspicious [Low4/64]FPF-14+6/32:(0,14-0) R= +7.6 p = 1.0e-6 unusual [Low8/64]FPF-14+6/64:(0,14-0) R= +17.0 p = 2.2e-15 FAIL [Low8/64]FPF-14+6/64:(1,14-0) R= +9.1 p = 5.1e-8 mildly suspicious [Low8/64]FPF-14+6/64:all R= +12.7 p = 2.1e-11 VERY SUSPICIOUS [Low8/64]FPF-14+6/32:(0,14-0) R= +12.8 p = 1.7e-11 VERY SUSPICIOUS [Low8/64]FPF-14+6/32:all R= +11.0 p = 9.3e-10 VERY SUSPICIOUS ...and 1696 test result(s) without anomalies"><pre class="notranslate"><code class="notranslate">./intpcgnumpy 0x596d84dfefec2fc7 0x0579f81ab9f3e37b 0x8d7deae980a64ab0 0x6b79f81ab9f3e37b | stdbuf -oL ~/svn/c/xorshift/practrand/RNG_test stdin -tf 2 -te 1 -tlmaxonly -multithreaded [...] rng=RNG_stdin, seed=unknown length= 32 gigabytes (2^35 bytes), time= 453 seconds Test Name Raw Processed Evaluation [Low1/16]FPF-14+6/32:cross R= +11.6 p = 4.0e-10 VERY SUSPICIOUS [Low1/32]FPF-14+6/32:cross R= +16.5 p = 3.2e-14 FAIL [Low1/32]FPF-14+6/16:cross R= +12.8 p = 3.8e-11 VERY SUSPICIOUS [Low1/64]FPF-14+6/64:cross R= +6.8 p = 4.8e-6 mildly suspicious [Low1/64]FPF-14+6/32:cross R= +6.0 p = 1.9e-5 unusual [Low1/64]FPF-14+6/16:cross R= +5.5 p = 5.8e-5 unusual [Low4/32]FPF-14+6/64:all R= +5.8 p = 5.9e-5 unusual [Low4/32]FPF-14+6/32:(0,14-0) R= +7.7 p = 1.0e-6 unusual [Low4/32]FPF-14+6/32:(1,14-0) R= +7.7 p = 9.1e-7 unusual [Low4/32]FPF-14+6/32:all R= +6.5 p = 1.3e-5 unusual [Low4/64]FPF-14+6/64:all R= +5.9 p = 5.1e-5 unusual [Low4/64]FPF-14+6/64:cross R= +8.2 p = 3.0e-7 suspicious [Low4/64]FPF-14+6/32:(0,14-0) R= +7.6 p = 1.0e-6 unusual [Low8/64]FPF-14+6/64:(0,14-0) R= +17.0 p = 2.2e-15 FAIL [Low8/64]FPF-14+6/64:(1,14-0) R= +9.1 p = 5.1e-8 mildly suspicious [Low8/64]FPF-14+6/64:all R= +12.7 p = 2.1e-11 VERY SUSPICIOUS [Low8/64]FPF-14+6/32:(0,14-0) R= +12.8 p = 1.7e-11 VERY SUSPICIOUS [Low8/64]FPF-14+6/32:all R= +11.0 p = 9.3e-10 VERY SUSPICIOUS ...and 1696 test result(s) without anomalies </code></pre></div> <p dir="auto">Note that to get more the 50% probability that two generators start from two correlated seed (chosen at random) you need just about half a million generators starting at random (birthday paradox). And if you consider the probability that they do not exactly start from the same state, but have significant overlapping correlating sequences, you need much less.</p> <p dir="auto">Any sensible generator from the literature will <em>not</em> behave like that. You can choose adversarially any two starting states of MRG32k3a, SFC64, CMWC, xoshiro256++, etc., and as long as you generate nonoverlapping sequences you will not see the failures above. This is a major drawback that can pop up when a number of devices uses the generator and one assumes (as it should be) that pairwise those sequences should not show correlation. The correlation can induce unwanted behavior that is hard to detect.</p> <p dir="auto">Please at least document somewhere that the generator should not be used on multiple terminals or in a highly parallel environment.</p> <p dir="auto">The same can happen with different "streams", as the sequences generated by an LCG by changing the additive constant are all the same modulo a change of sign and an additive constant. You can see some discussion here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="522561054" data-permission-text="Title is private" data-url="https://github.com/rust-random/rand/issues/907" data-hovercard-type="issue" data-hovercard-url="/rust-random/rand/issues/907/hovercard" href="https://github.com/rust-random/rand/issues/907">rust-random/rand#907</a> and a full mathematical discussion of the problem here: <a href="https://arxiv.org/abs/2001.05304" rel="nofollow">https://arxiv.org/abs/2001.05304</a> .</p>
<p dir="auto">I wanted to build the PDF documentation (using Sphinx 2.2.1 and current versions of scipy, matplotlib, etc from <code class="notranslate">pip install</code> and using numpy from git at <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/numpy/numpy/commit/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8/hovercard" href="https://github.com/numpy/numpy/commit/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8"><tt>b83f10e</tt></a>) and was disconcerted that it actually succeeded <g-emoji class="g-emoji" alias="wink" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f609.png">😉</g-emoji></p> <p dir="auto">Turns out after checking that <a href="https://github.com/numpy/numpy/blob/master/doc/source/conf.py">https://github.com/numpy/numpy/blob/master/doc/source/conf.py</a> uses removed <code class="notranslate">latex_preamble</code> variable (it was removed at Sphinx 1.6.1). Correct syntax is now with <code class="notranslate">latex_elements['preamble']</code>. I did that, and obtained the failure on building <code class="notranslate">numpy-ref.pdf</code> that I was expecting:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="! Extra }, or forgotten \endgroup. \@endpbox ...\@arstrutbox \color@endgroup \egroup \the \LT@p@ftn \global \LT... l.131934 \item[{Parameters}] \leavevmode"><pre class="notranslate"><code class="notranslate">! Extra }, or forgotten \endgroup. \@endpbox ...\@arstrutbox \color@endgroup \egroup \the \LT@p@ftn \global \LT... l.131934 \item[{Parameters}] \leavevmode </code></pre></div> <p dir="auto">This is caused by these lines</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/numpy/numpy/blob/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8/doc/source/conf.py#L187-L189">numpy/doc/source/conf.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 187 to 189 in <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8">b83f10e</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="L187" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="187"></td> <td id="LC187" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">\usepackage{expdlist}</span> </td> </tr> <tr class="border-0"> <td id="L188" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="188"></td> <td id="LC188" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">\let\latexdescription=\description</span> </td> </tr> <tr class="border-0"> <td id="L189" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="189"></td> <td id="LC189" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">\def\description{\latexdescription{}{} \breaklabel}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">I know two fixes:</p> <ul dir="auto"> <li>add <code class="notranslate">\usepackage{enumitem}</code>. I don't recommend that because the fact that it fixes the <code class="notranslate">expdlist</code> breakage appears unintentional, it is sheer luck (and I tested it on only one small example, not the full <code class="notranslate">numpy-ref.tex</code>). In the past Sphinx users used <code class="notranslate">enumitem</code> to avoid <code class="notranslate">Too deeply nested</code> error, but since Sphinx 1.5, there is <code class="notranslate">latex_elements['maxlistdepth']</code> to fix that LaTeX limitation:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="latex_elements['maxlistdepth'] = '10' # should be enough, increase at will (don't use '2048' as this would create needlessly thousands of TeX macros)"><pre class="notranslate"><code class="notranslate">latex_elements['maxlistdepth'] = '10' # should be enough, increase at will (don't use '2048' as this would create needlessly thousands of TeX macros) </code></pre></div> <ul dir="auto"> <li>the second fix is to be found in a <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scipy/scipy/commit/c881fdea7a7ef7c518b7898cfd53b2880af06778/hovercard" href="https://github.com/scipy/scipy/commit/c881fdea7a7ef7c518b7898cfd53b2880af06778">scipy/scipy@<tt>c881fde</tt></a> and I copy it here. It would thus be like this:</li> </ul> <div class="highlight highlight-text-tex-latex notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="% In the parameters section, place a newline after the Parameters % header \usepackage{expdlist} \let\latexdescription=\description \def\description{\latexdescription{}{} \breaklabel} % Remove extra space \usepackage{etoolbox} \makeatletter \patchcmd\@item{{\@breaklabel} }{{\@breaklabel}}{}{} \makeatother % Fix bug in expdlist's way of breaking the line after long item label \makeatletter \def\breaklabel{% \def\@breaklabel{% \leavevmode\par % now a hack because Sphinx inserts \leavevmode after term node \def\leavevmode{\def\leavevmode{\unhbox\voidb@x}}% }% } \makeatother"><pre class="notranslate"><span class="pl-c"><span class="pl-c">%</span> In the parameters section, place a newline after the Parameters</span> <span class="pl-c"><span class="pl-c">%</span> header</span> <span class="pl-k">\usepackage</span>{<span class="pl-c1">expdlist</span>} <span class="pl-c1">\let\latexdescription</span>=<span class="pl-c1">\description</span> <span class="pl-c1">\def\description</span>{<span class="pl-c1">\latexdescription</span>{}{} <span class="pl-c1">\breaklabel</span>} <span class="pl-c"><span class="pl-c">%</span> Remove extra space</span> <span class="pl-k">\usepackage</span>{<span class="pl-c1">etoolbox</span>} <span class="pl-c1">\makeatletter</span> <span class="pl-c1">\patchcmd\@item</span>{{<span class="pl-c1">\@breaklabel</span>} }{{<span class="pl-c1">\@breaklabel</span>}}{}{} <span class="pl-c1">\makeatother</span> <span class="pl-c"><span class="pl-c">%</span> Fix bug in expdlist's way of breaking the line after long item label</span> <span class="pl-c1">\makeatletter</span> <span class="pl-c1">\def\breaklabel</span>{<span class="pl-c"><span class="pl-c">%</span></span> <span class="pl-c1">\def\@breaklabel</span>{<span class="pl-c"><span class="pl-c">%</span></span> <span class="pl-c1">\leavevmode\par</span> <span class="pl-c"><span class="pl-c">%</span> now a hack because Sphinx inserts \leavevmode after term node</span> <span class="pl-c1">\def\leavevmode</span>{<span class="pl-c1">\def\leavevmode</span>{<span class="pl-c1">\unhbox\voidb@x</span>}}<span class="pl-c"><span class="pl-c">%</span></span> }<span class="pl-c"><span class="pl-c">%</span></span> } <span class="pl-c1">\makeatother</span></pre></div> <p dir="auto">Side remark about<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/numpy/numpy/blob/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8/doc/source/conf.py#L182-L183">numpy/doc/source/conf.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 182 to 183 in <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8">b83f10e</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="L182" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="182"></td> <td id="LC182" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">\usepackage{amsmath}</span> </td> </tr> <tr class="border-0"> <td id="L183" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="183"></td> <td id="LC183" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">\DeclareUnicodeCharacter{00A0}{\nobreakspace}</span> </td> </tr> </tbody></table> </div> </div> <p></p> <p dir="auto">It is unneeded because already done by Sphinx</p> <p dir="auto">As for the remainder of the LaTeX code in this former <code class="notranslate">latex_preamble</code> it may need some check that it still gives a desired effect in the PDF.</p> <p dir="auto">By the way I would recommend using <code class="notranslate">--halt-on-error</code> for <code class="notranslate">pdflatex</code> builds. In case of an error, the <code class="notranslate">make</code> exits with error code but the LaTeX console output is gigantic and the log file too and one loses time searching for first TeX error, whereas with <code class="notranslate">--halt-on-error</code> this is more efficient.</p> <p dir="auto">The<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/numpy/numpy/blob/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8/doc/Makefile#L220">numpy/doc/Makefile</a> </p> <p class="mb-0 color-fg-muted"> Line 220 in <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/b83f10ef7ee766bf30ccfa563b6cc8f7fd38a4c8">b83f10e</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="L220" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="220"></td> <td id="LC220" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> perl -pi -e <span class="pl-s"><span class="pl-pds">'</span>s/\t(latex.*|pdflatex) (.*)/\t-$$1 -interaction batchmode $$2/<span class="pl-pds">'</span></span> build/latex/Makefile </td> </tr> </tbody></table> </div> </div> <br> does nothing actually with current Sphinx produced Makefile in latex build directory. You can use the method from <a href="https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder" rel="nofollow">https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder</a><p></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="To pass options directly to the (pdf|xe|lua)latex binary, use variable LATEXOPTS, for example: make latexpdf LATEXOPTS=&quot;--halt-on-error&quot; "><pre class="notranslate"><code class="notranslate">To pass options directly to the (pdf|xe|lua)latex binary, use variable LATEXOPTS, for example: make latexpdf LATEXOPTS="--halt-on-error" </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Since 1.6, make latexpdf uses latexmk (not on Windows). This makes sure the needed number of runs is automatically executed to get the cross-references, bookmarks, indices, and tables of contents right. One can pass to latexmk options via the LATEXMKOPTS Makefile variable. For example: make latexpdf LATEXMKOPTS=&quot;-silent&quot; "><pre class="notranslate"><code class="notranslate">Since 1.6, make latexpdf uses latexmk (not on Windows). This makes sure the needed number of runs is automatically executed to get the cross-references, bookmarks, indices, and tables of contents right. One can pass to latexmk options via the LATEXMKOPTS Makefile variable. For example: make latexpdf LATEXMKOPTS="-silent" </code></pre></div> <p dir="auto">(this is with standard Sphinx distributed Makefile, in your case replace <code class="notranslate">latexpdf</code> by <code class="notranslate">-C build/latex all-pdf</code>) and the two can be combined but then (with patches of <code class="notranslate">expdlist</code> above commented out) the LaTeX error does not make it to the console output only to the end of the log file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ make numpy-ref.pdf LATEXOPTS=&quot;--halt-on-error&quot; LATEXMKOPTS=&quot;--silent&quot; latexmk -pdf -dvi- -ps- --silent 'numpy-ref.tex' Latexmk: Run number 1 of rule 'makeindex numpy-ref.idx' Latexmk: Run number 1 of rule 'pdflatex' This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode Latexmk: Summary of warnings from last run of (pdf)latex: Latex found 4 multiply defined reference(s) Latex failed to resolve 388 citation(s) Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1 Refer to 'numpy-ref.log' for details Latexmk: Use the -f option to force complete processing, unless error was exceeding maximum runs, or warnings treated as errors. make: *** [Makefile:33: numpy-ref.pdf] Error 12"><pre class="notranslate"><code class="notranslate">$ make numpy-ref.pdf LATEXOPTS="--halt-on-error" LATEXMKOPTS="--silent" latexmk -pdf -dvi- -ps- --silent 'numpy-ref.tex' Latexmk: Run number 1 of rule 'makeindex numpy-ref.idx' Latexmk: Run number 1 of rule 'pdflatex' This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode Latexmk: Summary of warnings from last run of (pdf)latex: Latex found 4 multiply defined reference(s) Latex failed to resolve 388 citation(s) Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1 Refer to 'numpy-ref.log' for details Latexmk: Use the -f option to force complete processing, unless error was exceeding maximum runs, or warnings treated as errors. make: *** [Makefile:33: numpy-ref.pdf] Error 12 </code></pre></div> <p dir="auto">One has to go in <code class="notranslate">numpy-ref.log</code> find the LaTeX error causing abort:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="! Extra }, or forgotten \endgroup. \@endpbox ...\@arstrutbox \color@endgroup \egroup \the \LT@p@ftn \global \LT... l.131952 \item[{Parameters}] \leavevmode Here is how much of TeX's memory you used: 26928 strings out of 493377 686470 string characters out of 6157389 755139 words of memory out of 5000000 26189 multiletter control sequences out of 15000+600000 84239 words of font info for 133 fonts, out of 8000000 for 9000 500 hyphenation exceptions out of 8191 51i,26n,49p,1225b,732s stack positions out of 5000i,500n,10000p,200000b,80000s ! ==&gt; Fatal error occurred, no output PDF file produced!"><pre class="notranslate"><code class="notranslate">! Extra }, or forgotten \endgroup. \@endpbox ...\@arstrutbox \color@endgroup \egroup \the \LT@p@ftn \global \LT... l.131952 \item[{Parameters}] \leavevmode Here is how much of TeX's memory you used: 26928 strings out of 493377 686470 string characters out of 6157389 755139 words of memory out of 5000000 26189 multiletter control sequences out of 15000+600000 84239 words of font info for 133 fonts, out of 8000000 for 9000 500 hyphenation exceptions out of 8191 51i,26n,49p,1225b,732s stack positions out of 5000i,500n,10000p,200000b,80000s ! ==&gt; Fatal error occurred, no output PDF file produced! </code></pre></div> <p dir="auto">To recap, <code class="notranslate">numpy-ref.pdf</code> builds currently because <code class="notranslate">latex_preamble</code> from doc/source/conf.py is ignored! If this LaTeX configuration was not ignored, the build would fail due to usage of very old (1999) LaTeX package <code class="notranslate">expdlist</code> which causes usage of description lists in table cells break LaTeX (and there is one such usage subsection <code class="notranslate">distutils.misc</code> from section <code class="notranslate">Modules in numpy.distuils</code> part of <code class="notranslate">numpy-ref</code>). A fix is known from an April 2018 scipy commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/scipy/scipy/commit/c881fde/hovercard" href="https://github.com/scipy/scipy/commit/c881fde">scipy/scipy@<tt>c881fde</tt></a>.</p>
0
<p dir="auto">I got a warning :<br> "An empty string has been transmitted to « getElementById() ». @ jquery.min.js:4"<br> When I click somewhere on the document.</p> <p dir="auto">I got only jQuery 2.0.3 and bootstrap 3.0.3 loaded.</p>
<p dir="auto">I am Using Firefox 22.</p> <p dir="auto">Reproduce:</p> <ul dir="auto"> <li>Open <a href="http://getbootstrap.com/components/" rel="nofollow">http://getbootstrap.com/components/</a></li> <li>The error is visible in the console when clicking anywhere in the page but a dropdown menu.</li> </ul> <p dir="auto">I could track down the error to the <code class="notranslate">clearMenus</code> call, which in turn calls <code class="notranslate">getParents</code> where the error finally happens.</p> <p dir="auto">In <code class="notranslate">getParents</code> the <code class="notranslate">selector</code> variable is set to <code class="notranslate">'#'</code>. This character is stripped away inside jQuery.</p>
1
<p dir="auto">Fueled by the success of React, several alternative virtual DOM implementations have emerged, such as <a href="https://muut.com/riotjs/" rel="nofollow">Riot</a>, <a href="http://lhorie.github.io/mithril/" rel="nofollow">Mithril</a>, <a href="https://github.com/Raynos/mercury">Mercury</a>, and <a href="https://github.com/Matt-Esch/virtual-dom">virtual-dom</a>.</p> <p dir="auto">Atom <a href="http://blog.atom.io/2015/02/04/built-in-6to5.html" rel="nofollow">recently integrated Babel into core</a>, and one of our major goals with core is to be as framework-agnostic as possible. One area where it would be nice to be agnostic is in the usage of JSX... it would be great if any of these frameworks could create JSX adaptors so the same convenient syntax could be used with a variety of underlying implementations.</p> <p dir="auto">Currently, JSX expressions are compiled to calls to <code class="notranslate">React.createElement</code>. While it's certainly possible to provide an alternative implementation of the <code class="notranslate">React</code> variable in a given scope, it would be nice if the language were a bit more neutral. One idea would be to call <code class="notranslate">JSX.createElement</code> instead if a <code class="notranslate">JSX</code> variable is in scope at the site of a JSX expression, or perhaps allow the create function to be specified via an option. Or maybe there's a better idea I haven't thought of. I'd prefer the <code class="notranslate">JSX</code> rule so it's consistent and we don't have to extend Atom's basic pragma system to support this option on every file.</p> <p dir="auto">Would your team be open to something like this?</p>
<p dir="auto">The JSX transform is currently coupled to React, but other libraries could potentially make use of the syntax. There are libraries like jsx-transform (<a href="https://github.com/alexmingoia/jsx-transform">https://github.com/alexmingoia/jsx-transform</a>) that make the transform more generic and allow you to specific how the output should look:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @jsx React.createElement */ var React = require('react'); var profile = &lt;div&gt; &lt;img src=&quot;avatar.png&quot; class=&quot;profile&quot; /&gt; &lt;h3&gt;{[user.firstName, user.lastName].join(' ')}&lt;/h3&gt; &lt;/div&gt;;"><pre class="notranslate"><span class="pl-c">/** <span class="pl-k">@jsx</span> React.createElement */</span> <span class="pl-k">var</span> <span class="pl-v">React</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'react'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">profile</span> <span class="pl-c1">=</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">img</span> <span class="pl-c1">src</span><span class="pl-c1">=</span><span class="pl-s">"avatar.png"</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"profile"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h3</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">firstName</span><span class="pl-kos">,</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">lastName</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">' '</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h3</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></pre></div> <p dir="auto">Transforms it to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var React = require('react'); var profile = React.createElement('div', null, [ React.createElement('img', { src: &quot;avatar.png&quot;, class: &quot;profile&quot; }), React.createElement('h3', null, [[user.firstName, user.lastName].join(' ')]) ]);"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">React</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'react'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">profile</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'div'</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-kos">[</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'img'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">src</span>: <span class="pl-s">"avatar.png"</span><span class="pl-kos">,</span> <span class="pl-c1">class</span>: <span class="pl-s">"profile"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-s">'h3'</span><span class="pl-kos">,</span> <span class="pl-c1">null</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">firstName</span><span class="pl-kos">,</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">lastName</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">' '</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Alternative virtual DOM libraries can then use it:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** @jsx dom */ var {dom} = require('deku'); var profile = &lt;div&gt; &lt;img src=&quot;avatar.png&quot; class=&quot;profile&quot; /&gt; &lt;h3&gt;{[user.firstName, user.lastName].join(' ')}&lt;/h3&gt; &lt;/div&gt;;"><pre class="notranslate"><span class="pl-c">/** <span class="pl-k">@jsx</span> dom */</span> <span class="pl-k">var</span> <span class="pl-kos">{</span>dom<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'deku'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">profile</span> <span class="pl-c1">=</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">img</span> <span class="pl-c1">src</span><span class="pl-c1">=</span><span class="pl-s">"avatar.png"</span> <span class="pl-c1">class</span><span class="pl-c1">=</span><span class="pl-s">"profile"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">h3</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-kos">[</span><span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">firstName</span><span class="pl-kos">,</span> <span class="pl-s1">user</span><span class="pl-kos">.</span><span class="pl-c1">lastName</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">' '</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">h3</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></pre></div> <p dir="auto">And get the same benefits of using JSX.</p> <p dir="auto">You could easily just add a setting for it rather than using the comment format too. If this is something that would be useful I can look at opening a PR for it.</p>
1
<p dir="auto">In the <code class="notranslate">material-ui-next</code> example, if you add a subcomponent to the page which uses the <code class="notranslate">withStyles</code> HOC, changing any of the style properties breaks HMR.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">When changing stylesheet properties in a subcomponent that uses the <code class="notranslate">withStyles</code> HOC from Material UI (beta), HMR should work properly.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">When the page hot reloads due to a style change, this error occurs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at http://localhost:3000/_next/1501726171018/commons.js:49907:49 at Array.forEach (&lt;anonymous&gt;) at ProxyComponent.detach (http://localhost:3000/_next/1501726171018/commons.js:49905:23) at ProxyComponent.detach (http://localhost:3000/_next/1501726171018/commons.js:41945:30) at ProxyComponent.componentWillUnmount (http://localhost:3000/_next/1501726171018/commons.js:49843:16) at ProxyComponent.proxiedComponentWillUnmount (http://localhost:3000/_next/1501726171018/commons.js:41982:43) at http://localhost:3000/_next/1501726171018/commons.js:33428:25 at measureLifeCyclePerf (http://localhost:3000/_next/1501726171018/commons.js:33095:12) at ReactCompositeComponentWrapper.unmountComponent (http://localhost:3000/_next/1501726171018/commons.js:33427:11) at Object.unmountComponent (http://localhost:3000/_next/1501726171018/commons.js:2501:22)`"><pre class="notranslate"><code class="notranslate">Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at http://localhost:3000/_next/1501726171018/commons.js:49907:49 at Array.forEach (&lt;anonymous&gt;) at ProxyComponent.detach (http://localhost:3000/_next/1501726171018/commons.js:49905:23) at ProxyComponent.detach (http://localhost:3000/_next/1501726171018/commons.js:41945:30) at ProxyComponent.componentWillUnmount (http://localhost:3000/_next/1501726171018/commons.js:49843:16) at ProxyComponent.proxiedComponentWillUnmount (http://localhost:3000/_next/1501726171018/commons.js:41982:43) at http://localhost:3000/_next/1501726171018/commons.js:33428:25 at measureLifeCyclePerf (http://localhost:3000/_next/1501726171018/commons.js:33095:12) at ReactCompositeComponentWrapper.unmountComponent (http://localhost:3000/_next/1501726171018/commons.js:33427:11) at Object.unmountComponent (http://localhost:3000/_next/1501726171018/commons.js:2501:22)` </code></pre></div> <p dir="auto">This is happening at this line: <a href="https://github.com/callemall/material-ui/blob/v1-beta/src/styles/withStyles.js#L173">https://github.com/callemall/material-ui/blob/v1-beta/src/styles/withStyles.js#L173</a> (<code class="notranslate">sheetManager</code> is undefined)</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Download <a href="https://github.com/sbking/next.js/tree/material-ui-next-hmr-issue/examples/with-material-ui-next">https://github.com/sbking/next.js/tree/material-ui-next-hmr-issue/examples/with-material-ui-next</a></li> <li><code class="notranslate">npm install &amp;&amp; npm run dev</code></li> <li>Open in browser, see that text is red.</li> <li>Change the color to <code class="notranslate">blue</code> in <code class="notranslate">components/StyledText.js</code></li> <li>HMR fails</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">Trying to adjust component styles with hot style updates.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>both latest and 3.0.1-beta.20</td> </tr> <tr> <td>node</td> <td>8.2.1</td> </tr> <tr> <td>OS</td> <td>OS X (both El Capitan and Sierra)</td> </tr> <tr> <td>browser</td> <td>Chrome, Firefox, Safari</td> </tr> </tbody> </table>
<p dir="auto">I'm trying to add a custom Social component to my site that adds several relevant meta tags, but it's setting the <code class="notranslate">&lt;title&gt;</code> to an empty string. I have the title defined in <code class="notranslate">_document.js</code> and don't change it anywhere else in the codebase. I'm running the Canary version of Next.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Document, { Head, Main, NextScript } from 'next/document' export default class CustomDocument extends Document { static async getInitialProps (ctx) { return await Document.getInitialProps(ctx) } render () { return ( &lt;html lang=&quot;en&quot;&gt; &lt;Head&gt; &lt;meta httpEquiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt; &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&gt; &lt;title&gt;Website Title&lt;/title&gt; &lt;/Head&gt; &lt;body&gt; &lt;Main /&gt; &lt;NextScript /&gt; &lt;/body&gt; &lt;/html&gt; ) } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Document</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Head</span><span class="pl-kos">,</span> <span class="pl-v">Main</span><span class="pl-kos">,</span> <span class="pl-v">NextScript</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/document'</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">CustomDocument</span> <span class="pl-k">extends</span> <span class="pl-v">Document</span> <span class="pl-kos">{</span> <span class="pl-k">static</span> <span class="pl-k">async</span> <span class="pl-en">getInitialProps</span> <span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">await</span> <span class="pl-v">Document</span><span class="pl-kos">.</span><span class="pl-en">getInitialProps</span><span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-en">render</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">html</span> <span class="pl-c1">lang</span><span class="pl-c1">=</span><span class="pl-s">"en"</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">httpEquiv</span><span class="pl-c1">=</span><span class="pl-s">"X-UA-Compatible"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-s">"IE=edge"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"viewport"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-s">"width=device-width, initial-scale=1"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">title</span><span class="pl-c1">&gt;</span>Website Title<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">title</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">body</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Main</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">NextScript</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">body</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">html</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The custom component I call looks like this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Head from 'next/head' export default ({ title, image, description, url }) =&gt; ( &lt;Head&gt; &lt;meta key=&quot;twitter-card&quot; name=&quot;twitter:card&quot; content=&quot;summary&quot; /&gt; &lt;meta key=&quot;twitter-site&quot; name=&quot;twitter:site&quot; content=&quot;@ianmitchel1&quot; /&gt; &lt;meta key=&quot;twitter-title&quot; name=&quot;twitter:title&quot; content={title} /&gt; &lt;meta key=&quot;twitter-description&quot; name=&quot;twitter:description&quot; content={description} /&gt; &lt;meta key=&quot;twitter-image&quot; name=&quot;twitter:image&quot; content={image} /&gt; &lt;meta key=&quot;twitter-url&quot; name=&quot;twitter:url&quot; content={url} /&gt; &lt;meta key=&quot;facebook-type&quot; property=&quot;og:type&quot; content=&quot;article&quot; /&gt; &lt;meta key=&quot;facebook-title&quot; property=&quot;og:title&quot; content={title} /&gt; &lt;meta key=&quot;facebook-description&quot; property=&quot;og:description&quot; content={description} /&gt; &lt;meta key=&quot;facebook-image&quot; property=&quot;og:image&quot; content={image} /&gt; &lt;meta key=&quot;facebook-url&quot; property=&quot;og:url&quot; content={url} /&gt; &lt;/Head&gt; )"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Head</span> <span class="pl-k">from</span> <span class="pl-s">'next/head'</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> title<span class="pl-kos">,</span> image<span class="pl-kos">,</span> description<span class="pl-kos">,</span> url <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-card"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:card"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-s">"summary"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-site"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:site"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-s">"@ianmitchel1"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-title"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:title"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">title</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-description"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:description"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">description</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-image"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:image"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">image</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"twitter-url"</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-s">"twitter:url"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">url</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"facebook-type"</span> <span class="pl-c1">property</span><span class="pl-c1">=</span><span class="pl-s">"og:type"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-s">"article"</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"facebook-title"</span> <span class="pl-c1">property</span><span class="pl-c1">=</span><span class="pl-s">"og:title"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">title</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"facebook-description"</span> <span class="pl-c1">property</span><span class="pl-c1">=</span><span class="pl-s">"og:description"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">description</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"facebook-image"</span> <span class="pl-c1">property</span><span class="pl-c1">=</span><span class="pl-s">"og:image"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">image</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">meta</span> <span class="pl-c1">key</span><span class="pl-c1">=</span><span class="pl-s">"facebook-url"</span> <span class="pl-c1">property</span><span class="pl-c1">=</span><span class="pl-s">"og:url"</span> <span class="pl-c1">content</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">url</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span></pre></div> <p dir="auto">It adds all the meta tags correctly (not sure if it's related, but I needed to add the <code class="notranslate">key</code> parameter - otherwise only the second set of meta tags was added) and the other meta tags from <code class="notranslate">_document.js</code> remain intact, but somehow the title tag just becomes <code class="notranslate">&lt;title&gt;&lt;/title&gt;</code>.</p> <p dir="auto">I've created a small example here - <a href="https://next-title-pnxpfydvvh.now.sh" rel="nofollow">https://next-title-pnxpfydvvh.now.sh</a></p>
0
<p dir="auto">To search for a package / theme in the settings tab, I have to type in the search query then click (if looking for a package) the themes button, then the package button to have Atom search for a package matching that string.</p>
<p dir="auto">Saw a tweet that the search for new packages doesn't work.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/378023/8426066/6df8c252-1f47-11e5-918a-71a9279b2ce5.gif"><img src="https://cloud.githubusercontent.com/assets/378023/8426066/6df8c252-1f47-11e5-918a-71a9279b2ce5.gif" alt="tmlrhcw" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">From the gif it seems that the first search was successful, otherwise there would be a bigger gap after the input. Search term was probably <code class="notranslate">set</code>.</p> <p dir="auto">Can't reproduce it myself.</p>
1
<h2 dir="auto">Summary</h2> <p dir="auto">Installing numpy on aarch64 via pip using command "pip3 install numpy" tries to build wheel from source code</p> <h2 dir="auto">Problem description</h2> <p dir="auto">Numpy don't have wheel for aarch64 on PyPI repository. So, while installing numpy via pip on aarch64, pip builds wheel for same resulting in it takes more time to install numpy. Making wheel available for aarch64 will benefit aarch64 users by minimizing numpy installation time.</p> <h2 dir="auto">Expected Output</h2> <p dir="auto">Pip should be able to download numpy wheel from PyPI repository rather than building it from source code.</p> <p dir="auto">@numpy-team, please let me know if I can help you building wheel/uploading to PyPI repository. I am curious to make numpy wheel available for aarch64. It will be a great opportunity for me to work with you.</p>
<p dir="auto">Manylinux2014 got released with support for wider selection of architectures: aarch64, arm32, ppc64le, s390x. Are there plans to use it for releasing wheels for other architectures than x86-64/i686?</p> <p dir="auto">Would cut "pip install numpy" times A LOT of aarch64 platform.</p>
1
<p dir="auto">On Mac OS X, you can change the text of the primary "OK" button in open and save dialogs by providing a "prompt": <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSavePanel_Class/index.html#//apple_ref/occ/instp/NSSavePanel/prompt" rel="nofollow">https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSSavePanel_Class/index.html#//apple_ref/occ/instp/NSSavePanel/prompt</a></p> <p dir="auto">It'd be great to make this an option on the dialog APIs. We want to show an open dialog and ask the user to create / select a folder where files will be saved, and change the prompt from "Open" to "Choose".</p> <p dir="auto">Slightly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="148701941" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/5178" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/5178/hovercard" href="https://github.com/electron/electron/issues/5178">#5178</a></p>
<p dir="auto">A Choose dialog is just like an Open dialog, but not only does it have a custom title, it also has a custom name for the “Open” button. Two examples where it is helpful:</p> <ul dir="auto"> <li>choosing a directory where downloaded files should be saved – you “Choose” the directory</li> <li>using a dialog to “Import” a file in a different format, not to “Open” a file in your app’s format</li> </ul> <p dir="auto">It is used in OS X apps: <a href="https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowDialogs.html#//apple_ref/doc/uid/20000957-CH43-SW8" rel="nofollow">OS X Human Interface Guidelines – The Choose Dialog</a>. I don’t know if other platforms have an equivalent.</p> <p dir="auto">The simplest way to support it would be accepting another option in the <code class="notranslate">options</code> parameter of <a href="https://github.com/atom/electron/blob/master/docs/api/dialog.md#dialogshowopendialogbrowserwindow-options-callback"><code class="notranslate">dialog.showOpenDialog</code></a>. The property name would be something like <code class="notranslate">buttonLabel</code>, <code class="notranslate">openButtonLabel</code>, or <code class="notranslate">prompt</code> (which is OS X’s name for it). The property should contain a string that the button will be renamed to.</p> <p dir="auto">To implement this for OS X, you just need to add this code to <a href="https://github.com/atom/electron/blob/ea74e825c91d9401851124cfe8deede03c3c79b9/atom/browser/ui/file_dialog_mac.mm#L48"><code class="notranslate">SetupDialog</code> in <code class="notranslate">file_dialog_mac.mm</code></a>:</p> <div class="highlight highlight-source-objc++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if (!prompt.empty()) [dialog setPrompt:prompt];"><pre class="notranslate"><span class="pl-k">if</span> (!prompt.empty()) [dialog <span class="pl-c1">setPrompt:</span>prompt];</pre></div> <p dir="auto">And also change <code class="notranslate">SetupDialog</code> and its callers to pass <code class="notranslate">prompt</code> in, which would be extracted from the <code class="notranslate">options</code> of <code class="notranslate">showOpenDialog</code>.</p> <hr> <p dir="auto">I can imagine that this might be useful for Save dialogs, too – you could change the button to “Save As” or “Export” instead of “Save”. You can probably implement it for <a href="https://github.com/atom/electron/blob/master/docs/api/dialog.md#dialogshowsavedialogbrowserwindow-options-callback"><code class="notranslate">dialog.showSaveDialog</code></a> in exactly the same way as for <code class="notranslate">showOpenDialog</code>. It would make sense that users could pass the same option to customize the button, since those two functions already support mostly the same options.</p>
1
<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>yes</td> </tr> <tr> <td>Symfony version</td> <td>3.3.x</td> </tr> </tbody> </table> <p dir="auto">Currently, when you want to inject all services with a specific tag you have to write your own compiler pass <a href="https://symfony.com/doc/current/service_container/tags.html" rel="nofollow">as described here</a>. Additionally, one has to use method calls instead of injecting the services into the constructor because obviously the parameter cannot be inferred.</p> <p dir="auto">It would be handy if there was a way to inject all services that are tagged with a specific tag, optimally indexed by their id:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Foo\Bar: arguments: - '@doctrine.orm.entity_manager' - '@=taggedServices(&quot;my_tag&quot;)'"><pre class="notranslate"><span class="pl-ent">Foo\Bar</span>: <span class="pl-ent">arguments</span>: - <span class="pl-s"><span class="pl-pds">'</span>@doctrine.orm.entity_manager<span class="pl-pds">'</span></span> - <span class="pl-s"><span class="pl-pds">'</span>@=taggedServices("my_tag")<span class="pl-pds">'</span></span></pre></div> <p dir="auto">Resulting in:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[ &quot;Foo\Service1&quot; =&gt; Foo\Service1 {...}, &quot;Foo\Service2&quot; =&gt; Foo\Service2 {...}, ]"><pre class="notranslate">[ "<span class="pl-s">Foo\Service1</span>" =&gt; <span class="pl-v">Foo</span>\<span class="pl-v">Service1</span> {<span class="pl-c1">.</span>.<span class="pl-c1">.</span>}, "<span class="pl-s">Foo\Service2</span>" =&gt; <span class="pl-v">Foo</span>\<span class="pl-v">Service2</span> {<span class="pl-c1">.</span>.<span class="pl-c1">.</span>}, ]</pre></div> <p dir="auto">This is probably not an everyday use-case but maybe other people would be interested in this.</p>
<p dir="auto">Similar issue to (in the sense of having a similar context) than <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38601842" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/11460" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/11460/hovercard" href="https://github.com/symfony/symfony/issues/11460">#11460</a></p> <p dir="auto">In Drupal we have a lot of tagged services which are injected into a single one. When we started most of them had custom Compiler Passed, but than we realized that we can easily extract that into a common service:</p> <p dir="auto">This would be the "collector" service:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" breadcrumb: class: Drupal\Core\Breadcrumb\BreadcrumbManager arguments: ['@module_handler'] tags: - { name: service_collector, tag: breadcrumb_builder, call: addBuilder }"><pre class="notranslate"><code class="notranslate"> breadcrumb: class: Drupal\Core\Breadcrumb\BreadcrumbManager arguments: ['@module_handler'] tags: - { name: service_collector, tag: breadcrumb_builder, call: addBuilder } </code></pre></div> <p dir="auto">and then you do something like that in the client service:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" forum.breadcrumb.listing: class: Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder arguments: ['@entity.manager', '@config.factory', '@forum_manager'] tags: - { name: breadcrumb_builder, priority: 314 }"><pre class="notranslate"><code class="notranslate"> forum.breadcrumb.listing: class: Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder arguments: ['@entity.manager', '@config.factory', '@forum_manager'] tags: - { name: breadcrumb_builder, priority: 314 } </code></pre></div> <p dir="auto">Any oppinions?</p>
1
<h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: N/A</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Docker nightly</li> <li><strong>TensorFlow installed from (source or binary)</strong>: Docker nightly</li> <li><strong>TensorFlow version (use command below)</strong>: Docker nightly</li> <li><strong>Python version</strong>: Docker nightly</li> <li><strong>Bazel version (if compiling from source)</strong>: Docker nightly</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: Docker nightly</li> <li><strong>CUDA/cuDNN version</strong>: Docker nightly</li> <li><strong>GPU model and memory</strong>: N/A</li> <li><strong>Exact command to reproduce</strong>: N/A</li> </ul> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Please add <code class="notranslate">warm_start_from</code> parameter in <code class="notranslate">tf.model_to_estimator</code></p> <h3 dir="auto">Source code / logs</h3> <p dir="auto">N/A</p>
<p dir="auto">The Golang api <a href="https://godoc.org/github.com/tensorflow/tensorflow/tensorflow/go#Tensor.WriteContentsTo" rel="nofollow">WriteContentsTo</a> can be used to writes the serialized contents of a tensor to io.Writer, where the tensor is built from golang scalars, slices, and arrays.</p> <p dir="auto">Yet there's not a Golang API to serialize data into tf.Example protos(tfrecords).</p> <p dir="auto">For example, when i want serialize a libsvm into tf.Example protos, i can do this by:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def libsvm2tfrecords(data_source, target_dir, delimiter='\t'): &quot;&quot;&quot; a single file should not contain lines more than 1000,000, or we should use libsvm2proto_par :param data_source: libsvm file path :param target_dir: dir to storage the serialize proto file :param delimiter: delimiter for csv reader :return: &quot;&quot;&quot; if not os.path.isfile(data_source): raise ValueError('data file passed do not exist or not a file') file_name = os.path.join(target_dir, os.path.splitext( os.path.basename(data_source))[0] + '.tfrecords') writer = tf.python_io.TFRecordWriter(file_name) start = datetime.now() line_c = 0 with open(data_source, 'rb') as rf: f_reader = csv.reader(rf, delimiter=delimiter, quotechar='|') for row in f_reader: line_c += 1 feature = dict() indexes = [] values = [] feature.update({'label': _float_feature([float(row[0])])}) for e in row[1:]: index, value = e.split(':') indexes.append(int(index)) values.append(float(value)) feature.update({'index': _int64_feature(indexes)}) feature.update({'value': _float_feature(values)}) example = tf.train.Example(features=tf.train.Features(feature=feature)) writer.write(example.SerializeToString()) writer.close() end = datetime.now() print(&quot;- consumed time: %ds for %s&quot; % ((end-start).seconds, data_source))"><pre class="notranslate"><code class="notranslate">def libsvm2tfrecords(data_source, target_dir, delimiter='\t'): """ a single file should not contain lines more than 1000,000, or we should use libsvm2proto_par :param data_source: libsvm file path :param target_dir: dir to storage the serialize proto file :param delimiter: delimiter for csv reader :return: """ if not os.path.isfile(data_source): raise ValueError('data file passed do not exist or not a file') file_name = os.path.join(target_dir, os.path.splitext( os.path.basename(data_source))[0] + '.tfrecords') writer = tf.python_io.TFRecordWriter(file_name) start = datetime.now() line_c = 0 with open(data_source, 'rb') as rf: f_reader = csv.reader(rf, delimiter=delimiter, quotechar='|') for row in f_reader: line_c += 1 feature = dict() indexes = [] values = [] feature.update({'label': _float_feature([float(row[0])])}) for e in row[1:]: index, value = e.split(':') indexes.append(int(index)) values.append(float(value)) feature.update({'index': _int64_feature(indexes)}) feature.update({'value': _float_feature(values)}) example = tf.train.Example(features=tf.train.Features(feature=feature)) writer.write(example.SerializeToString()) writer.close() end = datetime.now() print("- consumed time: %ds for %s" % ((end-start).seconds, data_source)) </code></pre></div> <p dir="auto">BUT Golang api does not seem to be able to achieve this.</p>
0
<p dir="auto">Applying filter on the box plot didn't update the view .</p> <h3 dir="auto">Expected results</h3> <p dir="auto">Should update box plot view after running query</p> <h3 dir="auto">Actual results</h3> <p dir="auto">Box plot only updates after saving the view.</p> <h4 dir="auto">Screenshots</h4> <p dir="auto">If applicable, add screenshots to help explain your problem.</p> <h4 dir="auto">How to reproduce the bug</h4> <ol dir="auto"> <li>Create a box plot</li> <li>Apply filter on data</li> <li>Run the query after applying filter</li> <li>The box plot didn't update</li> </ol> <h3 dir="auto">Environment</h3> <p dir="auto">(please complete the following information):</p> <ul dir="auto"> <li>superset version: <code class="notranslate">master</code></li> <li>python version: <code class="notranslate">3.6</code></li> <li>node.js version: <code class="notranslate">latest</code></li> <li>npm version: <code class="notranslate">latest</code></li> </ul> <h3 dir="auto">Checklist</h3> <p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of the superset.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li> </ul>
<p dir="auto">When following the <a href="http://airbnb.io/caravel/installation.html" rel="nofollow">standard install instructions</a>, example datasets are installed. If a new user is assigned the role 'Alpha', they are able to view the database, tables, slices and dashboards. If a new role is created by duplicating the Alpha role (e.g. 'Alpha_copy'), and the new user assigned this role instead, then the slices and dashboards are no longer visible, despite having an identical permission set. Is this expected?</p> <p dir="auto">A related issue is that if the 'Public' role is assigned the 'all datasource access on all_datasource_access' permission, and a user assigned both Gamma and Public roles, they also cannot see the slices and dashboards, as may be expected - as they can't seem to see the tables. The <a href="http://airbnb.io/caravel/security.html" rel="nofollow">security</a> page has permissions such as 'datasource access on [main].birth_names', which aren't available to me in the permissions auto-complete box after a clean install. Is this a bug or are the permission sets created before the tables in the install routine? If so how do you create permission properties for tables?</p> <p dir="auto">Thanks,<br> Sam</p>
0
<p dir="auto">What do you think about returning promises from transforms? I have a case where I need to perform some async operation in a transform.</p>
<p dir="auto">I'm trying to replicate a working auth request with axios (currently implemented using reqwest). I've read through <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121216920" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/167" data-hovercard-type="pull_request" data-hovercard-url="/axios/axios/pull/167/hovercard" href="https://github.com/axios/axios/pull/167">#167</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="98686828" data-permission-text="Title is private" data-url="https://github.com/axios/axios/issues/97" data-hovercard-type="issue" data-hovercard-url="/axios/axios/issues/97/hovercard" href="https://github.com/axios/axios/issues/97">#97</a> and have gotten close, but still not quite there.</p> <p dir="auto"><a href="https://gist.github.com/jabacchetta/542314feb01b5fe89447bba22172f9c5">Here's a working example using reqwest</a>.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12591890/20076041/69c2203e-a4fc-11e6-8528-aa7063a778d7.jpg"><img src="https://cloud.githubusercontent.com/assets/12591890/20076041/69c2203e-a4fc-11e6-8528-aa7063a778d7.jpg" alt="reqwest" style="max-width: 100%;"></a></p> <p dir="auto">I tried duplicating the request exactly (according to the network tab) using axios, and <a href="https://gist.github.com/jabacchetta/899586e603764b0c0425552ccb18a0bc">this is what I came up with</a> (using a suggested transform workaround from one of the threads above):</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/12591890/20076159/f614b632-a4fc-11e6-94df-285a5996f53d.jpg"><img src="https://cloud.githubusercontent.com/assets/12591890/20076159/f614b632-a4fc-11e6-94df-285a5996f53d.jpg" alt="transform" style="max-width: 100%;"></a></p> <p dir="auto">From the network tab, this solution appears to have worked for the request being manipulated, but the next Redux action (loadCurrentUser) that gets dispatched from that .then success fails, giving me the following error (which I did not get with the original reqwest solution):</p> <blockquote> <p dir="auto">No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a>' is therefore not allowed access. The response had HTTP status code 401.</p> </blockquote> <p dir="auto">I also tried <a href="https://gist.github.com/jabacchetta/ce5e0f87d88a5d0ea0584c406e9cad0b">using params in the config</a> and received the exact same error.</p> <p dir="auto">What am I doing wrong here?</p>
0
<p dir="auto">I noticed that the topmost widget in a Stack will always intercept touch events, even when its opacity is set to 0.0. From the doc <a href="https://docs.flutter.io/flutter/widgets/Opacity-class.html" rel="nofollow">https://docs.flutter.io/flutter/widgets/Opacity-class.html</a>,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" For the value 0.0, the child is simply not painted at all. "><pre class="notranslate"><code class="notranslate"> For the value 0.0, the child is simply not painted at all. </code></pre></div> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Demo', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new MyHomePage(), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key}) : super(key: key); @override _MyHomePageState createState() =&gt; new _MyHomePageState(); } class _MyHomePageState extends State&lt;MyHomePage&gt; { bool _visible = true; void _toggleLayerB() { setState(() { _visible = !_visible; }); } @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar(title: new Text('Home')), body: new Stack( children: &lt;Widget&gt;[ new Center( child: new RaisedButton( onPressed: () =&gt; print('Layer A pressed!'), child: new Text('Layer A') ) ), new Opacity( opacity: _visible ? 1.0 : 0.0, child: new Center( child: new RaisedButton( // wrapped in Opacity widget onPressed: () =&gt; print('Layer B pressed!'), child: new Text('Layer B') ) ), ) ], ), floatingActionButton: new FloatingActionButton( onPressed: _toggleLayerB, tooltip: &quot;Toggle Layer B's visibility&quot;, child: new Icon(Icons.add), ), ); } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>; <span class="pl-k">void</span> <span class="pl-en">main</span>() { <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>()); } <span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> { <span class="pl-k">@override</span> <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) { <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>( title<span class="pl-k">:</span> <span class="pl-s">'Flutter Demo'</span>, theme<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ThemeData</span>( primarySwatch<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.blue, ), home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(), ); } } <span class="pl-k">class</span> <span class="pl-c1">MyHomePage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> { <span class="pl-c1">MyHomePage</span>({<span class="pl-c1">Key</span> key}) <span class="pl-k">:</span> <span class="pl-c1">super</span>(key<span class="pl-k">:</span> key); <span class="pl-k">@override</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-en">createState</span>() <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">_MyHomePageState</span>(); } <span class="pl-k">class</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span>&lt;<span class="pl-c1">MyHomePage</span>&gt; { <span class="pl-c1">bool</span> _visible <span class="pl-k">=</span> <span class="pl-c1">true</span>; <span class="pl-k">void</span> <span class="pl-en">_toggleLayerB</span>() { <span class="pl-en">setState</span>(() { _visible <span class="pl-k">=</span> <span class="pl-k">!</span>_visible; }); } <span class="pl-k">@override</span> <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) { <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>( appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>(title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Home'</span>)), body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Stack</span>( children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[ <span class="pl-k">new</span> <span class="pl-c1">Center</span>( child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">RaisedButton</span>( onPressed<span class="pl-k">:</span> () <span class="pl-k">=&gt;</span> <span class="pl-en">print</span>(<span class="pl-s">'Layer A pressed!'</span>), child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Layer A'</span>) ) ), <span class="pl-k">new</span> <span class="pl-c1">Opacity</span>( opacity<span class="pl-k">:</span> _visible <span class="pl-k">?</span> <span class="pl-c1">1.0</span> <span class="pl-k">:</span> <span class="pl-c1">0.0</span>, child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>( child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">RaisedButton</span>( <span class="pl-c">// wrapped in Opacity widget</span> onPressed<span class="pl-k">:</span> () <span class="pl-k">=&gt;</span> <span class="pl-en">print</span>(<span class="pl-s">'Layer B pressed!'</span>), child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Layer B'</span>) ) ), ) ], ), floatingActionButton<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">FloatingActionButton</span>( onPressed<span class="pl-k">:</span> _toggleLayerB, tooltip<span class="pl-k">:</span> <span class="pl-s">"Toggle Layer B's visibility"</span>, child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.add), ), ); } }</pre></div> <p dir="auto">Result:<br> The topmost widget (Layer B) will always register button presses, even if not visible/painted on screen. Seems wrong to me.</p>
<p dir="auto">This will prevent stacked items which are not visible from blocking items which are nevertheless "behind" them.</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">Bug Report</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">core</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 1.9.4 ansible 2.0.1.0"><pre class="notranslate"><code class="notranslate">ansible 1.9.4 ansible 2.0.1.0 </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">Default of yum install</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">CentOS Linux release 7.2.1511 (Core)<br> SUMMARY and</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Inconsistent behavior of when statement</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">If I write an inventory file and a task file as follows, <code class="notranslate">do_something.sh</code> is executed only on web1.example.com.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[webservers] web1.example.com var1=true web2.example.com var1=false"><pre class="notranslate"><code class="notranslate">[webservers] web1.example.com var1=true web2.example.com var1=false </code></pre></div> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- command: /usr/bin/do_something.sh when: var1"><pre class="notranslate">- <span class="pl-ent">command</span>: <span class="pl-s">/usr/bin/do_something.sh</span> <span class="pl-ent">when</span>: <span class="pl-s">var1</span></pre></div> <p dir="auto">But if I write an inventory file as follows:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- command: /usr/bin/do_something.sh when: var1 is defined and var1"><pre class="notranslate">- <span class="pl-ent">command</span>: <span class="pl-s">/usr/bin/do_something.sh</span> <span class="pl-ent">when</span>: <span class="pl-s">var1 is defined and var1</span></pre></div> <p dir="auto"><code class="notranslate">do_something.sh</code> is executed on both web1.example.com and web2.example.com.<br> Of course, I know that all host variables defined in inventory files are treated as string variables. However, it does not explain this inconsistent behavior.<br> Here is an example of task.yml: <a href="https://github.com/muziyoshiz/ansible-2.0-sample/blob/master/roles/webtier4/tasks/main.yml">ansible-2.0-sample/main.yml at master muziyoshiz/ansible-2.0-sample</a></p> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">If <code class="notranslate">web2.example.com var1=false</code> is in the inventory file,</p> <ul dir="auto"> <li><code class="notranslate">when: var1</code> and <code class="notranslate">when: var1 is defined and var1</code> should be treated same as <code class="notranslate">when: false</code></li> </ul> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">If <code class="notranslate">web2.example.com var1=false</code> is in the inventory file,</p> <ul dir="auto"> <li><code class="notranslate">when: var1</code> was treated same as <code class="notranslate">when: false</code></li> <li><code class="notranslate">when: var1 is defined and var1</code> was treated same as <code class="notranslate">when: true</code></li> </ul>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">when / when not conditional</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">From devel branch:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.5.0 (devel 34206a0402) last updated 2018/01/08 13:39:51 (GMT -400) config file = None configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/myuser/git/ansible/lib/ansible executable location = /home/myuser/git/ansible/venv/bin/ansible python version = 3.6.2 (default, Oct 2 2017, 16:51:32) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]"><pre class="notranslate"><code class="notranslate">ansible 2.5.0 (devel 34206a0402) last updated 2018/01/08 13:39:51 (GMT -400) config file = None configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/myuser/git/ansible/lib/ansible executable location = /home/myuser/git/ansible/venv/bin/ansible python version = 3.6.2 (default, Oct 2 2017, 16:51:32) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] </code></pre></div> <p dir="auto">Also versions 2.4.1 and 2.4.2 from pip, and 2.4.1 via RPM on RHEL.</p> <h5 dir="auto">CONFIGURATION</h5> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ansible-config dump --only-changed $ (no output)"><pre class="notranslate">$ ansible-config dump --only-changed $ (no output)</pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Fedora 26, RHEL 7</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When a user supplies a variable that should be a boolean value as the string value 'false', we witness inconsistent behavior in the 'when' and 'when not' condition. For example, if x="false", then both "when: not x" and "when: x" resolve to false.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">This was originally triggered by a value provided in an ini formatted inventory, (eg, x=false) which equates to a string, but the same behavior can be replicated with</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- - hosts: localhost connection: local vars: x: &quot;false&quot; tasks: - set_fact: other_var: &quot;x was true&quot; when: x - set_fact: other_var: &quot;x was false&quot; when: not x - debug: var=other_var"><pre class="notranslate"><code class="notranslate">--- - hosts: localhost connection: local vars: x: "false" tasks: - set_fact: other_var: "x was true" when: x - set_fact: other_var: "x was false" when: not x - debug: var=other_var </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [debug] ok: [localhost] =&gt; { &quot;attempts&quot;: 1, &quot;other_var&quot;: &quot;x was false&quot; }"><pre class="notranslate"><code class="notranslate">TASK [debug] ok: [localhost] =&gt; { "attempts": 1, "other_var": "x was false" } </code></pre></div> <p dir="auto">It would be fair if this resolved to 'x was true' as well, because a defined string (other than one that shares a name with a boolean) will resolve to True normally. However, I feel both 'x' and 'not x' cannot be false for the same value.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [set_fact] skipping: [localhost] TASK [set_fact] skipping: [localhost] TASK [debug] ok: [localhost] =&gt; { &quot;attempts&quot;: 1, &quot;other_var&quot;: &quot;VARIABLE IS NOT DEFINED!&quot; } "><pre class="notranslate"><code class="notranslate">TASK [set_fact] skipping: [localhost] TASK [set_fact] skipping: [localhost] TASK [debug] ok: [localhost] =&gt; { "attempts": 1, "other_var": "VARIABLE IS NOT DEFINED!" } </code></pre></div>
1
<p dir="auto">Before, a very nice white with shadows button was generated when using the "btn" class without any other class like "btn-primary" for example.</p> <p dir="auto">Now, in BS3, it is gone.</p> <p dir="auto">Please put it back.</p> <p dir="auto">Same goes with all input-x sizes, badge colors and many many more. I think the purpose of a new BS3 version should be adding new features and not deleting them.</p>
<p dir="auto">I suppose I could have posted in the BS3 thread, but at some point individual topics about BS3 need to have their own thread.</p> <p dir="auto"><strong>Buttons</strong></p> <ul dir="auto"> <li>I don't think the hover colour change is drastic enough. On all but the green button, I can barely discern any colour change. I think the change should be more obvious - especially because most people have bad eyesight.</li> <li>There's no "plain" button any more. To me this seems like quite a stark omission. I can think of many cases where I don't want all my buttons to stick out as much as black-on-white.</li> </ul> <p dir="auto"><del><strong>Navbar</strong><br> <code class="notranslate">.navbar-text</code> and <code class="notranslate">.navbar-btn</code> aren't vertically aligned with <code class="notranslate">.brand</code>. You can see this here: <a href="http://twbs.github.io/bootstrap/components/#navbar-buttons" rel="nofollow">http://twbs.github.io/bootstrap/components/#navbar-buttons</a></del></p> <p dir="auto"><strong>List groups &amp; Panels</strong><br> Love these. Great addition.</p>
1
<p dir="auto">在“Pre-instantating singletons in org.springframework.bean.factory.support.DefaultListableBeanFactory@30d94ae4:”之后:一直循环报这个上面的title:<br> 即:[Finalizer] WARN in [com.alibaba.dubbo.config.ReferenceConfig$1.finalize(ReferenceConfig.java:106)] -[DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE,dubbo version 2.5.3<br> 纯手打的 请见谅,也麻烦解答下<del>谢谢</del></p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.7.6</li> <li>Operating System version: docker</li> <li>Java version: jdk8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>consumer and provider are both used dubbo-2.7.6.</li> <li>no startup sequence.</li> <li>every time.</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> <p dir="auto">normal.</p> <p dir="auto">What actually happens?</p> <h2 dir="auto">[DUBBO] Decode rpc invocation failed: null, dubbo version: 2.7.6, current host: xxx.xxx.xxx.xxx</h2> <p dir="auto">java.lang.NullPointerException: null at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:118) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:79) at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)</p>
0
<p dir="auto">Go spec says:</p> <blockquote> <p dir="auto">For real and imag, the argument must be of complex type, and the return type is the corresponding floating-point type: float32 for a complex64 argument, and float64 for a complex128 argument. <strong>If the argument evaluates to an untyped constant, it must be a number, and the return value of the function is an untyped floating-point constant.</strong></p> </blockquote> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat /tmp/cplx.go package cplx const ( a int = real(0i) b = imag(0) ) $ go tool compile /tmp/cplx.go /tmp/cplx.go:4: cannot use real(0i) (type float64) as type int in const initializer /tmp/cplx.go:5: invalid argument 0 (type int) for imag $ gccgo-4.8 -c /tmp/cplx.go $ gotype /tmp/cplx.go"><pre class="notranslate"><code class="notranslate">$ cat /tmp/cplx.go package cplx const ( a int = real(0i) b = imag(0) ) $ go tool compile /tmp/cplx.go /tmp/cplx.go:4: cannot use real(0i) (type float64) as type int in const initializer /tmp/cplx.go:5: invalid argument 0 (type int) for imag $ gccgo-4.8 -c /tmp/cplx.go $ gotype /tmp/cplx.go </code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package main const _ int = real(10i)"><pre class="notranslate"><code class="notranslate">package main const _ int = real(10i) </code></pre></div> <p dir="auto">=&gt;</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ go build x.go # command-line-arguments ./x.go:2: cannot use real(10i) (type float64) as type int in const initializer"><pre class="notranslate"><code class="notranslate">$ go build x.go # command-line-arguments ./x.go:2: cannot use real(10i) (type float64) as type int in const initializer </code></pre></div> <p dir="auto">(same for use of imag instead of real).</p> <p dir="auto">It appears that real and imag always produce a float32 or float64 constant respectively, for untyped constant arguments. The spec is not explicit about this, but this behavior violates the invariant</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="z == complex(real(z), imag(z))"><pre class="notranslate"><code class="notranslate">z == complex(real(z), imag(z)) </code></pre></div> <p dir="auto">for untyped constants z because real and imag won't work if the complex arguments have untyped constant components outside the float64 domain (see also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="92743079" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/11540" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/11540/hovercard" href="https://github.com/golang/go/issues/11540">#11540</a> ).</p> <p dir="auto">Both gc, and go/types accept this code. Both gc and go/types produce an untyped floating-point constant for untyped constant arguments.</p>
1
<h2 dir="auto">Bug report</h2> <p dir="auto">The PDF logo doesn't look quite right, viewed in Adobe Acrobat, Preview, and Google Chrome (on macOS). If you look closely at the center, there are some extra features there that don't show up in, for instance, the svg.</p> <p dir="auto"><a href="https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/mpl-data/images/matplotlib.pdf">https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/mpl-data/images/matplotlib.pdf</a></p> <p dir="auto">Maybe somebody should track down why the render of the PDF glitched? At least replace it with one that isn't glitchy?</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/458871/62189030-de384380-b322-11e9-9259-28bbf118c7f2.png"><img src="https://user-images.githubusercontent.com/458871/62189030-de384380-b322-11e9-9259-28bbf118c7f2.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">matplotlib.pyplot.spy does not work correctly for sparse matrices with a large number of entries (&gt;= 2**32). I would guess it has something to do with the value range of int32.</p> <p dir="auto">An example that reproduces the bug is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np import scipy.sparse import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt n = 16 s = 2**n A = scipy.sparse.coo_matrix(np.ones((s,s), dtype=np.int8)) plt.spy(A) file = '/tmp/spy_{}.png'.format(n) plt.savefig(file)"><pre class="notranslate"><code class="notranslate">import numpy as np import scipy.sparse import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt n = 16 s = 2**n A = scipy.sparse.coo_matrix(np.ones((s,s), dtype=np.int8)) plt.spy(A) file = '/tmp/spy_{}.png'.format(n) plt.savefig(file) </code></pre></div> <p dir="auto">For n = 16, spy shows only some entries.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2393560/15041512/d5aae93e-12bc-11e6-8914-4bb839c7f117.png"><img src="https://cloud.githubusercontent.com/assets/2393560/15041512/d5aae93e-12bc-11e6-8914-4bb839c7f117.png" alt="spy_16" style="max-width: 100%;"></a><br> For n = 15 it works correctly.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2393560/15041505/d0300750-12bc-11e6-8240-0afdd63cdd02.png"><img src="https://cloud.githubusercontent.com/assets/2393560/15041505/d0300750-12bc-11e6-8240-0afdd63cdd02.png" alt="spy_15" style="max-width: 100%;"></a></p> <p dir="auto">I have used Matplotlib 1.5.1 installed over pip with Python 3.5.1 on Linux.</p>
0
<p dir="auto">Using babel 6.1.2, the following js:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">is transpiled to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; Object.defineProperty(exports, &quot;__esModule&quot;, { value: true }); exports.default = {};"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s">"__esModule"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">value</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-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">using the following command line</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="babel --presets es2015 --plugins transform-es2015-modules-commonjs test.js"><pre class="notranslate">babel --presets es2015 --plugins transform-es2015-modules-commonjs test.js</pre></div> <p dir="auto">However the output with the 5.x was:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; Object.defineProperty(exports, &quot;__esModule&quot;, { value: true }); exports[&quot;default&quot;] = {}; module.exports = exports[&quot;default&quot;];"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s">"__esModule"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">value</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-s1">exports</span><span class="pl-kos">[</span><span class="pl-s">"default"</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-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s">"default"</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <p dir="auto">looks like <code class="notranslate">module.exports = exports["default"];</code> is missing although the <code class="notranslate">transform-es2015-modules-commonjs</code> is enabled.</p> <p dir="auto">Is it a bug or I'm missing something ?<br> Thank you !</p>
<p dir="auto">Let's say we have the following very simple code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const a = 3; export default a;"><pre class="notranslate"><code class="notranslate">const a = 3; export default a; </code></pre></div> <p dir="auto">Pre babel 6, it would compile into this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; Object.defineProperty(exports, &quot;__esModule&quot;, { value: true }); var a = 3; exports[&quot;default&quot;] = a; module.exports = exports[&quot;default&quot;];"><pre class="notranslate"><code class="notranslate">"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var a = 3; exports["default"] = a; module.exports = exports["default"]; </code></pre></div> <p dir="auto">Note the last line.</p> <p dir="auto">Now in Babel 6, the default export isn't assigned properly. This may be related to: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="114369173" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/2694" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/2694/hovercard" href="https://github.com/babel/babel/issues/2694">#2694</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; Object.defineProperty(exports, &quot;__esModule&quot;, { value: true }); var a = 3; exports.default = a;"><pre class="notranslate"><code class="notranslate">"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var a = 3; exports.default = a; </code></pre></div>
1
<p dir="auto">For example, I have a playbook named remotesetup.yml and I run it from the command line like that:</p> <p dir="auto">ansible-playbook remotesetupp.yml -K</p> <p dir="auto">It will ask for the sudo password even if the file doesn't exist (I made a typo, two p at the end).<br> In the same way, if there's a yaml syntax error in the playbook it will still ask me for the sudo pass even though it can't run the playbook.</p> <p dir="auto">Thus, the parsing of the playbook should be done prior to asking for sudo or ssh pass.</p>
<p dir="auto">Let met present you the following example :</p> <p dir="auto">sandboxy.yml playbook</p> <hr> <ul dir="auto"> <li>hosts: backup<br> sudo: True<br> sudo_user: david<br> gather_facts: False</li> <li>hosts: main<br> sudo: True<br> sudo_user: foofoo<br> gather_facts: False</li> </ul> <p dir="auto">When I run ansible-playbook sandbox.yml -K</p> <p dir="auto">It correctly asks me for the first sudo password but then when it reaches the second playbook with the host main it hangs because it tries to apply the first specified sudo password to foofoo@main.</p> <p dir="auto">Thanks.</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-4534?redirect=false" rel="nofollow">SPR-4534</a></strong> and commented</p> <p dir="auto">the AxisBeanMappingServicePostProcessor don't support the array type. because it use only the BeanSerializatorFactory and BeanDeserializatorFactory.<br> Or for using array with axis, the good serializator is ArraySerializatorFactory and for deserializator is ArrayDeserializator.</p> <p dir="auto">please, add an arrayMapping like beanMapping.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0 M1, 2.0 M2, 2.0 M3, 2.0 M4, 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>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086055" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9210" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9210/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9210">#9210</a> add Array support to AxisBeanMappingServicePostProcessor (<em><strong>"duplicates"</strong></em>)</li> </ul>
<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-4534?redirect=false" rel="nofollow">SPR-4534</a></strong> and commented</p> <p dir="auto">the AxisBeanMappingServicePostProcessor don't support the array type. because it use only the BeanSerializatorFactory and BeanDeserializatorFactory.<br> Or for using array with axis, the good serializator is ArraySerializatorFactory and for deserializator is ArrayDeserializator.</p> <p dir="auto">please, add an arrayMapping like beanMapping.</p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0 M1, 2.0 M2, 2.0 M3, 2.0 M4, 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>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398086055" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9210" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9210/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9210">#9210</a> add Array support to AxisBeanMappingServicePostProcessor (<em><strong>"duplicates"</strong></em>)</li> </ul>
1
<p dir="auto">java.lang.Throwable: Explicit termination method 'end' not called<br> at dalvik.system.CloseGuard.open(CloseGuard.java:223)<br> at java.util.zip.Inflater.(Inflater.java:106)<br> at com.android.okhttp.okio.GzipSource.(GzipSource.java:62)<br> at com.android.okhttp.internal.http.HttpEngine.unzip(HttpEngine.java:473)<br> at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:648)<br> at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:471)<br> at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)<br> at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:244)<br> at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:106)<br> at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:59)<br> at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:99)<br> at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:150)<br> at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:144)<br> at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:65)<br> at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:99)<br> at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)<br> at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)<br> at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272)<br> at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)<br> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)<br> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)<br> at java.lang.Thread.run(Thread.java:764)<br> at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)</p> <p dir="auto">A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.</p>
<p dir="auto"><strong>Glide Version</strong>:<br> 4.6.0</p> <p dir="auto"><strong>Integration libraries</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="implementation 'com.github.bumptech.glide:glide:4.6.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.6.0'"><pre class="notranslate"><code class="notranslate">implementation 'com.github.bumptech.glide:glide:4.6.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.6.0' </code></pre></div> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; E AndroidRuntime: at com.bumptech.glide.Glide.&lt;init&gt;(Glide.java:338) E AndroidRuntime: at com.bumptech.glide.GlideBuilder.build(GlideBuilder.java:472) E AndroidRuntime: at com.bumptech.glide.Glide.initializeGlide(Glide.java:264) E AndroidRuntime: at com.bumptech.glide.Glide.initializeGlide(Glide.java:219) E AndroidRuntime: at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:180) E AndroidRuntime: at com.bumptech.glide.Glide.get(Glide.java:164) E AndroidRuntime: at com.bumptech.glide.Glide.getRetriever(Glide.java:670) E AndroidRuntime: at com.bumptech.glide.Glide.with(Glide.java:709) Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find superclass or interface com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.Glide: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.StandardGifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.StandardGifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Note: com.bumptech.glide.Glide: can't find dynamically referenced class com.bumptech.glide.GeneratedAppGlideModuleImpl"><pre class="notranslate"><code class="notranslate">E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; E AndroidRuntime: at com.bumptech.glide.Glide.&lt;init&gt;(Glide.java:338) E AndroidRuntime: at com.bumptech.glide.GlideBuilder.build(GlideBuilder.java:472) E AndroidRuntime: at com.bumptech.glide.Glide.initializeGlide(Glide.java:264) E AndroidRuntime: at com.bumptech.glide.Glide.initializeGlide(Glide.java:219) E AndroidRuntime: at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:180) E AndroidRuntime: at com.bumptech.glide.Glide.get(Glide.java:164) E AndroidRuntime: at com.bumptech.glide.Glide.getRetriever(Glide.java:670) E AndroidRuntime: at com.bumptech.glide.Glide.with(Glide.java:709) Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find superclass or interface com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.Glide: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Value Warning: com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper: can't find referenced class com.bumptech.glide.disklrucache.DiskLruCache$Editor Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.StandardGifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.StandardGifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifDecoderFactory: can't find referenced class com.bumptech.glide.gifdecoder.GifHeader Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder$GifHeaderParserPool: can't find referenced class com.bumptech.glide.gifdecoder.GifHeaderParser Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider Warning: com.bumptech.glide.load.resource.gif.GifBitmapProvider: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifDrawable: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameLoader: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Warning: com.bumptech.glide.load.resource.gif.GifFrameResourceDecoder: can't find referenced class com.bumptech.glide.gifdecoder.GifDecoder Note: com.bumptech.glide.Glide: can't find dynamically referenced class com.bumptech.glide.GeneratedAppGlideModuleImpl </code></pre></div>
0
<p dir="auto">For small structs/enums (size &lt;= <code class="notranslate">uint</code>) we currently prefer to pass them as immediate values (good) but unlike clang we don't "cast" them to an appropriately sized integer type but pass them around as first class aggregates (not so good).</p> <p dir="auto">While LLVM supports the usage of FCAs, the optimizations largely depend on them being torn apart again, and that doesn't always work so great. The latest issue about that was <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52702410" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/20149" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/20149/hovercard" href="https://github.com/rust-lang/rust/issues/20149">#20149</a> for which I opted to patch LLVM to have it handle some basic store-to-load that involves FCA.</p> <p dir="auto">That led to the following email, in which Chandler Carruth suggests that we move away from using FCAs as much as possible: <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141229/250758.html" rel="nofollow">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141229/250758.html</a></p> <p dir="auto">AFAICT this would leave us with two choices:</p> <ul dir="auto"> <li>Make all type that end up as structs or arrays in LLVM IR non-immediate</li> </ul> <p dir="auto">or</p> <ul dir="auto"> <li>Do as clang does and convert small structs to an appropriately sized integer type when using them as SSA values</li> </ul> <p dir="auto">(Some) Related tickets are <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52702410" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/20149" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/20149/hovercard" href="https://github.com/rust-lang/rust/issues/20149">#20149</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="40305051" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/16506" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/16506/hovercard" href="https://github.com/rust-lang/rust/issues/16506">#16506</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32760457" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/13927" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/13927/hovercard" href="https://github.com/rust-lang/rust/issues/13927">#13927</a><br> Cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexcrichton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexcrichton">@alexcrichton</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thestinger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thestinger">@thestinger</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eddyb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eddyb">@eddyb</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/erickt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/erickt">@erickt</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Aatch/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Aatch">@Aatch</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/luqmana/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/luqmana">@luqmana</a></p>
<p dir="auto"><em>Version of Rust</em>: rustc 0.13.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/c89417130f042c58adc60012e7cddc4ef70b70b9/hovercard" href="https://github.com/rust-lang/rust/commit/c89417130f042c58adc60012e7cddc4ef70b70b9"><tt>c894171</tt></a> 2015-01-02 21:56:13 +0000)<br> <em>Operating system</em>: Linux 3.16.0-4-686-pae <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="227519" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/1" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/1/hovercard" href="https://github.com/rust-lang/rust/issues/1">#1</a> SMP Debian 3.16.7-ckt2-1 (2014-12-08) i686 GNU/Linux</p> <p dir="auto">When the associated <code class="notranslate">Target</code> type is not defined in an <code class="notranslate">impl Deref</code>, this leads to an internal compiler error.</p> <p dir="auto">Here is an example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![feature(associated_types)] use std::ops::Deref; struct Wrapper { inner: int } impl Deref for Wrapper { //type Target = int; fn deref(&amp;self) -&gt; &amp;int { &amp;self.inner } } fn main() { }"><pre class="notranslate"><code class="notranslate">#![feature(associated_types)] use std::ops::Deref; struct Wrapper { inner: int } impl Deref for Wrapper { //type Target = int; fn deref(&amp;self) -&gt; &amp;int { &amp;self.inner } } fn main() { } </code></pre></div> <p dir="auto">Error message from the compiler:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/main.rs:10:5: 12:6 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 10 }:Wrapper.Deref, substs=Substs[types=[[];[];[]], regions=[[];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=&lt;Wrapper as TraitRef(Wrapper, core::ops::Deref)&gt;::Target,depth=0)` src/main.rs:10 fn deref(&amp;self) -&gt; &amp;int { src/main.rs:11 &amp;self.inner src/main.rs:12 } 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"><pre class="notranslate"><code class="notranslate">src/main.rs:10:5: 12:6 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 10 }:Wrapper.Deref, substs=Substs[types=[[];[];[]], regions=[[];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=&lt;Wrapper as TraitRef(Wrapper, core::ops::Deref)&gt;::Target,depth=0)` src/main.rs:10 fn deref(&amp;self) -&gt; &amp;int { src/main.rs:11 &amp;self.inner src/main.rs:12 } 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 </code></pre></div> <p dir="auto">Backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0xb7383f20 - sys::backtrace::write::h6d0a4417f4e5c493sit 2: 0xb73a8770 - failure::on_fail::h17e5357971ef1fadTuz 3: 0xb7310d00 - rt::unwind::begin_unwind_inner::h81966bf04c2cd1f4y9y 4: 0xb389edb0 - rt::unwind::begin_unwind::h12436254939101185090 5: 0xb389ed20 - diagnostic::SpanHandler::span_bug::h64fa6f5fbd27e941zFF 6: 0xb6326a10 - middle::traits::project::project_type::h85510b9af23c51a6UQP 7: 0xb6323b00 - middle::traits::project::opt_normalize_projection_type::h16b6e65a2aa8a5c1XIP 8: 0xb6312320 - middle::traits::project::normalize_projection_type::h4e3c940bec71651byHP 9: 0xb6324ea0 - middle::traits::project::AssociatedTypeNormalizer&lt;'a, 'b, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h3cbce0725be04edf9FP 10: 0xb6324ea0 - middle::traits::project::AssociatedTypeNormalizer&lt;'a, 'b, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h3cbce0725be04edf9FP 11: 0xb6dc4600 - middle::ty_fold::ty..FnSig&lt;'tcx&gt;.TypeFoldable&lt;'tcx&gt;::fold_with::h10991263838617593069 12: 0xb6e58690 - check::assoc::normalize_associated_types_in::h9980513805539501870 13: 0xb6e4eae0 - check::compare_impl_method::h37df9bd14bbfe837q4j 14: 0xb6e3aed0 - check::check_item::hda7b1175944bf853SGj 15: 0xb6ff1830 - check_crate::unboxed_closure.39847 16: 0xb6fec070 - check_crate::h5a3950962091692dVlx 17: 0xb76bf8b0 - driver::phase_3_run_analysis_passes::hf1b11de46876f77cTva 18: 0xb76ad980 - driver::compile_input::h567277daca5fdd24wba 19: 0xb777fa80 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14467627679629470429 20: 0xb777e890 - rt::unwind::try::try_fn::h7264457252665277252 21: 0xb7418c90 - rust_try_inner 22: 0xb7418c60 - rust_try 23: 0xb777ebd0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h428659666485879903 24: 0xb73956c0 - sys::thread::thread_start::haeae5d792ecbddcdy8v 25: 0xb36c4e30 - start_thread 26: 0xb71eddf2 - clone 27: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">thread 'rustc' panicked at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0xb7383f20 - sys::backtrace::write::h6d0a4417f4e5c493sit 2: 0xb73a8770 - failure::on_fail::h17e5357971ef1fadTuz 3: 0xb7310d00 - rt::unwind::begin_unwind_inner::h81966bf04c2cd1f4y9y 4: 0xb389edb0 - rt::unwind::begin_unwind::h12436254939101185090 5: 0xb389ed20 - diagnostic::SpanHandler::span_bug::h64fa6f5fbd27e941zFF 6: 0xb6326a10 - middle::traits::project::project_type::h85510b9af23c51a6UQP 7: 0xb6323b00 - middle::traits::project::opt_normalize_projection_type::h16b6e65a2aa8a5c1XIP 8: 0xb6312320 - middle::traits::project::normalize_projection_type::h4e3c940bec71651byHP 9: 0xb6324ea0 - middle::traits::project::AssociatedTypeNormalizer&lt;'a, 'b, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h3cbce0725be04edf9FP 10: 0xb6324ea0 - middle::traits::project::AssociatedTypeNormalizer&lt;'a, 'b, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h3cbce0725be04edf9FP 11: 0xb6dc4600 - middle::ty_fold::ty..FnSig&lt;'tcx&gt;.TypeFoldable&lt;'tcx&gt;::fold_with::h10991263838617593069 12: 0xb6e58690 - check::assoc::normalize_associated_types_in::h9980513805539501870 13: 0xb6e4eae0 - check::compare_impl_method::h37df9bd14bbfe837q4j 14: 0xb6e3aed0 - check::check_item::hda7b1175944bf853SGj 15: 0xb6ff1830 - check_crate::unboxed_closure.39847 16: 0xb6fec070 - check_crate::h5a3950962091692dVlx 17: 0xb76bf8b0 - driver::phase_3_run_analysis_passes::hf1b11de46876f77cTva 18: 0xb76ad980 - driver::compile_input::h567277daca5fdd24wba 19: 0xb777fa80 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14467627679629470429 20: 0xb777e890 - rt::unwind::try::try_fn::h7264457252665277252 21: 0xb7418c90 - rust_try_inner 22: 0xb7418c60 - rust_try 23: 0xb777ebd0 - thunk::F.Invoke&lt;A, R&gt;::invoke::h428659666485879903 24: 0xb73956c0 - sys::thread::thread_start::haeae5d792ecbddcdy8v 25: 0xb36c4e30 - start_thread 26: 0xb71eddf2 - clone 27: 0x0 - &lt;unknown&gt; </code></pre></div>
0
<p dir="auto">I think this 1rem=10px is the defacto standard in the industry by now? You operate with a different scale, 1 rem = 16px?</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">1 rem = 10 px when scaling the page</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">1 rem =16px<br> This is the standard in browsers, but not defacto standard: <a href="https://www.sitepoint.com/understanding-and-using-rem-units-in-css/" rel="nofollow">https://www.sitepoint.com/understanding-and-using-rem-units-in-css/</a></p>
<h2 dir="auto">Summary</h2> <p dir="auto">I would love to see cursor: 'not-allowed' for disabled button. <a href="http://www.material-ui.com/#/components/raised-button" rel="nofollow">http://www.material-ui.com/#/components/raised-button</a> . It's not possible to make it work nicely with conditional inline react styles "style={cursor: 'disabled'}". I think it should be default behavior for disabled buttons</p> <ul dir="auto"> <li>[x ] I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">For element <br> I would expect to see cursor "not-allowed" to be set.<br> Passing style={cursor: 'not-allowed'} does give not-allowed cursor BUT only on text hover (not the button itself)</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">the normal cursor is displayed when hovering</p> <h2 dir="auto">Context</h2> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>0.18.0</td> </tr> <tr> <td>React</td> <td>15.5.4</td> </tr> <tr> <td>browser</td> <td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36</td> </tr> <tr> <td>etc</td> <td>redux-form-material-ui is included in "4.2.0" version</td> </tr> </tbody> </table>
0
<p dir="auto">When I am writing a declaration file, I found it really frustrating repeating the inherited method that returns the instance itself for a correct return type.</p> <p dir="auto">E.g. for animation library GSAP, many classes are inherited from class <code class="notranslate">Animation</code>, I have to repeat almost every method to update return type <code class="notranslate">Animation</code> to the current class.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Animation { chain(): Animation; } class TweenLite extends Animation { ownProperty: any; chain(): TweenLite; }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Animation</span> <span class="pl-kos">{</span> <span class="pl-c1">chain</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Animation</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">TweenLite</span> <span class="pl-k">extends</span> <span class="pl-smi">Animation</span> <span class="pl-kos">{</span> <span class="pl-c1">ownProperty</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c1">chain</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">TweenLite</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">It would be great if we may use some type like <code class="notranslate">self</code> to make this easier, like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Animation { chain(): self; } class TweenLite extends Animation { ownProperty: any; }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Animation</span> <span class="pl-kos">{</span> <span class="pl-c1">chain</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">TweenLite</span> <span class="pl-k">extends</span> <span class="pl-smi">Animation</span> <span class="pl-kos">{</span> <span class="pl-c1">ownProperty</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div>
<p dir="auto">The early discussions about generics had this feature outlined, but it never made it into the final version for some reason. Meanwhile, it would be extremely helpful in some cases. The use case that it most dear to my heart is Knockout:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface Observable&lt;T&gt; { &lt;U&gt;( this: U, value: T ): U; } var viewModel = { Str: ko.observable( &quot;abc&quot; ), Num: ko.observable( 5 ) }; viewModel.Str( &quot;xyz&quot; ).Num( 10 );"><pre class="notranslate"><code class="notranslate">interface Observable&lt;T&gt; { &lt;U&gt;( this: U, value: T ): U; } var viewModel = { Str: ko.observable( "abc" ), Num: ko.observable( 5 ) }; viewModel.Str( "xyz" ).Num( 10 ); </code></pre></div>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li> </ul> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>Dubbo version: 2.6.4</li> <li>Operating System version: Macos 10.14</li> <li>Java version: 1.8.0_181</li> <li>SpringBoot 2.0 webflux</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <p dir="auto">No</p> <p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p> <h3 dir="auto">Expected Result</h3> <h3 dir="auto">Actual Result</h3> <p dir="auto">If there is an exception, please attach the exception trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181] at com.alibaba.dubbo.config.AbstractConfig.toString(AbstractConfig.java:466) ~[dubbo-2.6.4.jar:2.6.4] at java.lang.String.valueOf(String.java:2994) [na:1.8.0_181] at java.lang.StringBuilder.append(StringBuilder.java:131) [na:1.8.0_181] at com.alibaba.dubbo.config.spring.beans.factory.annotation.AbstractAnnotationConfigBeanBuilder.build(AbstractAnnotationConfigBeanBuilder.java:79) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildReferenceBean(ReferenceAnnotationBeanPostProcessor.java:385) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.access$100(ReferenceAnnotationBeanPostProcessor.java:65) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:363) [dubbo-2.6.4.jar:2.6.4] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:92) [dubbo-2.6.4.jar:2.6.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1322) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1288) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1190) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1093) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:658) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBean(AbstractAutowireCapableBeanFactory.java:312) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.routerFunctions(RouterFunctionMapping.java:124) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.initRouterFunctions(RouterFunctionMapping.java:113) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.afterPropertiesSet(RouterFunctionMapping.java:100) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:514) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1206) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:327) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.DispatcherHandler.initStrategies(DispatcherHandler.java:126) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.DispatcherHandler.setApplicationContext(DispatcherHandler.java:121) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:120) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1691) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1095) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.server.adapter.WebHttpHandlerBuilder.applicationContext(WebHttpHandlerBuilder.java:151) ~[spring-web-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig.httpHandler(HttpHandlerAutoConfiguration.java:59) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d.CGLIB$httpHandler$0(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d$$FastClassBySpringCGLIB$$6c02d53e.invoke(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:365) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d.httpHandler(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.getHttpHandler(ReactiveWebServerApplicationContext.java:155) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.createWebServer(ReactiveWebServerApplicationContext.java:99) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.onRefresh(ReactiveWebServerApplicationContext.java:73) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:61) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:333) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at com.dubbo.demo.consumer.DemoApplication.main(DemoApplication.java:10) ~[classes/:na] Caused by: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.rpc.Protocol by name zookeeper at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:482) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:489) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:309) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66) ~[dubbo-2.6.4.jar:2.6.4] ... 125 common frames omitted"><pre class="notranslate"><code class="notranslate">java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181] at com.alibaba.dubbo.config.AbstractConfig.toString(AbstractConfig.java:466) ~[dubbo-2.6.4.jar:2.6.4] at java.lang.String.valueOf(String.java:2994) [na:1.8.0_181] at java.lang.StringBuilder.append(StringBuilder.java:131) [na:1.8.0_181] at com.alibaba.dubbo.config.spring.beans.factory.annotation.AbstractAnnotationConfigBeanBuilder.build(AbstractAnnotationConfigBeanBuilder.java:79) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildReferenceBean(ReferenceAnnotationBeanPostProcessor.java:385) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.access$100(ReferenceAnnotationBeanPostProcessor.java:65) [dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:363) [dubbo-2.6.4.jar:2.6.4] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:92) [dubbo-2.6.4.jar:2.6.4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1322) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1288) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1190) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1093) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:658) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBean(AbstractAutowireCapableBeanFactory.java:312) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.routerFunctions(RouterFunctionMapping.java:124) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.initRouterFunctions(RouterFunctionMapping.java:113) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.function.server.support.RouterFunctionMapping.afterPropertiesSet(RouterFunctionMapping.java:100) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:514) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1206) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:327) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.DispatcherHandler.initStrategies(DispatcherHandler.java:126) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.reactive.DispatcherHandler.setApplicationContext(DispatcherHandler.java:121) ~[spring-webflux-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:120) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1691) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1095) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.web.server.adapter.WebHttpHandlerBuilder.applicationContext(WebHttpHandlerBuilder.java:151) ~[spring-web-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig.httpHandler(HttpHandlerAutoConfiguration.java:59) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d.CGLIB$httpHandler$0(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d$$FastClassBySpringCGLIB$$6c02d53e.invoke(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:365) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration$AnnotationConfig$$EnhancerBySpringCGLIB$$92de558d.httpHandler(&lt;generated&gt;) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) [spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.getHttpHandler(ReactiveWebServerApplicationContext.java:155) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.createWebServer(ReactiveWebServerApplicationContext.java:99) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.onRefresh(ReactiveWebServerApplicationContext.java:73) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:61) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:333) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE] at com.dubbo.demo.consumer.DemoApplication.main(DemoApplication.java:10) ~[classes/:na] Caused by: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.rpc.Protocol by name zookeeper at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:482) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:489) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:309) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:394) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:333) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:163) ~[dubbo-2.6.4.jar:2.6.4] at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66) ~[dubbo-2.6.4.jar:2.6.4] ... 125 common frames omitted </code></pre></div> <p dir="auto">我在SpringBoot 2.0中使用了webflux和dubbo结合,但是在编写demo的过程中,对于dubbo的服务提供者运行正常,但是在消费者就报了上述错误,</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.8</li> <li>Operating System version: ANY</li> <li>Java version: 8</li> </ul> <h3 dir="auto">Steps to reproduce this issue</h3> <ol dir="auto"> <li>Use a port other than the default protocol port, 12345 e.g.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dubbo.protocol.name=dubbo dubbo.protocol.port=12345"><pre class="notranslate"><code class="notranslate">dubbo.protocol.name=dubbo dubbo.protocol.port=12345 </code></pre></div> <ol start="2" dir="auto"> <li>Use a registry with "registry-type=service"</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dubbo.registry.address=zookeeper://127.0.0.1:2181?registry-type=service"><pre class="notranslate"><code class="notranslate">dubbo.registry.address=zookeeper://127.0.0.1:2181?registry-type=service </code></pre></div> <ol start="3" dir="auto"> <li>The log shows that a new Netty-Server run at 20880.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[31/07/20 10:36:54:895 CST] main INFO transport.AbstractServer: [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.101.199:20880, dubbo version: 2.7.8, current host: 192.168.101.199"><pre class="notranslate"><code class="notranslate">[31/07/20 10:36:54:895 CST] main INFO transport.AbstractServer: [DUBBO] Start NettyServer bind /0.0.0.0:20880, export /192.168.101.199:20880, dubbo version: 2.7.8, current host: 192.168.101.199 </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% lsof -i:20880 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 4409 zhangyz 123u IPv6 0x3cf58a0ff893f115 0t0 TCP *:20880 (LISTEN)"><pre class="notranslate"><code class="notranslate">% lsof -i:20880 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 4409 zhangyz 123u IPv6 0x3cf58a0ff893f115 0t0 TCP *:20880 (LISTEN) </code></pre></div> <ol start="4" dir="auto"> <li>The log shows that MetadataService uses the port 20880.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[31/07/20 10:36:54:896 CST] main INFO client.ServiceDiscoveryRegistry: [DUBBO] Register: dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0, dubbo version: 2.7.8, current host: 192.168.101.199 [31/07/20 10:36:54:896 CST] main INFO client.ServiceDiscoveryRegistry: [DUBBO] The URL[dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0] registered successfully., dubbo version: 2.7.8, current host: 192.168.101.199 [31/07/20 10:36:54:896 CST] main INFO metadata.ConfigurableMetadataServiceExporter: [DUBBO] The MetadataService exports urls : [dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;bind.ip=192.168.101.199&amp;bind.port=20880&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;qos.port=22222&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0], dubbo version: 2.7.8, current host: 192.168.101.199"><pre class="notranslate"><code class="notranslate">[31/07/20 10:36:54:896 CST] main INFO client.ServiceDiscoveryRegistry: [DUBBO] Register: dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0, dubbo version: 2.7.8, current host: 192.168.101.199 [31/07/20 10:36:54:896 CST] main INFO client.ServiceDiscoveryRegistry: [DUBBO] The URL[dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0] registered successfully., dubbo version: 2.7.8, current host: 192.168.101.199 [31/07/20 10:36:54:896 CST] main INFO metadata.ConfigurableMetadataServiceExporter: [DUBBO] The MetadataService exports urls : [dubbo://192.168.101.199:20880/org.apache.dubbo.metadata.MetadataService?anyhost=true&amp;application=dubbo-demo-annotation-provider&amp;bind.ip=192.168.101.199&amp;bind.port=20880&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=dubbo-demo-annotation-provider&amp;interface=org.apache.dubbo.metadata.MetadataService&amp;metadata-type=remote&amp;methods=getExportedURLs,toURLs,serviceName,isMetadataServiceURL,getSubscribedURLs,version,toSortedStrings,getServiceDefinition&amp;pid=4371&amp;qos.port=22222&amp;release=2.7.8&amp;revision=2.7.8&amp;side=provider&amp;timestamp=1596163014857&amp;version=1.0.0], dubbo version: 2.7.8, current host: 192.168.101.199 </code></pre></div> <ol start="5" dir="auto"> <li>The registry data shows that the MetadataService parameters of port is 20880.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{&quot;name&quot;:&quot;dubbo-demo-annotation-provider&quot;,&quot;id&quot;:&quot;192.168.101.199:12345&quot;,&quot;address&quot;:&quot;192.168.101.199&quot;,&quot;port&quot;:12345,&quot;sslPort&quot;:null,&quot;payload&quot;:{&quot;@class&quot;:&quot;org.apache.dubbo.registry.zookeeper.ZookeeperInstance&quot;,&quot;id&quot;:null,&quot;name&quot;:&quot;dubbo-demo-annotation-provider&quot;,&quot;metadata&quot;:{&quot;dubbo.metadata-service.url-params&quot;:&quot;{\&quot;dubbo\&quot;:{\&quot;version\&quot;:\&quot;1.0.0\&quot;,\&quot;dubbo\&quot;:\&quot;2.0.2\&quot;,\&quot;release\&quot;:\&quot;2.7.8\&quot;,\&quot;port\&quot;:\&quot;20880\&quot;}}&quot;,&quot;dubbo.subscribed-services.revision&quot;:&quot;X&quot;,&quot;dubbo.endpoints&quot;:&quot;[{\&quot;port\&quot;:12345,\&quot;protocol\&quot;:\&quot;dubbo\&quot;}]&quot;,&quot;dubbo.metadata.storage-type&quot;:&quot;local&quot;,&quot;dubbo.exported-services.revision&quot;:&quot;60ccdf84e262aec4&quot;}},&quot;registrationTimeUTC&quot;:1596163015015,&quot;serviceType&quot;:&quot;DYNAMIC&quot;,&quot;uriSpec&quot;:null}"><pre class="notranslate"><code class="notranslate">{"name":"dubbo-demo-annotation-provider","id":"192.168.101.199:12345","address":"192.168.101.199","port":12345,"sslPort":null,"payload":{"@class":"org.apache.dubbo.registry.zookeeper.ZookeeperInstance","id":null,"name":"dubbo-demo-annotation-provider","metadata":{"dubbo.metadata-service.url-params":"{\"dubbo\":{\"version\":\"1.0.0\",\"dubbo\":\"2.0.2\",\"release\":\"2.7.8\",\"port\":\"20880\"}}","dubbo.subscribed-services.revision":"X","dubbo.endpoints":"[{\"port\":12345,\"protocol\":\"dubbo\"}]","dubbo.metadata.storage-type":"local","dubbo.exported-services.revision":"60ccdf84e262aec4"}},"registrationTimeUTC":1596163015015,"serviceType":"DYNAMIC","uriSpec":null} </code></pre></div>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">Request a feature, even though it migth be there already but I just don't know how to set it up.</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Basically I have <code class="notranslate">webpack.config.js</code> stored in different directory, not the child or parent, but sibling directory.<br> I'm using the <code class="notranslate">--config</code> switch to point to it and webpack finds it and reads from it.<br> However it gives an error when this line is read for example:</p> <p dir="auto"><code class="notranslate">const CircularDependencyPlugin = require('circular-dependency-plugin');</code></p> <p dir="auto">Error says that it cannot find CircularDependencyPlugin.<br> It seems that webpack is looking for the <code class="notranslate">node_modules</code> in the directory where <code class="notranslate">webpack.config.js</code> is found and not in current working directory.<br> So when I work in app root directory and from it invoke webpack which points to <code class="notranslate">webpack.config.js</code> in sibling directory seems that this other directory is used by webpack to look for the <code class="notranslate">node_modules</code>.<br> Having duplicate <code class="notranslate">node_modules</code> in sibling directory is not an option.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">I would like for webpack to use current working directory for <code class="notranslate">node_modules</code> lookup and do everything there even though I point to another <code class="notranslate">webpack.config.js</code> file in sibling directory with <code class="notranslate">--config</code> switch.<br> Is there any way to set it up to behave just like in cases when <code class="notranslate">webpack.config.js</code> is stored in current working directory?</p> <p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p> <p dir="auto">I have multiple different applications and they all have same file structure. I also have two versions of <code class="notranslate">webpack.config.js</code>, one for development bundling and one for production.<br> I will be using <code class="notranslate">npm</code> to abstract webpack bundle commands. In <code class="notranslate">package.json</code> I want to have two commands for bundling, in each I plan to use <code class="notranslate">--config</code> switch to point to the prod or dev <code class="notranslate">webpack.config.js</code>.<br> Right now I have to delete and replace <code class="notranslate">webpack.config.js</code> in current working directory every time I want to switch from development build to production build and vice versa. And I have to do that for every separate application.<br> What I want to do is <code class="notranslate">cd</code> to root directory of the app I'm working on, each app would have <code class="notranslate">package.json</code> with webpack bundle commands. Those would point to dev and prod <code class="notranslate">webpack.config.js</code> files in sibling directory, not the parent but side by side directory with other apps directories.<br> This way I could pack for dev or prod without copying config files.<br> Due to nature of this project, yes <code class="notranslate">webpack.config.js</code> files (dev and prod versions) can be universal for each app.</p> <p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.</strong></p> <p dir="auto">Node.js 6.11.12, webpack 3.4.1, OS win 10 amd64</p>
<p dir="auto"><strong>I'm submitting a bug report</strong></p> <p dir="auto"><strong>Webpack version:</strong> 2.1.x</p> <p dir="auto"><strong>Please tell us about your environment:</strong><br> Windows 10</p> <p dir="auto"><strong>Current behavior:</strong><br> cannot specify options</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="output.devtoolModuleFilenameTemplate: &quot;[resource-path]&quot;, output.devtoolFallbackModuleFilenameTemplate: &quot;[resource-path]?[hash]&quot; module.noParse: [/\.noparse\./]"><pre class="notranslate"><code class="notranslate">output.devtoolModuleFilenameTemplate: "[resource-path]", output.devtoolFallbackModuleFilenameTemplate: "[resource-path]?[hash]" module.noParse: [/\.noparse\./] </code></pre></div> <p dir="auto"><strong>Expected/desired behavior:</strong><br> Does not pass schema validation.</p> <p dir="auto">but</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.noParse: /\.noparse\./"><pre class="notranslate"><code class="notranslate">module.noParse: /\.noparse\./ </code></pre></div> <p dir="auto">passed</p> <ul dir="auto"> <li><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.</strong></li> <li><strong>What is the expected behavior?</strong><br> Pass validation</li> <li><strong>Browser:</strong> all</li> <li><strong>Language:</strong> all</li> </ul>
0
<p dir="auto">I'm running on a CentOS ( release 7.4.1708 ) Linux environment that is on a Linux-based HPC. Python version 2.7.</p> <p dir="auto">I'm running a script to visualize TF-IDF values using the Isomap algorithm ( incorporating sci-kit learns) and then using a 3D scatterplot to visualize possible relationships between tfidf values of a corpus. This has already been preprocessed. This is my code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def Isomap(tfidf): jon = pd.read_csv(tfidf) le = preprocessing.LabelEncoder() tims = jon.apply(le.fit_transform) iso = manifold.Isomap(n_neighbors=2, n_components=3) john = iso.fit_transform(tims) fig = plt.figure(1) colors = ['red', 'yellow', 'green'] ax = fig.add_subplot(111, projection='3d') ax.scatter(john[:,0], john[:,1],john[:,2],color=colors,alpha=.5) # x,y,z coord. jon 1-3 plt.title('Isomap of candiates') plt.xlabel('x') plt.ylabel('y') plt.show() plt.savefig('isomap.png') "><pre class="notranslate"><code class="notranslate">def Isomap(tfidf): jon = pd.read_csv(tfidf) le = preprocessing.LabelEncoder() tims = jon.apply(le.fit_transform) iso = manifold.Isomap(n_neighbors=2, n_components=3) john = iso.fit_transform(tims) fig = plt.figure(1) colors = ['red', 'yellow', 'green'] ax = fig.add_subplot(111, projection='3d') ax.scatter(john[:,0], john[:,1],john[:,2],color=colors,alpha=.5) # x,y,z coord. jon 1-3 plt.title('Isomap of candiates') plt.xlabel('x') plt.ylabel('y') plt.show() plt.savefig('isomap.png') </code></pre></div> <p dir="auto">However, the error code reads as so:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;MasterScript.py&quot;, line 157, in &lt;module&gt; Isomap('tfidf.txt') File &quot;MasterScript.py&quot;, line 134, in Isomap fig = plt.figure(1) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/pyplot.py&quot;, line 535, in figure **kwargs) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py&quot;, line 44, in new_figure_manager return new_figure_manager_given_figure(num, thisFig) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py&quot;, line 51, in new_figure_manager_given_figure canvas = FigureCanvasQTAgg(figure) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py&quot;, line 242, in __init__ super(FigureCanvasQTAgg, self).__init__(figure=figure) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py&quot;, line 66, in __init__ super(FigureCanvasQTAggBase, self).__init__(figure=figure) File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py&quot;, line 236, in __init__ _create_qApp() File &quot;/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py&quot;, line 144, in _create_qApp raise RuntimeError('Invalid DISPLAY variable') RuntimeError: Invalid DISPLAY variable"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "MasterScript.py", line 157, in &lt;module&gt; Isomap('tfidf.txt') File "MasterScript.py", line 134, in Isomap fig = plt.figure(1) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/pyplot.py", line 535, in figure **kwargs) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 44, in new_figure_manager return new_figure_manager_given_figure(num, thisFig) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 51, in new_figure_manager_given_figure canvas = FigureCanvasQTAgg(figure) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 242, in __init__ super(FigureCanvasQTAgg, self).__init__(figure=figure) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 66, in __init__ super(FigureCanvasQTAggBase, self).__init__(figure=figure) File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 236, in __init__ _create_qApp() File "/util/common/python/anaconda-5.0.0/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 144, in _create_qApp raise RuntimeError('Invalid DISPLAY variable') RuntimeError: Invalid DISPLAY variable </code></pre></div> <p dir="auto">I'm not exactly sure if it is a fault of matplotlib or my own handling of the library. Any help would be appreciated.</p>
<p dir="auto">In my AWS Ubuntu 14.02 instance I installed the matplotlib dependencies and then via pip I installed matplotlib:</p> <p dir="auto">sudo apt-get build-dep python-matplotlib</p> <p dir="auto">sudo pip install matplotlib</p> <p dir="auto">sudo pip freeze:<br> matplotlib==1.4.0</p> <p dir="auto">in a brand new file plotting1.py I wrote:</p> <h1 dir="auto">!/usr/bin/python</h1> <p dir="auto">from pylab import *<br> plot([1,2,3])<br> show()</p> <p dir="auto">after typying chmod +x plotting1.py, I executed the little script:</p> <p dir="auto">time python plotting1.py<br> Traceback (most recent call last):<br> File "plotting1.py", line 4, in<br> plot([1,2,3])<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 3086, in plot<br> ax = gca()<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 827, in gca<br> ax = gcf().gca(*_kwargs)<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 461, in gcf<br> return figure()<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 434, in figure<br> *_kwargs)<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4ag g.py", line 47, in new_figure_manager<br> return new_figure_manager_given_figure(num, thisFig)<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4ag g.py", line 54, in new_figure_manager_given_figure<br> canvas = FigureCanvasQTAgg(figure)<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4ag g.py", line 72, in init<br> FigureCanvasQT.init(self, figure)<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4.p y", line 68, in init<br> _create_qApp()<br> File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.p y", line 139, in _create_qApp<br> raise RuntimeError('Invalid DISPLAY variable')<br> RuntimeError: Invalid DISPLAY variable</p> <p dir="auto">real 0m0.404s<br> user 0m0.284s</p> <p dir="auto">What do I have to do now?</p> <p dir="auto">Looking forward to your kind help.<br> Kind regards.<br> Marco</p>
1
<p dir="auto">Works with a basic example:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="await Deno.serve({ port: 8000 }, () =&gt; new Response());"><pre class="notranslate"><span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">port</span>: <span class="pl-c1">8000</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">=&gt;</span> <span class="pl-k">new</span> <span class="pl-smi">Response</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">It occurs when making a <code class="notranslate">POST</code> request when behind a <code class="notranslate">next-http-proxy-middleware</code> as follows:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import type { NextApiRequest, NextApiResponse } from &quot;next&quot;; import httpProxyMiddleware from &quot;next-http-proxy-middleware&quot;; const { API_URL } = process.env; const handler = (req: NextApiRequest, res: NextApiResponse) =&gt; httpProxyMiddleware(req, res, { target: API_URL, pathRewrite: [{ patternStr: &quot;^/api/&quot;, replaceStr: &quot;/&quot; }], }); export default handler; export const config = { api: { externalResolver: true }, };"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-k">type</span> <span class="pl-kos">{</span> <span class="pl-smi">NextApiRequest</span><span class="pl-kos">,</span> <span class="pl-smi">NextApiResponse</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"next"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">httpProxyMiddleware</span> <span class="pl-k">from</span> <span class="pl-s">"next-http-proxy-middleware"</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-c1">API_URL</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-en">handler</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">req</span>: <span class="pl-smi">NextApiRequest</span><span class="pl-kos">,</span> <span class="pl-s1">res</span>: <span class="pl-smi">NextApiResponse</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">httpProxyMiddleware</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">target</span>: <span class="pl-smi">API_URL</span><span class="pl-kos">,</span> <span class="pl-c1">pathRewrite</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">patternStr</span>: <span class="pl-s">"^/api/"</span><span class="pl-kos">,</span> <span class="pl-c1">replaceStr</span>: <span class="pl-s">"/"</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">handler</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">api</span>: <span class="pl-kos">{</span> <span class="pl-c1">externalResolver</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></pre></div> <p dir="auto">This is enough to reproduce the crash:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -X POST http://localhost:3000/api/v1/abc"><pre class="notranslate"><code class="notranslate">curl -X POST http://localhost:3000/api/v1/abc </code></pre></div> <p dir="auto">Here is the backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="=========================================================== Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: macos aarch64 Version: 1.25.0 Args: [&quot;deno&quot;, &quot;run&quot;, &quot;-A&quot;, &quot;--unstable&quot;, &quot;test.ts&quot;] thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:846:41 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 4: &lt;extern &quot;C&quot; fn(A0) .&gt; R as v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace."><pre class="notranslate"><code class="notranslate">=========================================================== Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: macos aarch64 Version: 1.25.0 Args: ["deno", "run", "-A", "--unstable", "test.ts"] thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:846:41 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll 4: &lt;extern "C" fn(A0) .&gt; R as v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. </code></pre></div>
<p dir="auto">Deno Flash server crashes when it serves simple requests. Here is the full content of my <code class="notranslate">src/main.ts</code> file:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.serve({ handler(request) { console.log(request); return new Response(&quot;Hello world&quot;); }, hostname: &quot;0.0.0.0&quot;, port: 8889, });"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-en">handler</span><span class="pl-kos">(</span><span class="pl-s1">request</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">request</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Response</span><span class="pl-kos">(</span><span class="pl-s">"Hello world"</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">hostname</span>: <span class="pl-s">"0.0.0.0"</span><span class="pl-kos">,</span> <span class="pl-c1">port</span>: <span class="pl-c1">8889</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This is the request I send to my server from a browser:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fetch(new URL(&quot;/authenticate&quot;, serverUrl), { method: &quot;POST&quot;, body: JSON.stringify({ accountName, password }), headers: { &quot;content-type&quot;: &quot;application/json&quot; }, mode: &quot;no-cors&quot;, });"><pre class="notranslate"><span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-smi">URL</span><span class="pl-kos">(</span><span class="pl-s">"/authenticate"</span><span class="pl-kos">,</span> <span class="pl-s1">serverUrl</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">method</span>: <span class="pl-s">"POST"</span><span class="pl-kos">,</span> <span class="pl-c1">body</span>: <span class="pl-smi">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-kos">{</span> accountName<span class="pl-kos">,</span> password <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">headers</span>: <span class="pl-kos">{</span> <span class="pl-s">"content-type"</span>: <span class="pl-s">"application/json"</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">mode</span>: <span class="pl-s">"no-cors"</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">And this is the server console output. Interestingly, the browser receives the response before the server crashes.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/projects/server % RUST_BACKTRACE=full deno task start Warning deno task is unstable and may drastically change in the future Task start deno run --unstable --allow-net=0.0.0.0:8889 src/main.ts Listening on http://localhost:8889/ Request { bodyUsed: false, headers: Headers { accept: &quot;*/*&quot;, &quot;accept-encoding&quot;: &quot;gzip, deflate, br&quot;, &quot;accept-language&quot;: &quot;de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6&quot;, &quot;cache-control&quot;: &quot;no-cache&quot;, connection: &quot;keep-alive&quot;, &quot;content-length&quot;: &quot;34&quot;, &quot;content-type&quot;: &quot;text/plain;charset=UTF-8&quot;, host: &quot;localhost:8889&quot;, origin: &quot;http://localhost:8888&quot;, pragma: &quot;no-cache&quot;, referer: &quot;http://localhost:8888/&quot;, &quot;sec-ch-ua&quot;: '&quot;Google Chrome&quot;;v=&quot;105&quot;, &quot;Not)A;Brand&quot;;v=&quot;8&quot;, &quot;Chromium&quot;;v=&quot;105&quot;', &quot;sec-ch-ua-mobile&quot;: &quot;?0&quot;, &quot;sec-ch-ua-platform&quot;: '&quot;macOS&quot;', &quot;sec-fetch-dest&quot;: &quot;empty&quot;, &quot;sec-fetch-mode&quot;: &quot;no-cors&quot;, &quot;sec-fetch-site&quot;: &quot;same-site&quot;, &quot;user-agent&quot;: &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0....&quot; }, method: &quot;POST&quot;, redirect: &quot;follow&quot;, url: &quot;http://0.0.0.0:8889/authenticate&quot; } ============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: macos aarch64 Version: 1.25.1 Args: [&quot;/opt/homebrew/bin/deno&quot;, &quot;run&quot;, &quot;--unstable&quot;, &quot;--allow-net=0.0.0.0:8889&quot;, &quot;src/main.ts&quot;] thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:715:41 stack backtrace: 0: 0x1032c5680 - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h9e1f971b6c458057 1: 0x102af7da4 - core::fmt::write::hff50bf5ab34a8e88 2: 0x1032ad300 - std::io::Write::write_fmt::h4b4cac536910ac0e 3: 0x1032afb5c - std::panicking::default_hook::{{closure}}::h6afa39fd0b64edb8 4: 0x1032af848 - std::panicking::default_hook::h0ab5dc1706bc4227 5: 0x102aa8348 - deno::setup_panic_hook::{{closure}}::hef2108c53128687b 6: 0x1032b046c - std::panicking::rust_panic_with_hook::h4f2beaf7e17e9f84 7: 0x1032c59bc - std::panicking::begin_panic_handler::{{closure}}::h7bfd5963e591c8e8 8: 0x1032c5954 - std::sys_common::backtrace::__rust_end_short_backtrace::ha8dd13728d5f8e85 9: 0x1032affb0 - _rust_begin_unwind 10: 0x102afa634 - core::panicking::panic_fmt::hd0caa445cceef50a 11: 0x102afa724 - core::panicking::panic::had6482207444edec 12: 0x102cab8c8 - &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll::h34fffaa9562104af 13: 0x102cab158 - &lt;extern &quot;C&quot; fn(A0) .&gt; R as v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn::h97220c381c8504c5"><pre class="notranslate"><code class="notranslate">~/projects/server % RUST_BACKTRACE=full deno task start Warning deno task is unstable and may drastically change in the future Task start deno run --unstable --allow-net=0.0.0.0:8889 src/main.ts Listening on http://localhost:8889/ Request { bodyUsed: false, headers: Headers { accept: "*/*", "accept-encoding": "gzip, deflate, br", "accept-language": "de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6", "cache-control": "no-cache", connection: "keep-alive", "content-length": "34", "content-type": "text/plain;charset=UTF-8", host: "localhost:8889", origin: "http://localhost:8888", pragma: "no-cache", referer: "http://localhost:8888/", "sec-ch-ua": '"Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"macOS"', "sec-fetch-dest": "empty", "sec-fetch-mode": "no-cors", "sec-fetch-site": "same-site", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0...." }, method: "POST", redirect: "follow", url: "http://0.0.0.0:8889/authenticate" } ============================================================ Deno has panicked. This is a bug in Deno. Please report this at https://github.com/denoland/deno/issues/new. If you can reliably reproduce this panic, include the reproduction steps and re-run with the RUST_BACKTRACE=1 env var set and include the backtrace in your report. Platform: macos aarch64 Version: 1.25.1 Args: ["/opt/homebrew/bin/deno", "run", "--unstable", "--allow-net=0.0.0.0:8889", "src/main.ts"] thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:715:41 stack backtrace: 0: 0x1032c5680 - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h9e1f971b6c458057 1: 0x102af7da4 - core::fmt::write::hff50bf5ab34a8e88 2: 0x1032ad300 - std::io::Write::write_fmt::h4b4cac536910ac0e 3: 0x1032afb5c - std::panicking::default_hook::{{closure}}::h6afa39fd0b64edb8 4: 0x1032af848 - std::panicking::default_hook::h0ab5dc1706bc4227 5: 0x102aa8348 - deno::setup_panic_hook::{{closure}}::hef2108c53128687b 6: 0x1032b046c - std::panicking::rust_panic_with_hook::h4f2beaf7e17e9f84 7: 0x1032c59bc - std::panicking::begin_panic_handler::{{closure}}::h7bfd5963e591c8e8 8: 0x1032c5954 - std::sys_common::backtrace::__rust_end_short_backtrace::ha8dd13728d5f8e85 9: 0x1032affb0 - _rust_begin_unwind 10: 0x102afa634 - core::panicking::panic_fmt::hd0caa445cceef50a 11: 0x102afa724 - core::panicking::panic::had6482207444edec 12: 0x102cab8c8 - &lt;core::future::from_generator::GenFuture&lt;T&gt; as core::future::future::Future&gt;::poll::h34fffaa9562104af 13: 0x102cab158 - &lt;extern "C" fn(A0) .&gt; R as v8::support::CFnFrom&lt;F&gt;&gt;::mapping::c_fn::h97220c381c8504c5 </code></pre></div>
1
<p dir="auto">Ported from internal gates failures:</p> <p dir="auto">The following five tests are failing on Core editions:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet2 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet1 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet1"><pre class="notranslate"><code class="notranslate">DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet2 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet1 DimensionsTests::TestSetConsoleScreenBufferSize#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet0 DimensionsTests::TestSetConsoleWindowInfo#metadataSet1 </code></pre></div> <p dir="auto">I've investigated the issue and root caused it to PR 3129098 (prior to GitHub).</p> <p dir="auto">The problem is that on Core editions, the proposed font preferences and committed font choice stored in <code class="notranslate">SCREEN_INFORMATION</code> do not get synchronized with the actual font usage inside the rendering engine.</p> <p dir="auto">The reason this was working previously is because <code class="notranslate">SCREEN_INFORMATION::GetScreenFontSize()</code> was querying the render engine directly for the current font size.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zadjii-msft/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zadjii-msft">@zadjii-msft</a> realized that this seemed a bit silly given that <code class="notranslate">SCREEN_INFORMATION</code> already had a <code class="notranslate">_currentFont</code> which is supposed to hold the font selected for that screen post synchronization with the renderer. He therefore removed the supposedly duplicate lookup and I signed off on it thinking that it was a sensible thing to do. Turns out, it's only true on Desktop editions.</p> <p dir="auto">The solutions here would be:</p> <ol dir="auto"> <li>Return <code class="notranslate">GetScreenFontSize()</code> to look up the font sizing information from the renderer directly</li> <li>Figure out why the synchronization isn't happening between <code class="notranslate">SCREEN_INFORMATION</code> and the active rendering engine for Core editions and make it happen again <ul dir="auto"> <li>And maybe also make it harder for this to be a problem in the future by adjusting the set-up phase to fail with an error if synchronization doesn't happen prior to the first paint calls.</li> </ul> </li> </ol> <p dir="auto">I prefer option 2, of course. The de-duplication was righteous; it just had a pitfall.</p>
<p dir="auto">Two things I suggest to create in the feature of Windows Terminal V0.4:<br> <strong>1.</strong> Ctrl + Backspace: you know when you write the cmd's you can delete the cmd's (Word by Word), but your terminal can't do that, your terminal delete (Char by Char).<br> <strong>2.</strong> Ctrl + Space (Windows Powershell): if you write cmd's in the original windows powershell host, you also can show all snippets by hitting the ctrl + space. ex: get-pr[ctrl + space]<br> <a href="https://pbs.twimg.com/media/EBDf-dsWkAAq7Lm?format=png&amp;name=large" rel="nofollow">https://pbs.twimg.com/media/EBDf-dsWkAAq7Lm?format=png&amp;name=large</a></p>
0
<p dir="auto">When using the Symfony Form Type "time", e.g.</p> <p dir="auto"><code class="notranslate">$builder-&gt;-&gt;add('fromTime', 'time', [ 'widget' =&gt; 'choice', 'attr' =&gt; ['class' =&gt; 'form-control'], 'model_timezone' =&gt; "UTC", 'view_timezone' =&gt; "Europe/Berlin" ])</code></p> <p dir="auto">The "reverseTransform" in "DateTimeToArrayTransformer" converts the form input back to the model_timezone. Since there is only an "hour" and "minutes" input, the method uses the year 1970 as a helper to create the date object.</p> <p dir="auto"><code class="notranslate">$dateTime = new \DateTime(sprintf( '%s-%s-%s %s:%s:%s %s', empty($value['year']) ? '1970' : $value['year'], empty($value['month']) ? '1' : $value['month'], empty($value['day']) ? '1' : $value['day'], empty($value['hour']) ? '0' : $value['hour'], empty($value['minute']) ? '0' : $value['minute'], empty($value['second']) ? '0' : $value['second'], $this-&gt;outputTimezone ))</code></p> <p dir="auto">And afterwards is converted to the inputTimezone (model_timezone). Unfortunately, it produces unexpected results:<br> E.g. "1970-01-01 12:45:00" is converting to "1970-01-01 11:45:00", which is wrong (and somehow right at the same time). And here is the reason - in 1970, there was no daylight saving time in this timezone, so there is only a +1 difference between "UTC" and "Europe/Berlin". Now, there should be a +2 hours difference.</p> <p dir="auto">This generally applies to dates out of the daylight saving times.</p> <p dir="auto">Proposed fix: Instead of 1970-01-01, the current year / month / day should be used in the transformer, if no input date was specified. But I must confess, that both versions lead to unexpected behavior which is not ideal.</p>
<p dir="auto">As discussed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11396161" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/7187" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/7187/hovercard" href="https://github.com/symfony/symfony/issues/7187">#7187</a>, these options don't make sense for these types.</p>
1
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">Bar chart with Axes3d does not correctly set the log z scale. There is a note in the doc: <a href="https://matplotlib.org/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.axes3d.Axes3D.set_zscale" rel="nofollow">here</a> saying this was added in 1.1.0. (And also asks to report bugs :-) )</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="from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import %matplotlib inline import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # dumb dump of data dx, dy = 0.5, 0.5 xpos = [0.25, 0.25, 0.25, 0.25, 1.25, 1.25, 1.25, 1.25, 2.25, 2.25, 2.25, 2.25] ypos = [0.25, 1.25, 2.25, 3.25, 0.25, 1.25, 2.25, 3.25, 0.25, 1.25, 2.25, 3.25] dz = [1., 0.517e6, 4.7e6, 2.2e6, 1., 105e6, 96e6, 1.28e9, 1., 1.776e9 , 4.18e9 ,173.1e9] ax.set_zlabel(&quot;mass [eV]&quot;) ax.set_ylabel(&quot;type&quot;) ax.set_xlabel(&quot;generation&quot;) ax.set_xticklabels([&quot;&quot;, &quot;1&quot;, &quot;&quot;, &quot;2&quot;, &quot;&quot;, &quot;3&quot;]) ax.set_yticklabels([&quot;&quot;, r&quot;$\nu$&quot;, &quot;&quot;, r&quot;$\ell$&quot;, &quot;&quot;, &quot;d&quot;, &quot;&quot;, &quot;u&quot;]) ax.set_zscale('log') ax.bar3d(xpos, ypos, 0, dx, dy, dz) plt.tight_layout() plt.savefig('Desktop/brokenlog.png') plt.show() "><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">mplot3d</span> <span class="pl-k">import</span> <span class="pl-v">Axes3D</span> <span class="pl-c"># noqa: F401 unused import</span> <span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">inline</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">111</span>, <span class="pl-s1">projection</span><span class="pl-c1">=</span><span class="pl-s">'3d'</span>) <span class="pl-c"># dumb dump of data</span> <span class="pl-s1">dx</span>, <span class="pl-s1">dy</span> <span class="pl-c1">=</span> <span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span> <span class="pl-s1">xpos</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">2.25</span>] <span class="pl-s1">ypos</span> <span class="pl-c1">=</span> [<span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>, <span class="pl-c1">0.25</span>, <span class="pl-c1">1.25</span>, <span class="pl-c1">2.25</span>, <span class="pl-c1">3.25</span>] <span class="pl-s1">dz</span> <span class="pl-c1">=</span> [<span class="pl-c1">1.</span>, <span class="pl-c1">0.517e6</span>, <span class="pl-c1">4.7e6</span>, <span class="pl-c1">2.2e6</span>, <span class="pl-c1">1.</span>, <span class="pl-c1">105e6</span>, <span class="pl-c1">96e6</span>, <span class="pl-c1">1.28e9</span>, <span class="pl-c1">1.</span>, <span class="pl-c1">1.776e9</span> , <span class="pl-c1">4.18e9</span> ,<span class="pl-c1">173.1e9</span>] <span class="pl-s1">ax</span>.<span class="pl-en">set_zlabel</span>(<span class="pl-s">"mass [eV]"</span>) <span class="pl-s1">ax</span>.<span class="pl-en">set_ylabel</span>(<span class="pl-s">"type"</span>) <span class="pl-s1">ax</span>.<span class="pl-en">set_xlabel</span>(<span class="pl-s">"generation"</span>) <span class="pl-s1">ax</span>.<span class="pl-en">set_xticklabels</span>([<span class="pl-s">""</span>, <span class="pl-s">"1"</span>, <span class="pl-s">""</span>, <span class="pl-s">"2"</span>, <span class="pl-s">""</span>, <span class="pl-s">"3"</span>]) <span class="pl-s1">ax</span>.<span class="pl-en">set_yticklabels</span>([<span class="pl-s">""</span>, <span class="pl-s">r"$\nu$"</span>, <span class="pl-s">""</span>, <span class="pl-s">r"$\ell$"</span>, <span class="pl-s">""</span>, <span class="pl-s">"d"</span>, <span class="pl-s">""</span>, <span class="pl-s">"u"</span>]) <span class="pl-s1">ax</span>.<span class="pl-en">set_zscale</span>(<span class="pl-s">'log'</span>) <span class="pl-s1">ax</span>.<span class="pl-en">bar3d</span>(<span class="pl-s1">xpos</span>, <span class="pl-s1">ypos</span>, <span class="pl-c1">0</span>, <span class="pl-s1">dx</span>, <span class="pl-s1">dy</span>, <span class="pl-s1">dz</span>) <span class="pl-s1">plt</span>.<span class="pl-en">tight_layout</span>() <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'Desktop/brokenlog.png'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">show</span>() </pre></div> <p dir="auto"><strong>Actual outcome</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1836192/64704733-0b921880-d4af-11e9-9321-279cd99bc96a.png"><img src="https://user-images.githubusercontent.com/1836192/64704733-0b921880-d4af-11e9-9321-279cd99bc96a.png" alt="brokenlog" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">Log scale on z axis w/ ticks at orders of magnitude.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li> <p dir="auto">Operating system: ubuntu 18.04 LTS</p> </li> <li> <p dir="auto">Matplotlib version: 3.1.1</p> </li> <li> <p dir="auto">Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://ipykernel.pylab.backend_inline</p> </li> <li> <p dir="auto">Python version: 3.6.8</p> </li> <li> <p dir="auto">Jupyter version (if applicable): 4.4.0</p> </li> </ul> <p dir="auto">matplotlib installed/updated via <code class="notranslate">pip3</code>.</p>
<p dir="auto"><a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3314771&amp;group_id=80706&amp;atid=560720" rel="nofollow">Original report at SourceForge, opened Fri Jun 10 12:29:24 2011</a></p> <p dir="auto">If you enable a log scale when doing a 3D scatter plot, nothing is created and the program crashes. Attached is the error output.</p> <p dir="auto">You can easily reproduce this by taking the example scatter3d_demo.py and adding the line "ax.set_xscale('log')".</p> <h3 dir="auto">SourceForge History</h3> <ul dir="auto"> <li>On Fri Jun 10 12:29:40 2011, by qulogic: File Added: 414517: mpl-3d-log-error.txt</li> </ul>
1
<h3 dir="auto"><g-emoji class="g-emoji" alias="computer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png">💻</g-emoji></h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on a fix?</li> </ul> <h3 dir="auto">How are you using Babel?</h3> <p dir="auto">@babel/cli</p> <h3 dir="auto">Input code</h3> <p dir="auto">I'm using the Babel CLI on the .js file generated by <a href="https://github.com/vuejs/devtools/blob/main/packages/shell-electron/src/backend.js">https://github.com/vuejs/devtools/blob/main/packages/shell-electron/src/backend.js</a> once Webpack have been run. The resulting source file contains this :</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" async notifyComponentUpdate(instance = null) { if (!this.enabled || !this.hasPermission(shared_utils_1.PluginPermission.COMPONENTS)) return; if (instance) { this.ctx.hook.emit(shared_utils_1.HookEvents.COMPONENT_UPDATED, ...(await this.backendApi.transformCall(shared_utils_1.HookEvents.COMPONENT_UPDATED, instance))); } else { this.ctx.hook.emit(shared_utils_1.HookEvents.COMPONENT_UPDATED); } }"><pre class="notranslate"> <span class="pl-en">async</span> <span class="pl-s1">notifyComponentUpdate</span><span class="pl-kos">(</span><span class="pl-s1">instance</span> <span class="pl-c1">=</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">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">enabled</span> <span class="pl-c1">||</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">hasPermission</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">PluginPermission</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENTS</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">instance</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">ctx</span><span class="pl-kos">.</span><span class="pl-c1">hook</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</span><span class="pl-kos">,</span> ...<span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">backendApi</span><span class="pl-kos">.</span><span class="pl-en">transformCall</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</span><span class="pl-kos">,</span> <span class="pl-s1">instance</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-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-c1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">hook</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</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">Which crashes Babel with the following error :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: D:\git\devtools\packages\shell-electron\build\backend.js: Expected type &quot;Expression&quot; with option undefined, but instead got &quot;SpreadElement&quot;. at assert (D:\git\devtools\node_modules\@babel\types\lib\asserts\generated\index.js:311:11) at Object.assertExpression (D:\git\devtools\node_modules\@babel\types\lib\asserts\generated\index.js:1308:3) at Emitter.Ep.explodeExpression (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:700:7) at explodeViaTempVar (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:743:23) at D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:815:18 at Array.map (&lt;anonymous&gt;) at Emitter.Ep.explodeExpression (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:814:28) at Emitter.Ep.explodeStatement (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:340:12) at D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:323:12 at Array.forEach (&lt;anonymous&gt;) { code: 'BABEL_TRANSFORM_ERROR' }"><pre class="notranslate"><code class="notranslate">Error: D:\git\devtools\packages\shell-electron\build\backend.js: Expected type "Expression" with option undefined, but instead got "SpreadElement". at assert (D:\git\devtools\node_modules\@babel\types\lib\asserts\generated\index.js:311:11) at Object.assertExpression (D:\git\devtools\node_modules\@babel\types\lib\asserts\generated\index.js:1308:3) at Emitter.Ep.explodeExpression (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:700:7) at explodeViaTempVar (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:743:23) at D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:815:18 at Array.map (&lt;anonymous&gt;) at Emitter.Ep.explodeExpression (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:814:28) at Emitter.Ep.explodeStatement (D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:340:12) at D:\git\devtools\node_modules\regenerator-transform\lib\emit.js:323:12 at Array.forEach (&lt;anonymous&gt;) { code: 'BABEL_TRANSFORM_ERROR' } </code></pre></div> <p dir="auto">When I modify emit.js to log the expr variable, I have :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Node { type: 'SpreadElement', start: 12927, end: 13022, loc: SourceLocation { start: Position { line: 526, column: 70, index: 12927 }, end: Position { line: 526, column: 165, index: 13022 }, filename: undefined, identifierName: undefined }, argument: { type: 'YieldExpression', argument: Node { type: 'CallExpression', start: 12937, end: 13021, loc: [SourceLocation], callee: [Node], arguments: [Array], leadingComments: undefined, innerComments: undefined, trailingComments: undefined }, delegate: false, trailingComments: [], leadingComments: [], innerComments: [] }, leadingComments: undefined, innerComments: undefined, trailingComments: undefined }"><pre class="notranslate"><code class="notranslate">Node { type: 'SpreadElement', start: 12927, end: 13022, loc: SourceLocation { start: Position { line: 526, column: 70, index: 12927 }, end: Position { line: 526, column: 165, index: 13022 }, filename: undefined, identifierName: undefined }, argument: { type: 'YieldExpression', argument: Node { type: 'CallExpression', start: 12937, end: 13021, loc: [SourceLocation], callee: [Node], arguments: [Array], leadingComments: undefined, innerComments: undefined, trailingComments: undefined }, delegate: false, trailingComments: [], leadingComments: [], innerComments: [] }, leadingComments: undefined, innerComments: undefined, trailingComments: undefined } </code></pre></div> <h3 dir="auto">Configuration file name</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Configuration</h3> <p dir="auto">The commang I run is simply :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npx babel ./shell-electron/build/backend.js -o ./shell-electron/build/backend-babel.js --presets=@babel/preset-env"><pre class="notranslate"><code class="notranslate">npx babel ./shell-electron/build/backend.js -o ./shell-electron/build/backend-babel.js --presets=@babel/preset-env </code></pre></div> <h3 dir="auto">Current and expected behavior</h3> <p dir="auto">Babel CLI crashes and don't output the new file. But when I change the js to :</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" async notifyComponentUpdate(instance = null) { if (!this.enabled || !this.hasPermission(shared_utils_1.PluginPermission.COMPONENTS)) return; if (instance) { let t = await this.backendApi.transformCall(shared_utils_1.HookEvents.COMPONENT_UPDATED, instance); this.ctx.hook.emit(shared_utils_1.HookEvents.COMPONENT_UPDATED, ...t); } else { this.ctx.hook.emit(shared_utils_1.HookEvents.COMPONENT_UPDATED); } }"><pre class="notranslate"> <span class="pl-en">async</span> <span class="pl-s1">notifyComponentUpdate</span><span class="pl-kos">(</span><span class="pl-s1">instance</span> <span class="pl-c1">=</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">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">enabled</span> <span class="pl-c1">||</span> <span class="pl-c1">!</span><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">hasPermission</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">PluginPermission</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENTS</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-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">backendApi</span><span class="pl-kos">.</span><span class="pl-en">transformCall</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</span><span class="pl-kos">,</span> <span class="pl-s1">instance</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">ctx</span><span class="pl-kos">.</span><span class="pl-c1">hook</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</span><span class="pl-kos">,</span> ...<span class="pl-s1">t</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">hook</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s1">shared_utils_1</span><span class="pl-kos">.</span><span class="pl-c1">HookEvents</span><span class="pl-kos">.</span><span class="pl-c1">COMPONENT_UPDATED</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">It don't crash anymore. Modifying the outputted file by hand is not a production-proof workflow though, and it'd be better if Babel could be run on it naturally.</p> <h3 dir="auto">Environment</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npx envinfo --preset babel System: OS: Windows 10 10.0.19044 Binaries: Node: 16.13.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD"><pre class="notranslate"><code class="notranslate">npx envinfo --preset babel System: OS: Windows 10 10.0.19044 Binaries: Node: 16.13.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD </code></pre></div> <h3 dir="auto">Possible solution</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional context</h3> <p dir="auto"><em>No response</em></p>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current behavior</strong></p> <ul dir="auto"> <li><a href="https://babeljs.io/repl#?browsers=firefox%2047&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=true&amp;code_lz=JYWwDg9gTgLgBAYQuCA7Apq-AzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHMFtQGd0dGMDRxc-AmQgATAIYCAFjT4xBw0Wjbt26AB7d4s9NnkBXMvDplFAuADEIEJCmbwD61LPuummeABvdjg4RQBPVDoJZwAKAEo4YNDQtQ0RMVRYgDpc2PkAd3lgeAAFPBBgIWz5MjJYgG0AXXjWjlCAX3YOoA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=true&amp;presets=env%2Cstage-1&amp;prettier=true&amp;targets=Node-14.14&amp;version=7.12.12&amp;externalPlugins=" rel="nofollow">REPL</a></li> </ul> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Component from '@glimmer/component'; import intersection from 'lodash/intersection'; export default class FooComponent extends Component { async foo() { intersection(...(await Promise.all([]))); } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Component</span> <span class="pl-k">from</span> <span class="pl-s">'@glimmer/component'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">intersection</span> <span class="pl-k">from</span> <span class="pl-s">'lodash/intersection'</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">FooComponent</span> <span class="pl-k">extends</span> <span class="pl-v">Component</span> <span class="pl-kos">{</span> <span class="pl-k">async</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">intersection</span><span class="pl-kos">(</span>...<span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">all</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-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>Expected behavior</strong><br> Code to be transpiled correctly.</p> <p dir="auto">Currently Babel blows up with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Expected type &quot;Expression&quot; with option undefined, but instead got &quot;SpreadElement&quot;."><pre class="notranslate"><code class="notranslate">Expected type "Expression" with option undefined, but instead got "SpreadElement". </code></pre></div> <p dir="auto">Using <code class="notranslate">firefox 35</code> for targets works. As does <code class="notranslate">firefox 53</code> and above.</p>
1
<pre class="notranslate">go version: go version devel +4971493b0e14 Tue Oct 01 23:44:20 2013 -0400 darwin/amd64 the code: <a href="https://gist.github.com/mitchellh/3883097d9d57fccbfb88">https://gist.github.com/mitchellh/3883097d9d57fccbfb88</a> (the code actually works fine on play.golang.org, I'm not sure what changed in Go 1.2 but on 1.2 this panics) The panic looks like this. If you look, the line number of `net.(*TCPConn).Close` is on line 1 in dial.go. Is this working as intended? It made debugging this trickier. panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x35077] goroutine 1 [running]: runtime.panic(0x74e40, 0x114e19) /Users/mitchellh/go/src/pkg/runtime/panic.c:266 +0xb6 net.(*TCPConn).Close(0x0, 0x7b6a0, 0x117228) /Users/mitchellh/go/src/pkg/net/dial.go:1 +0x17 main.main() /tmp/test/test.go:10 +0x41 exit status 2</pre>
<p dir="auto">Let <code class="notranslate">foo.go</code> be:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main // Foo does nothing. func Foo() {}"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-c">// Foo does nothing.</span> <span class="pl-k">func</span> <span class="pl-en">Foo</span>() {}</pre></div> <p dir="auto">Running <code class="notranslate">gorename -offset foo.go:#40 -to Bar</code> does update the function definition, but not the comment, as such:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main // Foo does nothing. func Bar() {}"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-c">// Foo does nothing.</span> <span class="pl-k">func</span> <span class="pl-en">Bar</span>() {}</pre></div> <p dir="auto">This would be the desired output:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main // Bar does nothing. func Bar() {}"><pre class="notranslate"><span class="pl-k">package</span> main <span class="pl-c">// Bar does nothing.</span> <span class="pl-k">func</span> <span class="pl-en">Bar</span>() {}</pre></div>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=david_syer" rel="nofollow">Dave Syer</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6366?redirect=false" rel="nofollow">SPR-6366</a></strong> and commented</p> <p dir="auto">Cannot import bean definitions using classpath*: resource location. Somewhere between RC1 and RC2 the behaviour of &lt;import resource="classpath*:..."/&gt; changed so that it is now treated as a relative resource, where clearly it is not.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0 RC2</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="398095085" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10432" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10432/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10432">#10432</a> XML bean definition "import" directive doesn't work with custom resource loader (<em><strong>"duplicates"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099393" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11046" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11046/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11046">#11046</a> Import of XML resources with 'classpath*:' URLs doesn't work (<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="398099694" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11077" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11077/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11077">#11077</a> Regression: Cannot import XML bean documents using classpath*: pseudo URLs (<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="398099173" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11017" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11017/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11017">#11017</a> classpath*: is no longer finding resources with (<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="398099680" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11076" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11076/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11076">#11076</a> Behavior of Bean loading changed in RC2 (Incompatible to Apache CXF)</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/7ac0e2ba02eb16fad4dc97236cbef2a1c8c6804c/hovercard" href="https://github.com/spring-projects/spring-framework/commit/7ac0e2ba02eb16fad4dc97236cbef2a1c8c6804c"><tt>7ac0e2b</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/66939ded0ffe646f417abe08a8a4e70167d6410e/hovercard" href="https://github.com/spring-projects/spring-framework/commit/66939ded0ffe646f417abe08a8a4e70167d6410e"><tt>66939de</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=yozh" rel="nofollow">Stepan Koltsov</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8257?redirect=false" rel="nofollow">SPR-8257</a></strong> and commented</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Configuration public class TmpConfig { @PostConstruct public void init() { System.out.println(&quot;TmpConfig.init&quot;); } @Bean public PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() { return new PropertyPlaceholderConfigurer(); } } new AnnotationConfigApplicationContext(TmpConfig.class);"><pre class="notranslate"><code class="notranslate">@Configuration public class TmpConfig { @PostConstruct public void init() { System.out.println("TmpConfig.init"); } @Bean public PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() { return new PropertyPlaceholderConfigurer(); } } new AnnotationConfigApplicationContext(TmpConfig.class); </code></pre></div> <p dir="auto">nothing is printed. However, if propertyPlaceholderConfigurer bean removed:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Configuration public class TmpConfig { @PostConstruct public void init() { System.out.println(&quot;TmpConfig.init&quot;); } } new AnnotationConfigApplicationContext(TmpConfig.class);"><pre class="notranslate"><code class="notranslate">@Configuration public class TmpConfig { @PostConstruct public void init() { System.out.println("TmpConfig.init"); } } new AnnotationConfigApplicationContext(TmpConfig.class); </code></pre></div> <p dir="auto">"TmpConfig.init" is printed as expected.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1 M1</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="398111929" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12917" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12917/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12917">#12917</a> BeanFactoryPostProcessor breaks default post-processing of <code class="notranslate">@Configuration</code> classes (<em><strong>"duplicates"</strong></em>)</li> </ul>
0
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><strong>Dialog With Date Picker Example:</strong> if Date Picker is opened and on Esc clicked should close the Date Picker, not the Dialog.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">If Date Picker is opened and Esc button is clicked Date Picker and Dialog, both of them getting closed.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>visit <a href="http://www.material-ui.com/#/components/dialog" rel="nofollow">http://www.material-ui.com/#/components/dialog</a></li> <li>go to section: Nested dialogs and click on button DIALOG WITH DATE PICKER</li> <li>Open a Date Picker dialog by clicking on date picker input.</li> <li>click Esc button.</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">The user was trying to select the country in the form which is in Dialog, as the usual behavior of Exc button even if you are using any other form if Esc is clicked on the drop-down, date picker, it should lose focus.</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>0.19.1</td> </tr> <tr> <td>React</td> <td>16.0.0</td> </tr> <tr> <td>browser</td> <td>chrome</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
<p dir="auto">TextField with type="datetime-local" doesn't fit in TableCell, if Table has a fixed layout. So, it isn't possible to open the date editor.</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">It should be possible to open a date editor.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">This <a href="https://stackblitz.com/edit/react-7z1emv?file=index.js" rel="nofollow">sample</a> shows the issue in action.<br> The first textfield looks quite good. I fixed it by using styles as follows:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;TextField style={{ display: 'block' }} InputProps={{ style: { display: 'block' } }} // ... /&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">TextField</span> <span class="pl-c1">style</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">display</span>: <span class="pl-s">'block'</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c1">InputProps</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-kos">{</span> <span class="pl-c1">style</span>: <span class="pl-kos">{</span> <span class="pl-c1">display</span>: <span class="pl-s">'block'</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-c">// ...</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span></pre></div> <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.30</td> </tr> <tr> <td>React</td> <td>16.1.1</td> </tr> <tr> <td>browser</td> <td>Google Chrome v63</td> </tr> </tbody> </table>
0
<h5 dir="auto">System information (version)</h5> <p dir="auto">OpenCV =&gt; 4.2.5<br> Operating System / Platform =&gt; Android 10<br> Compiler =&gt; Visual Studio 2019 / Android Studio</p> <h5 dir="auto">Detailed description</h5> <p dir="auto">When running a "DetectTextRectangles" from a "TextDetectionModel_EAST"<br> it throws the exception:<br> Org.Opencv.Core.CvException: 'cv::Exception: OpenCV(4.5.2) /build/master_pack-android/opencv/modules/dnn/src/model.cpp:96: error: (-201:Incorrect size of input array) Input size not specified in function 'processFrame'</p> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">NB: The code might look a bit weird as it is c# in a Xamarin.Android project.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" TextDetectionModel_EAST detector = new TextDetectionModel_EAST(EastTextDetectionPath); detector.SetInputSize(640, 640); detector.DetectTextRectangles(img, textboxesMat);"><pre lang="MatOfRotatedRect" class="notranslate"><code class="notranslate"> TextDetectionModel_EAST detector = new TextDetectionModel_EAST(EastTextDetectionPath); detector.SetInputSize(640, 640); detector.DetectTextRectangles(img, textboxesMat); </code></pre></div> <p dir="auto">or</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" TextDetectionModel_EAST detector = new TextDetectionModel_EAST(EastTextDetectionPath); Size siz = new Size(640, 640); detector.SetInputParams(1.0, siz); detector.DetectTextRectangles(img, textboxesMat);"><pre lang="MatOfRotatedRect" class="notranslate"><code class="notranslate"> TextDetectionModel_EAST detector = new TextDetectionModel_EAST(EastTextDetectionPath); Size siz = new Size(640, 640); detector.SetInputParams(1.0, siz); detector.DetectTextRectangles(img, textboxesMat); </code></pre></div> <p dir="auto">if you do it "the hard way" it works</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" float nmsThresh = 0.4f; Size siz = new Size(640, 640); Net net = Dnn.ReadNetFromTensorflow(EastTextDetectionPath); Mat blob = Dnn.BlobFromImage(img, 1.0, siz); net.SetInput(blob); JavaList&lt;Mat&gt; outs = new JavaList&lt;Mat&gt;(); JavaList&lt;string&gt; outNames = new JavaList&lt;string&gt;(); outNames.Add(&quot;feature_fusion/Conv_7/Sigmoid&quot;); outNames.Add(&quot;feature_fusion/concat_3&quot;); net.Forward(outs, outNames);"><pre lang="float" class="notranslate"><code class="notranslate"> float nmsThresh = 0.4f; Size siz = new Size(640, 640); Net net = Dnn.ReadNetFromTensorflow(EastTextDetectionPath); Mat blob = Dnn.BlobFromImage(img, 1.0, siz); net.SetInput(blob); JavaList&lt;Mat&gt; outs = new JavaList&lt;Mat&gt;(); JavaList&lt;string&gt; outNames = new JavaList&lt;string&gt;(); outNames.Add("feature_fusion/Conv_7/Sigmoid"); outNames.Add("feature_fusion/concat_3"); net.Forward(outs, outNames); </code></pre></div>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 4.5.2</li> <li>Operating System / Platform =&gt; Windows 64 Bit:</li> <li>Compiler =&gt; Visual Studio 2017</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">java app crash when calling init(Mat image, Rect boundingBox) method of video module Tracker.java.</p> <p dir="auto">The following code is generated by gen_java.py.<br> <strong>java_bindings_generator\gen\cpp\video.inl.hpp</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// // void cv::Tracker::init(Mat image, Rect boundingBox) // JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint); JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jint boundingBox_x, jint boundingBox_y, jint boundingBox_width, jint boundingBox_height) { static const char method_name[] = &quot;video::init_10()&quot;; try { LOGD(&quot;%s&quot;, method_name); cv::Tracker* me = (cv::Tracker*) self; //TODO: check for NULL Mat&amp; image = *((Mat*)image_nativeObj); Rect boundingBox(boundingBox_x, boundingBox_y, boundingBox_width, boundingBox_height); me-&gt;init( image, boundingBox ); } catch(const std::exception &amp;e) { throwJavaException(env, &amp;e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } }"><pre class="notranslate"><code class="notranslate">// // void cv::Tracker::init(Mat image, Rect boundingBox) // JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint); JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jint boundingBox_x, jint boundingBox_y, jint boundingBox_width, jint boundingBox_height) { static const char method_name[] = "video::init_10()"; try { LOGD("%s", method_name); cv::Tracker* me = (cv::Tracker*) self; //TODO: check for NULL Mat&amp; image = *((Mat*)image_nativeObj); Rect boundingBox(boundingBox_x, boundingBox_y, boundingBox_width, boundingBox_height); me-&gt;init( image, boundingBox ); } catch(const std::exception &amp;e) { throwJavaException(env, &amp;e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } } </code></pre></div> <p dir="auto">When I change the code generated by gen_java.py to the following, it works fine. <code class="notranslate">cv::Tracker* -&gt; Ptr&lt;cv::Tracker&gt;*</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// // void cv::Tracker::init(Mat image, Rect boundingBox) // JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint); JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jint boundingBox_x, jint boundingBox_y, jint boundingBox_width, jint boundingBox_height) { static const char method_name[] = &quot;video::init_10()&quot;; try { LOGD(&quot;%s&quot;, method_name); Ptr&lt;cv::Tracker&gt;* me = (Ptr&lt;cv::Tracker&gt;*) self; //TODO: check for NULL Mat&amp; image = *((Mat*)image_nativeObj); Rect boundingBox(boundingBox_x, boundingBox_y, boundingBox_width, boundingBox_height); (*me)-&gt;init( image, boundingBox ); } catch(const std::exception &amp;e) { throwJavaException(env, &amp;e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } }"><pre class="notranslate"><code class="notranslate">// // void cv::Tracker::init(Mat image, Rect boundingBox) // JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv*, jclass, jlong, jlong, jint, jint, jint, jint); JNIEXPORT void JNICALL Java_org_opencv_video_Tracker_init_10 (JNIEnv* env, jclass , jlong self, jlong image_nativeObj, jint boundingBox_x, jint boundingBox_y, jint boundingBox_width, jint boundingBox_height) { static const char method_name[] = "video::init_10()"; try { LOGD("%s", method_name); Ptr&lt;cv::Tracker&gt;* me = (Ptr&lt;cv::Tracker&gt;*) self; //TODO: check for NULL Mat&amp; image = *((Mat*)image_nativeObj); Rect boundingBox(boundingBox_x, boundingBox_y, boundingBox_width, boundingBox_height); (*me)-&gt;init( image, boundingBox ); } catch(const std::exception &amp;e) { throwJavaException(env, &amp;e, method_name); } catch (...) { throwJavaException(env, 0, method_name); } } </code></pre></div> <h5 dir="auto">Steps to reproduce</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Tracker tracker = TrackerMIL.create(); tracker.init( mat, rect);"><pre class="notranslate"><code class="notranslate">Tracker tracker = TrackerMIL.create(); tracker.init( mat, rect); </code></pre></div> <h5 dir="auto">Issue submission checklist</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br> forum.opencv.org, Stack Overflow, etc and have not found solution </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to latest OpenCV version and the issue is still there </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc </li> </ul>
1
<p dir="auto">Following behaviour:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd # version '0.12.0' !wget -O 'Vertikale_Netzlast_2013.csv' 'http://www.50hertz.com/transmission/files/sync/Netzkennzahlen/Netzlast/ArchivCSV/Vertikale_Netzlast_2013.csv' df = pd.read_csv('Vertikale_Netzlast_2013.csv', header=6, sep=';', parse_dates=[[0, 1]], index_col=0, na_values=['n.v.']) df.rename(columns={'Unnamed: 3': 'Load'}, inplace=True) df.Load = df.Load.interpolate() df.count"><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-c"># version '0.12.0'</span> !w<span class="pl-s1">get</span> <span class="pl-c1">-</span><span class="pl-v">O</span> <span class="pl-s">'Vertikale_Netzlast_2013.csv'</span> <span class="pl-s">'http://www.50hertz.com/transmission/files/sync/Netzkennzahlen/Netzlast/ArchivCSV/Vertikale_Netzlast_2013.csv'</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'Vertikale_Netzlast_2013.csv'</span>, <span class="pl-s1">header</span><span class="pl-c1">=</span><span class="pl-c1">6</span>, <span class="pl-s1">sep</span><span class="pl-c1">=</span><span class="pl-s">';'</span>, <span class="pl-s1">parse_dates</span><span class="pl-c1">=</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">1</span>]], <span class="pl-s1">index_col</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">na_values</span><span class="pl-c1">=</span>[<span class="pl-s">'n.v.'</span>]) <span class="pl-s1">df</span>.<span class="pl-en">rename</span>(<span class="pl-s1">columns</span><span class="pl-c1">=</span>{<span class="pl-s">'Unnamed: 3'</span>: <span class="pl-s">'Load'</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-v">Load</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-v">Load</span>.<span class="pl-en">interpolate</span>() <span class="pl-s1">df</span>.<span class="pl-s1">count</span></pre></div> <p dir="auto">shows me, that everything is pretty ok:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;bound method DataFrame.count of &lt;class 'pandas.core.frame.DataFrame'&gt; DatetimeIndex: 35044 entries, 2013-01-01 00:00:00 to 2013-12-31 23:45:00 Data columns (total 2 columns): bis 35044 non-null values Load 35044 non-null values dtypes: float64(1), object(1)&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-s1">bound</span> <span class="pl-s1">method</span> <span class="pl-v">DataFrame</span>.<span class="pl-s1">count</span> <span class="pl-s1">of</span> <span class="pl-c1">&lt;</span><span class="pl-s1">class</span> <span class="pl-s">'pandas.core.frame.DataFrame'</span><span class="pl-c1">&gt;</span> <span class="pl-v">DatetimeIndex</span>: <span class="pl-c1">35044</span> <span class="pl-s1">entries</span>, <span class="pl-c1">2013</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span> <span class="pl-s1">to</span> <span class="pl-c1">2013</span><span class="pl-c1">-</span><span class="pl-c1">12</span><span class="pl-c1">-</span><span class="pl-c1">31</span> <span class="pl-c1">23</span>:<span class="pl-c1">45</span>:<span class="pl-c1">00</span> <span class="pl-v">Data</span> <span class="pl-en">columns</span> (<span class="pl-s1">total</span> <span class="pl-c1">2</span> <span class="pl-s1">columns</span>): <span class="pl-s1">bis</span> <span class="pl-c1">35044</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">null</span> <span class="pl-s1">values</span> <span class="pl-v">Load</span> <span class="pl-c1">35044</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">null</span> <span class="pl-s1">values</span> <span class="pl-s1">dtypes</span>: <span class="pl-en">float64</span>(<span class="pl-c1">1</span>), <span class="pl-en">object</span>(<span class="pl-c1">1</span>)<span class="pl-c1">&gt;</span></pre></div> <p dir="auto">But when I try to plot it with <code class="notranslate">df.Load.plot()</code> I get the error message:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) &lt;ipython-input-431-abfff097d131&gt; in &lt;module&gt;() ----&gt; 1 df.Load.plot() /Library/Python/2.7/site-packages/pandas/tools/plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds) 1728 secondary_y=secondary_y, **kwds) 1729 -&gt; 1730 plot_obj.generate() 1731 plot_obj.draw() 1732 /Library/Python/2.7/site-packages/pandas/tools/plotting.pyc in generate(self) 854 self._compute_plot_data() 855 self._setup_subplots() --&gt; 856 self._make_plot() 857 self._post_plot_logic() 858 self._adorn_subplots() /Library/Python/2.7/site-packages/pandas/tools/plotting.pyc in _make_plot(self) 1242 lines = [] 1243 labels = [] -&gt; 1244 x = self._get_xticks(convert_period=True) 1245 1246 plotf = self._get_plot_function() /Library/Python/2.7/site-packages/pandas/tools/plotting.pyc in _get_xticks(self, convert_period) 1032 x = index._mpl_repr() 1033 elif is_datetype: -&gt; 1034 self.data = self.data.reindex(index=index.order()) 1035 x = self.data.index._mpl_repr() 1036 else: /Library/Python/2.7/site-packages/pandas/core/series.pyc in reindex(self, index, method, level, fill_value, limit, copy, takeable) 2644 2645 # GH4246 (dispatch to a common method with frame to handle possibly duplicate index) -&gt; 2646 return self._reindex_with_indexers(new_index, indexer, copy=copy, fill_value=fill_value) 2647 2648 def _reindex_with_indexers(self, index, indexer, copy, fill_value): /Library/Python/2.7/site-packages/pandas/core/series.pyc in _reindex_with_indexers(self, index, indexer, copy, fill_value) 2648 def _reindex_with_indexers(self, index, indexer, copy, fill_value): 2649 new_values = com.take_1d(self.values, indexer, fill_value=fill_value) -&gt; 2650 return Series(new_values, index=index, name=self.name) 2651 2652 def reindex_axis(self, labels, axis=0, **kwargs): /Library/Python/2.7/site-packages/pandas/core/series.pyc in __new__(cls, data, index, dtype, name, copy) 490 else: 491 subarr = subarr.view(Series) --&gt; 492 subarr.index = index 493 subarr.name = name 494 /Library/Python/2.7/site-packages/pandas/lib.so in pandas.lib.SeriesIndex.__set__ (pandas/lib.c:29541)() AssertionError: Index length did not match values"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">AssertionError</span> <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>) <span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">431</span><span class="pl-c1">-</span><span class="pl-s1">abfff097d131</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-s1">df</span>.<span class="pl-v">Load</span>.<span class="pl-en">plot</span>() <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tools</span><span class="pl-c1">/</span><span class="pl-s1">plotting</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">plot_series</span>(<span class="pl-s1">series</span>, <span class="pl-s1">label</span>, <span class="pl-s1">kind</span>, <span class="pl-s1">use_index</span>, <span class="pl-s1">rot</span>, <span class="pl-s1">xticks</span>, <span class="pl-s1">yticks</span>, <span class="pl-s1">xlim</span>, <span class="pl-s1">ylim</span>, <span class="pl-s1">ax</span>, <span class="pl-s1">style</span>, <span class="pl-s1">grid</span>, <span class="pl-s1">legend</span>, <span class="pl-s1">logx</span>, <span class="pl-s1">logy</span>, <span class="pl-s1">secondary_y</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>) <span class="pl-c1">1728</span> <span class="pl-s1">secondary_y</span><span class="pl-c1">=</span><span class="pl-s1">secondary_y</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>) <span class="pl-c1">1729</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1730</span> <span class="pl-s1">plot_obj</span>.<span class="pl-en">generate</span>() <span class="pl-c1">1731</span> <span class="pl-s1">plot_obj</span>.<span class="pl-en">draw</span>() <span class="pl-c1">1732</span> <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tools</span><span class="pl-c1">/</span><span class="pl-s1">plotting</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">generate</span>(<span class="pl-s1">self</span>) <span class="pl-c1">854</span> <span class="pl-s1">self</span>.<span class="pl-en">_compute_plot_data</span>() <span class="pl-c1">855</span> <span class="pl-s1">self</span>.<span class="pl-en">_setup_subplots</span>() <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">856</span> <span class="pl-s1">self</span>.<span class="pl-en">_make_plot</span>() <span class="pl-c1">857</span> <span class="pl-s1">self</span>.<span class="pl-en">_post_plot_logic</span>() <span class="pl-c1">858</span> <span class="pl-s1">self</span>.<span class="pl-en">_adorn_subplots</span>() <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tools</span><span class="pl-c1">/</span><span class="pl-s1">plotting</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_make_plot</span>(<span class="pl-s1">self</span>) <span class="pl-c1">1242</span> <span class="pl-s1">lines</span> <span class="pl-c1">=</span> [] <span class="pl-c1">1243</span> <span class="pl-s1">labels</span> <span class="pl-c1">=</span> [] <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1244</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_xticks</span>(<span class="pl-s1">convert_period</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c1">1245</span> <span class="pl-c1">1246</span> <span class="pl-s1">plotf</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_plot_function</span>() <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tools</span><span class="pl-c1">/</span><span class="pl-s1">plotting</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_get_xticks</span>(<span class="pl-s1">self</span>, <span class="pl-s1">convert_period</span>) <span class="pl-c1">1032</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">index</span>.<span class="pl-en">_mpl_repr</span>() <span class="pl-c1">1033</span> <span class="pl-s1">elif</span> <span class="pl-s1">is_datetype</span>: <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1034</span> <span class="pl-s1">self</span>.<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">data</span>.<span class="pl-en">reindex</span>(<span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>.<span class="pl-en">order</span>()) <span class="pl-c1">1035</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">data</span>.<span class="pl-s1">index</span>.<span class="pl-en">_mpl_repr</span>() <span class="pl-c1">1036</span> <span class="pl-s1">else</span>: <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">series</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">reindex</span>(<span class="pl-s1">self</span>, <span class="pl-s1">index</span>, <span class="pl-s1">method</span>, <span class="pl-s1">level</span>, <span class="pl-s1">fill_value</span>, <span class="pl-s1">limit</span>, <span class="pl-s1">copy</span>, <span class="pl-s1">takeable</span>) <span class="pl-c1">2644</span> <span class="pl-c1">2645</span> <span class="pl-c"># GH4246 (dispatch to a common method with frame to handle possibly duplicate index)</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2646</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_reindex_with_indexers</span>(<span class="pl-s1">new_index</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">copy</span><span class="pl-c1">=</span><span class="pl-s1">copy</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-s1">fill_value</span>) <span class="pl-c1">2647</span> <span class="pl-c1">2648</span> <span class="pl-k">def</span> <span class="pl-en">_reindex_with_indexers</span>(<span class="pl-s1">self</span>, <span class="pl-s1">index</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">copy</span>, <span class="pl-s1">fill_value</span>): <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">series</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">_reindex_with_indexers</span>(<span class="pl-s1">self</span>, <span class="pl-s1">index</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">copy</span>, <span class="pl-s1">fill_value</span>) <span class="pl-c1">2648</span> <span class="pl-k">def</span> <span class="pl-en">_reindex_with_indexers</span>(<span class="pl-s1">self</span>, <span class="pl-s1">index</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">copy</span>, <span class="pl-s1">fill_value</span>): <span class="pl-c1">2649</span> <span class="pl-s1">new_values</span> <span class="pl-c1">=</span> <span class="pl-s1">com</span>.<span class="pl-en">take_1d</span>(<span class="pl-s1">self</span>.<span class="pl-s1">values</span>, <span class="pl-s1">indexer</span>, <span class="pl-s1">fill_value</span><span class="pl-c1">=</span><span class="pl-s1">fill_value</span>) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2650</span> <span class="pl-s1">return</span> <span class="pl-v">Series</span>(<span class="pl-s1">new_values</span>, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">name</span>) <span class="pl-c1">2651</span> <span class="pl-c1">2652</span> <span class="pl-k">def</span> <span class="pl-en">reindex_axis</span>(<span class="pl-s1">self</span>, <span class="pl-s1">labels</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">series</span>.<span class="pl-s1">pyc</span> <span class="pl-c1">in</span> <span class="pl-en">__new__</span>(<span class="pl-s1">cls</span>, <span class="pl-s1">data</span>, <span class="pl-s1">index</span>, <span class="pl-s1">dtype</span>, <span class="pl-s1">name</span>, <span class="pl-s1">copy</span>) <span class="pl-c1">490</span> <span class="pl-s1">else</span>: <span class="pl-c1">491</span> <span class="pl-s1">subarr</span> <span class="pl-c1">=</span> <span class="pl-s1">subarr</span>.<span class="pl-en">view</span>(<span class="pl-v">Series</span>) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">492</span> <span class="pl-s1">subarr</span>.<span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">index</span> <span class="pl-c1">493</span> <span class="pl-s1">subarr</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span> <span class="pl-c1">494</span> <span class="pl-c1">/</span><span class="pl-v">Library</span><span class="pl-c1">/</span><span class="pl-v">Python</span><span class="pl-c1">/</span><span class="pl-c1">2.7</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">pandas</span><span class="pl-c1">/</span><span class="pl-s1">lib</span>.<span class="pl-s1">so</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">lib</span>.<span class="pl-v">SeriesIndex</span>.<span class="pl-en">__set__</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">lib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">29541</span>)() <span class="pl-v">AssertionError</span>: <span class="pl-v">Index</span> <span class="pl-s1">length</span> <span class="pl-s1">did</span> <span class="pl-c1">not</span> <span class="pl-s1">match</span> <span class="pl-s1">values</span></pre></div> <p dir="auto">But index as well as <code class="notranslate">Load</code> got 35044. Bug?</p>
<p dir="auto">I have what appears to be a valid <code class="notranslate">Series</code> with a time series index as follows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [41]: inactive Out[41]: 2010-06-10 20:43:07 37.2 2010-06-21 06:37:28 0.0 2009-07-20 06:53:38 0.0 2012-05-17 01:50:13 27.4 2009-07-27 21:09:15 0.0 2010-05-04 09:06:54 0.0 2010-05-06 03:38:54 32.5 2010-05-09 08:33:16 56.9 2010-05-26 18:58:42 0.0 2010-05-31 18:40:41 0.0 2010-06-13 08:46:17 0.0 2010-06-16 18:27:51 0.0 2010-06-19 11:59:48 0.0 2010-06-24 15:24:26 33.4 2010-06-28 10:54:27 0.0 ... 2008-11-02 07:35:22 71.2 2008-11-05 17:33:39 97.6 2009-10-22 23:15:39 75.7 2009-10-27 20:55:07 67.5 2009-06-02 13:57:15 35.8 2009-06-06 14:15:41 25.9 2008-11-07 01:22:46 0.0 2009-10-12 17:08:20 100.0 2010-09-19 10:21:39 0.0 2010-09-24 15:46:50 0.0 2010-09-30 16:48:09 0.0 2010-10-08 21:43:10 0.0 2010-10-15 19:27:11 0.0 2010-10-28 19:10:42 0.0 2010-06-13 10:32:45 100.0 Name: pdgt10, Length: 13536, dtype: float64"><pre class="notranslate"><code class="notranslate">In [41]: inactive Out[41]: 2010-06-10 20:43:07 37.2 2010-06-21 06:37:28 0.0 2009-07-20 06:53:38 0.0 2012-05-17 01:50:13 27.4 2009-07-27 21:09:15 0.0 2010-05-04 09:06:54 0.0 2010-05-06 03:38:54 32.5 2010-05-09 08:33:16 56.9 2010-05-26 18:58:42 0.0 2010-05-31 18:40:41 0.0 2010-06-13 08:46:17 0.0 2010-06-16 18:27:51 0.0 2010-06-19 11:59:48 0.0 2010-06-24 15:24:26 33.4 2010-06-28 10:54:27 0.0 ... 2008-11-02 07:35:22 71.2 2008-11-05 17:33:39 97.6 2009-10-22 23:15:39 75.7 2009-10-27 20:55:07 67.5 2009-06-02 13:57:15 35.8 2009-06-06 14:15:41 25.9 2008-11-07 01:22:46 0.0 2009-10-12 17:08:20 100.0 2010-09-19 10:21:39 0.0 2010-09-24 15:46:50 0.0 2010-09-30 16:48:09 0.0 2010-10-08 21:43:10 0.0 2010-10-15 19:27:11 0.0 2010-10-28 19:10:42 0.0 2010-06-13 10:32:45 100.0 Name: pdgt10, Length: 13536, dtype: float64 </code></pre></div> <p dir="auto">Note also:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [43]: inactive.isnull().sum() Out[43]: 0 In [45]: inactive.index.size Out[45]: 13536 In [46]: inactive.values.size Out[46]: 13536"><pre class="notranslate"><code class="notranslate">In [43]: inactive.isnull().sum() Out[43]: 0 In [45]: inactive.index.size Out[45]: 13536 In [46]: inactive.values.size Out[46]: 13536 </code></pre></div> <p dir="auto">However, when I try calling <code class="notranslate">inactive.plot()</code> in order to get a time series plot, I receive a puzzling <code class="notranslate">AssertionError</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [40]: inactive.plot() --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) &lt;ipython-input-40-cdcfa4d871e5&gt; in &lt;module&gt;() ----&gt; 1 inactive.plot() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds) 1730 secondary_y=secondary_y, **kwds) 1731 -&gt; 1732 plot_obj.generate() 1733 plot_obj.draw() 1734 /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in generate(self) 856 self._compute_plot_data() 857 self._setup_subplots() --&gt; 858 self._make_plot() 859 self._post_plot_logic() 860 self._adorn_subplots() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _make_plot(self) 1244 lines = [] 1245 labels = [] -&gt; 1246 x = self._get_xticks(convert_period=True) 1247 1248 plotf = self._get_plot_function() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _get_xticks(self, convert_period) 1034 x = index._mpl_repr() 1035 elif is_datetype: -&gt; 1036 self.data = self.data.reindex(index=index.order()) 1037 x = self.data.index._mpl_repr() 1038 else: /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in reindex(self, index, method, level, fill_value, limit, copy, takeable) 2649 2650 # GH4246 (dispatch to a common method with frame to handle possibly duplicate index) -&gt; 2651 return self._reindex_with_indexers(new_index, indexer, copy=copy, fill_value=fill_value) 2652 2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value): /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in _reindex_with_indexers(self, index, indexer, copy, fill_value) 2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value): 2654 new_values = com.take_1d(self.values, indexer, fill_value=fill_value) -&gt; 2655 return Series(new_values, index=index, name=self.name) 2656 2657 def reindex_axis(self, labels, axis=0, **kwargs): /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in __new__(cls, data, index, dtype, name, copy) 491 else: 492 subarr = subarr.view(Series) --&gt; 493 subarr.index = index 494 subarr.name = name 495 /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/lib.so in pandas.lib.SeriesIndex.__set__ (pandas/lib.c:29092)() AssertionError: Index length did not match values"><pre class="notranslate"><code class="notranslate">In [40]: inactive.plot() --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) &lt;ipython-input-40-cdcfa4d871e5&gt; in &lt;module&gt;() ----&gt; 1 inactive.plot() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in plot_series(series, label, kind, use_index, rot, xticks, yticks, xlim, ylim, ax, style, grid, legend, logx, logy, secondary_y, **kwds) 1730 secondary_y=secondary_y, **kwds) 1731 -&gt; 1732 plot_obj.generate() 1733 plot_obj.draw() 1734 /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in generate(self) 856 self._compute_plot_data() 857 self._setup_subplots() --&gt; 858 self._make_plot() 859 self._post_plot_logic() 860 self._adorn_subplots() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _make_plot(self) 1244 lines = [] 1245 labels = [] -&gt; 1246 x = self._get_xticks(convert_period=True) 1247 1248 plotf = self._get_plot_function() /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/tools/plotting.pyc in _get_xticks(self, convert_period) 1034 x = index._mpl_repr() 1035 elif is_datetype: -&gt; 1036 self.data = self.data.reindex(index=index.order()) 1037 x = self.data.index._mpl_repr() 1038 else: /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in reindex(self, index, method, level, fill_value, limit, copy, takeable) 2649 2650 # GH4246 (dispatch to a common method with frame to handle possibly duplicate index) -&gt; 2651 return self._reindex_with_indexers(new_index, indexer, copy=copy, fill_value=fill_value) 2652 2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value): /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in _reindex_with_indexers(self, index, indexer, copy, fill_value) 2653 def _reindex_with_indexers(self, index, indexer, copy, fill_value): 2654 new_values = com.take_1d(self.values, indexer, fill_value=fill_value) -&gt; 2655 return Series(new_values, index=index, name=self.name) 2656 2657 def reindex_axis(self, labels, axis=0, **kwargs): /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/core/series.pyc in __new__(cls, data, index, dtype, name, copy) 491 else: 492 subarr = subarr.view(Series) --&gt; 493 subarr.index = index 494 subarr.name = name 495 /Library/Python/2.7/site-packages/pandas-0.12.0_80_gfcaf9a6_20130729-py2.7-macosx-10.8-intel.egg/pandas/lib.so in pandas.lib.SeriesIndex.__set__ (pandas/lib.c:29092)() AssertionError: Index length did not match values </code></pre></div> <p dir="auto">As I have shown above, my index length and my values are the same length.</p> <p dir="auto">Running a recent (&lt;2 weeks) build from master on OS X 10.8.4 and Python 2.7.2.</p>
1
<p dir="auto">The following code fails to compile due to the two adjacent <code class="notranslate">&lt;</code>.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Test { type X; fn foo() -&gt; Option&lt;&lt;Self as Test&gt;::X&gt;; }"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Test</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">X</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Option</span><span class="pl-kos">&lt;</span>&lt;<span class="pl-smi">Self</span> <span class="pl-k">as</span> <span class="pl-smi">Test</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">X</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="testcase.rs:4:23: 4:25 error: expected `;` or `{`, found `&lt;&lt;` testcase.rs:4 fn foo() -&gt; Option&lt;&lt;Self as Test&gt;::X&gt;; ^~"><pre class="notranslate"><code class="notranslate">testcase.rs:4:23: 4:25 error: expected `;` or `{`, found `&lt;&lt;` testcase.rs:4 fn foo() -&gt; Option&lt;&lt;Self as Test&gt;::X&gt;; ^~ </code></pre></div>
<h3 dir="auto">STR</h3> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)] trait Trait { type Type; // OK fn method() -&gt; &lt;Self as Trait&gt;::Type; // Can't parse fn method() -&gt; Box&lt;&lt;Self as Trait&gt;::Type&gt;; } fn main() {}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>associated_types<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">trait</span> <span class="pl-smi">Trait</span> <span class="pl-kos">{</span> <span class="pl-k">type</span> <span class="pl-smi">Type</span><span class="pl-kos">;</span> <span class="pl-c">// OK</span> <span class="pl-k">fn</span> <span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; &lt;<span class="pl-smi">Self</span> <span class="pl-k">as</span> <span class="pl-smi">Trait</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">Type</span><span class="pl-kos">;</span> <span class="pl-c">// Can't parse</span> <span class="pl-k">fn</span> <span class="pl-en">method</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Box</span><span class="pl-kos">&lt;</span>&lt;<span class="pl-smi">Self</span> <span class="pl-k">as</span> <span class="pl-smi">Trait</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">Type</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <h3 dir="auto">Output</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ai.rs:9:23: 9:25 error: expected `;` or `{`, found `&lt;&lt;` ai.rs:9 fn method() -&gt; Box&lt;&lt;Self as Trait&gt;::Type&gt;;"><pre class="notranslate"><code class="notranslate">ai.rs:9:23: 9:25 error: expected `;` or `{`, found `&lt;&lt;` ai.rs:9 fn method() -&gt; Box&lt;&lt;Self as Trait&gt;::Type&gt;; </code></pre></div> <h3 dir="auto">Version</h3> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="rustc 0.12.0-pre (9508faa22 2014-09-17 23:45:36 +0000)"><pre class="notranslate">rustc <span class="pl-c1">0.12</span><span class="pl-kos">.</span><span class="pl-c1">0</span>-<span class="pl-en">pre</span> <span class="pl-kos">(</span><span class="pl-c1">9508</span>faa22 <span class="pl-c1">2014</span>-<span class="pl-c1">09</span>-<span class="pl-c1">17</span> <span class="pl-c1">23</span><span class="pl-kos">:</span><span class="pl-c1">45</span><span class="pl-kos">:</span><span class="pl-c1">36</span> +<span class="pl-c1">0000</span><span class="pl-kos">)</span></pre></div> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pcwalton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pcwalton">@pcwalton</a></p>
1
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">that is, all the functions in <a href="http://www.postgresql.org/docs/9.4/static/functions-json.html" rel="nofollow">http://www.postgresql.org/docs/9.4/static/functions-json.html</a> need to be possible without building subclasses of functions.</p>
<p dir="auto"><strong>Migrated issue, originally created by Frazer McLean (<a href="https://github.com/RazerM">@RazerM</a>)</strong></p> <p dir="auto">As mentioned in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384636807" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3746" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3746/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3746">#3746</a>, Windows wheels on PyPI would be useful.</p> <p dir="auto">I quickly set up wheel building on AppVeyor as a proof of concept. It's using my GitHub repository but it supports Bitbucket too.</p> <p dir="auto"><a href="https://ci.appveyor.com/project/RazerM/sqlalchemy/build/1.0.3" rel="nofollow">https://ci.appveyor.com/project/RazerM/sqlalchemy/build/1.0.3</a></p> <p dir="auto">I'd be willing to put the wheels on PyPI for new releases, but it's worth discussing user expectations. Once wheels are available, users expect them to be available. As such, it's good to have wheels on PyPI as soon as a new release goes live, and we'd have a delay if someone else is uploading.</p> <p dir="auto">AppVeyor has a REST API, so I could create a script that downloads the build artifacts (i.e. the wheels) so that whomever does the release can also upload the wheels at the same time.</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=david_syer" rel="nofollow">Dave Syer</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8252?redirect=false" rel="nofollow">SPR-8252</a></strong> and commented</p> <p dir="auto">Allow ref= as well as &lt;bean/&gt; for mvc:interceptor/. It's a nice feature (to get all handlers injected with the same interceptors), but it makes the interceptors hard to override.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.5</p> <p dir="auto">2 votes, 2 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mdeinum" rel="nofollow">Marten Deinum</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6996?redirect=false" rel="nofollow">SPR-6996</a></strong> and commented</p> <p dir="auto">Currently it is quite hard to reuse beans with the mvc:interceptors namespace. Interceptors must be specified as inner beans to mvc:interceptors or mvc:interceptor, it would be nice if mvc:interceptor would have a ref element to reference a HandlerInterceptor instead of defining it with an inner bean definition.</p> <p dir="auto">This would also allow for re-use of HandlerInterceptors.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.1</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?p=289456" rel="nofollow">http://forum.springsource.org/showthread.php?p=289456</a></p> <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/1784df8d3ee4c0ef27f78c56f393be94afe6d017/hovercard" href="https://github.com/spring-projects/spring-framework/commit/1784df8d3ee4c0ef27f78c56f393be94afe6d017"><tt>1784df8</tt></a></p> <p dir="auto">15 votes, 10 watchers</p>
1
<p dir="auto">Sorry I can't give more context as to how/when this happened, just got picked up by our crash tracker</p> <p dir="auto">Caused by: java.lang.NullPointerException<br> at com.bumptech.glide.manager.RequestTracker.clearRequests(RequestTracker.java:80)<br> at com.bumptech.glide.RequestManager.onDestroy(RequestManager.java:190)<br> at com.bumptech.glide.manager.ActivityFragmentLifecycle.onDestroy(ActivityFragmentLifecycle.java:62)<br> at com.bumptech.glide.manager.RequestManagerFragment.onDestroy(RequestManagerFragment.java:69)<br> at android.app.Fragment.performDestroy(Fragment.java:1913)</p>
<p dir="auto">Hi !<br> use v3.5<br> e.manager.RequestTracker.pauseRequests (SourceFile:57)<br> com.bumptech.glide.RequestManager.pauseRequests (SourceFile:151)<br> com.bumptech.glide.RequestManager.onStop (SourceFile:181)<br> com.bumptech.glide.manager.ActivityFragmentLifecycle.onStop (SourceFile:55)<br> com.bumptech.glide.manager.SupportRequestManagerFragment.onStop (SourceFile:60)</p>
1
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li><a href="https://github.com/celery/celery/pull/6838" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/6838/hovercard">Created in PR #6838</a></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>: 5.2.0</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="TypeError: a bytes-like object is required, not 'str' File &quot;aspiredu/project/celery.py&quot;, line 43, in run_command sys.stdout.write(line) # Write all output from the command File &quot;celery/utils/log.py&quot;, line 227, in write data = data.rstrip('\n')"><pre class="notranslate"><code class="notranslate">TypeError: a bytes-like object is required, not 'str' File "aspiredu/project/celery.py", line 43, in run_command sys.stdout.write(line) # Write all output from the command File "celery/utils/log.py", line 227, in write data = data.rstrip('\n') </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>: 3.9.6</li> <li><strong>Minimal Celery Version</strong>: 5.2</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="scout_apm==2.23.3"><pre class="notranslate"><code class="notranslate">scout_apm==2.23.3 </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><p dir="auto">Add the following test to t.unit.app.test_log.test_default_logger</p> <p dir="auto">What's happening is that the logger is getting a data instance of type bytes, but can call rstrip with a <code class="notranslate">str</code> parameter which breaks.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" @mock.restore_logging() def test_logging_proxy_bytes(self): logger = self.setup_logger(loglevel=logging.ERROR, logfile=None, root=False) with mock.wrap_logger(logger) as sio: p = LoggingProxy(logger, loglevel=logging.ERROR) p.close() p.write(b'foo') assert 'foo' not in str(sio.getvalue()) p.closed = False p.write(b'\n') assert str(sio.getvalue()) == '' write_res = p.write(b'foo ') assert str(sio.getvalue()) == 'foo \n' assert write_res == 4 p.flush() p.close() assert not p.isatty() with mock.stdouts() as (stdout, stderr): with in_sighandler(): p.write(b'foo') assert stderr.getvalue() "><pre class="notranslate"> <span class="pl-en">@<span class="pl-s1">mock</span>.<span class="pl-en">restore_logging</span>()</span> <span class="pl-k">def</span> <span class="pl-en">test_logging_proxy_bytes</span>(<span class="pl-s1">self</span>): <span class="pl-s1">logger</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">setup_logger</span>(<span class="pl-s1">loglevel</span><span class="pl-c1">=</span><span class="pl-s1">logging</span>.<span class="pl-v">ERROR</span>, <span class="pl-s1">logfile</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">root</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-k">with</span> <span class="pl-s1">mock</span>.<span class="pl-en">wrap_logger</span>(<span class="pl-s1">logger</span>) <span class="pl-k">as</span> <span class="pl-s1">sio</span>: <span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-v">LoggingProxy</span>(<span class="pl-s1">logger</span>, <span class="pl-s1">loglevel</span><span class="pl-c1">=</span><span class="pl-s1">logging</span>.<span class="pl-v">ERROR</span>) <span class="pl-s1">p</span>.<span class="pl-en">close</span>() <span class="pl-s1">p</span>.<span class="pl-en">write</span>(<span class="pl-s">b'foo'</span>) <span class="pl-k">assert</span> <span class="pl-s">'foo'</span> <span class="pl-c1">not</span> <span class="pl-c1">in</span> <span class="pl-en">str</span>(<span class="pl-s1">sio</span>.<span class="pl-en">getvalue</span>()) <span class="pl-s1">p</span>.<span class="pl-s1">closed</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span> <span class="pl-s1">p</span>.<span class="pl-en">write</span>(<span class="pl-s">b'<span class="pl-cce">\n</span>'</span>) <span class="pl-k">assert</span> <span class="pl-en">str</span>(<span class="pl-s1">sio</span>.<span class="pl-en">getvalue</span>()) <span class="pl-c1">==</span> <span class="pl-s">''</span> <span class="pl-s1">write_res</span> <span class="pl-c1">=</span> <span class="pl-s1">p</span>.<span class="pl-en">write</span>(<span class="pl-s">b'foo '</span>) <span class="pl-k">assert</span> <span class="pl-en">str</span>(<span class="pl-s1">sio</span>.<span class="pl-en">getvalue</span>()) <span class="pl-c1">==</span> <span class="pl-s">'foo <span class="pl-cce">\n</span>'</span> <span class="pl-k">assert</span> <span class="pl-s1">write_res</span> <span class="pl-c1">==</span> <span class="pl-c1">4</span> <span class="pl-s1">p</span>.<span class="pl-en">flush</span>() <span class="pl-s1">p</span>.<span class="pl-en">close</span>() <span class="pl-k">assert</span> <span class="pl-c1">not</span> <span class="pl-s1">p</span>.<span class="pl-en">isatty</span>() <span class="pl-k">with</span> <span class="pl-s1">mock</span>.<span class="pl-en">stdouts</span>() <span class="pl-k">as</span> (<span class="pl-s1">stdout</span>, <span class="pl-s1">stderr</span>): <span class="pl-k">with</span> <span class="pl-en">in_sighandler</span>(): <span class="pl-s1">p</span>.<span class="pl-en">write</span>(<span class="pl-s">b'foo'</span>) <span class="pl-k">assert</span> <span class="pl-s1">stderr</span>.<span class="pl-en">getvalue</span>()</pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Calling <code class="notranslate">ProxyLogger(logger).write(b'value')</code> should not break when a bytes instance is passed in.</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">A <code class="notranslate">TypeError: a bytes-like object is required, not 'str'</code> is raised.</p> <p dir="auto">I will be creating a PR as a follow-up to this issue.</p>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.3.0</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <p dir="auto">Add elasticsearch as backend<br> Run any command</p> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: '3.7.1 (default, Nov 6 2018, 18:46:03) \n[Clang 10.0.0 (clang-1000.11.45.5)]'</li> <li><strong>Minimal Celery Version</strong>: 4.3.0</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: 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>: System Version: macOS 10.14.5 (18F132) Darwin 18.6.0</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: Elasticsearch 7.0.0</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Result is sent as a dictionary. At <code class="notranslate">body</code> dictionary creation, result added as inner dictionary, not as a string. Correct mapping is created. Results in Elasticsearch will be shown correctly and nested type could be used.</p> <p dir="auto">Correct mapping example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;celery&quot; : { &quot;mappings&quot; : { &quot;backend&quot; : { &quot;properties&quot; : { &quot;@timestamp&quot; : { &quot;type&quot; : &quot;date&quot; }, &quot;result&quot; : { &quot;properties&quot; : { &quot;date_done&quot; : { &quot;type&quot; : &quot;date&quot; }, &quot;result&quot; : { &quot;type&quot; : &quot;long&quot; }, &quot;status&quot; : { &quot;type&quot; : &quot;text&quot;, &quot;fields&quot; : { &quot;keyword&quot; : { &quot;type&quot; : &quot;keyword&quot;, &quot;ignore_above&quot; : 256 } } }, &quot;task_id&quot; : { &quot;type&quot; : &quot;text&quot;, &quot;fields&quot; : { &quot;keyword&quot; : { &quot;type&quot; : &quot;keyword&quot;, &quot;ignore_above&quot; : 256 } } } } } } } } } }"><pre class="notranslate"><code class="notranslate">{ "celery" : { "mappings" : { "backend" : { "properties" : { "@timestamp" : { "type" : "date" }, "result" : { "properties" : { "date_done" : { "type" : "date" }, "result" : { "type" : "long" }, "status" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }, "task_id" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } } } } } } } } } </code></pre></div> <p dir="auto">Kibana:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/375964/61964080-c20c6d80-afd5-11e9-8506-90e19518b178.png"><img width="1410" alt="Screenshot 2019-07-26 at 17 49 27" src="https://user-images.githubusercontent.com/375964/61964080-c20c6d80-afd5-11e9-8506-90e19518b178.png" style="max-width: 100%;"></a></p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">Result value is serialized into a JSON string. At <code class="notranslate">body</code> dictionary creation, result added as a string. Elasticsearch can't parse it correctly.</p> <p dir="auto">Actual mapping:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;celery&quot; : { &quot;mappings&quot; : { &quot;backend&quot; : { &quot;properties&quot; : { &quot;@timestamp&quot; : { &quot;type&quot; : &quot;date&quot; }, &quot;result&quot; : { &quot;type&quot; : &quot;text&quot;, &quot;fields&quot; : { &quot;keyword&quot; : { &quot;type&quot; : &quot;keyword&quot;, &quot;ignore_above&quot; : 256 } } } } } } } }"><pre class="notranslate"><code class="notranslate">{ "celery" : { "mappings" : { "backend" : { "properties" : { "@timestamp" : { "type" : "date" }, "result" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } } } } } } } </code></pre></div> <p dir="auto">Kibana:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/375964/61964068-bae55f80-afd5-11e9-9c31-46a11892c830.png"><img src="https://user-images.githubusercontent.com/375964/61964068-bae55f80-afd5-11e9-9c31-46a11892c830.png" alt="Screenshot 2019-07-24 at 20 30 41" style="max-width: 100%;"></a></p> <p dir="auto"><a href="https://stackoverflow.com/questions/57188494/celery-result-type-for-elasticsearch" rel="nofollow">My stackoverflow question</a></p> <h1 dir="auto">Solution</h1> <p dir="auto">In my fork I've imported <code class="notranslate">json package</code> and added <code class="notranslate">json.loads(value)</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# celery/backends/elasticsearch.py import json def set(self, key, value): try: self._index( id=key, body={ 'result': json.loads(value), '@timestamp': '{0}Z'.format( datetime.utcnow().isoformat()[:-3] ), }, ) except elasticsearch.exceptions.ConflictError: # document already exists, update it data = self.get(key) data[key] = value self._index(key, data, refresh=True)"><pre class="notranslate"><code class="notranslate"># celery/backends/elasticsearch.py import json def set(self, key, value): try: self._index( id=key, body={ 'result': json.loads(value), '@timestamp': '{0}Z'.format( datetime.utcnow().isoformat()[:-3] ), }, ) except elasticsearch.exceptions.ConflictError: # document already exists, update it data = self.get(key) data[key] = value self._index(key, data, refresh=True) </code></pre></div> <p dir="auto">Is there a way to disable JSON serialization of results for the Elasticsearch backend? If no, is this solution good enough for the pull-request?</p>
0
<p dir="auto">Hello to all,<br> on my Windows 10, I installed tensorflow 1.5 and it works, but if I try to upgrade to tensorflow 1.7 it don't works, appeare the error:<br> <strong>ImportError: DLL load failed<br> ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'</strong></p> <p dir="auto">Microsoft C++ Runtime is updated</p> <p dir="auto">If I downgrade to the version 1.5 it works again<br> How can I solve it ?</p> <p dir="auto">Thanks<br> Sergio</p>
<p dir="auto">As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:</p> <ul dir="auto"> <li><code class="notranslate">ImportError: DLL load failed:</code></li> <li>A crash with return code 132</li> </ul> <p dir="auto">Our recommendation is to build TF from sources on these systems.</p> <h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: ubuntu/windows/macos</li> <li><strong>TensorFlow installed from (source or binary)</strong>: binary</li> <li><strong>TensorFlow version (use command below)</strong>: 1.6 and up</li> <li><strong>Python version</strong>: 2.7, 3.3, 3.4, 3.5, 3.6 and any newer</li> <li><strong>Bazel version (if compiling from source)</strong>: n/a</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li> <li><strong>CUDA/cuDNN version</strong>: any</li> <li><strong>GPU model and memory</strong>: any</li> <li><strong>Exact command to reproduce</strong>: python -c "import tensorflow as tf"</li> </ul>
1
<h4 dir="auto">Describe the workflow you want to enable</h4> <p dir="auto">The following is a proposal for an additional feature_selection method. I would like to propose a simple feature selection function that removes highly correlated feature columns using the Pearson product-moment correlation coefficients. The threshold that needs to be exceeded can be specified by the user.</p> <h4 dir="auto">Describe your proposed solution</h4> <p dir="auto">Below is a simplified function showing the essential functionality of the proposed feature:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# input data, 1st and 2nd column highly correlated X = np.array([[3, 2, 9], [2, 1, 2], [2, 1, 1], [1, 0, 3]]) &gt;&gt;&gt; X array([[3, 2, 9], [2, 1, 2], [2, 1, 1], [1, 0, 3]]) def correlation_selection(X, threshold=.9, rowvar=False): &quot;&quot;&quot;Remove highly correlated feature columns. Parameters ----------- X : ndarray of shape (n_samples, n_features) threshold : float, default=.9 rowvar: bool, default=False Returns -------- X_reduced : ndarray of shape (n_samples, n_features_reduced) &quot;&quot;&quot; corr = np.absolute(np.corrcoef(X, rowvar=rowvar)) upper = corr*np.triu(np.ones(corr.shape), k=1).astype(np.bool) to_drop = [column for column in range(upper.shape[1]) if any(upper[:,column] &gt;= threshold)] X_reduced = np.delete(X, to_drop, axis=1) return X_reduced X_reduced = correlation_selection(X) # feature matrix after removing correlated columns &gt;&gt;&gt; X_reduced array([[3, 9], [2, 2], [2, 1], [1, 3]])"><pre class="notranslate"><span class="pl-c"># input data, 1st and 2nd column highly correlated</span> <span class="pl-v">X</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">9</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">3</span>]]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">X</span> <span class="pl-en">array</span>([[<span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">9</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">3</span>]]) <span class="pl-k">def</span> <span class="pl-en">correlation_selection</span>(<span class="pl-v">X</span>, <span class="pl-s1">threshold</span><span class="pl-c1">=</span><span class="pl-c1">.9</span>, <span class="pl-s1">rowvar</span><span class="pl-c1">=</span><span class="pl-c1">False</span>): <span class="pl-s">"""Remove highly correlated feature columns.</span> <span class="pl-s"></span> <span class="pl-s"> Parameters</span> <span class="pl-s"> -----------</span> <span class="pl-s"></span> <span class="pl-s"> X : ndarray of shape (n_samples, n_features)</span> <span class="pl-s"></span> <span class="pl-s"> threshold : float, default=.9</span> <span class="pl-s"></span> <span class="pl-s"> rowvar: bool, default=False</span> <span class="pl-s"></span> <span class="pl-s"> Returns</span> <span class="pl-s"> --------</span> <span class="pl-s"></span> <span class="pl-s"> X_reduced : ndarray of shape (n_samples, n_features_reduced)</span> <span class="pl-s"></span> <span class="pl-s"> """</span> <span class="pl-s1">corr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">absolute</span>(<span class="pl-s1">np</span>.<span class="pl-en">corrcoef</span>(<span class="pl-v">X</span>, <span class="pl-s1">rowvar</span><span class="pl-c1">=</span><span class="pl-s1">rowvar</span>)) <span class="pl-s1">upper</span> <span class="pl-c1">=</span> <span class="pl-s1">corr</span><span class="pl-c1">*</span><span class="pl-s1">np</span>.<span class="pl-en">triu</span>(<span class="pl-s1">np</span>.<span class="pl-en">ones</span>(<span class="pl-s1">corr</span>.<span class="pl-s1">shape</span>), <span class="pl-s1">k</span><span class="pl-c1">=</span><span class="pl-c1">1</span>).<span class="pl-en">astype</span>(<span class="pl-s1">np</span>.<span class="pl-s1">bool</span>) <span class="pl-s1">to_drop</span> <span class="pl-c1">=</span> [<span class="pl-s1">column</span> <span class="pl-k">for</span> <span class="pl-s1">column</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-s1">upper</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>]) <span class="pl-k">if</span> <span class="pl-en">any</span>(<span class="pl-s1">upper</span>[:,<span class="pl-s1">column</span>] <span class="pl-c1">&gt;=</span> <span class="pl-s1">threshold</span>)] <span class="pl-v">X_reduced</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">delete</span>(<span class="pl-v">X</span>, <span class="pl-s1">to_drop</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">1</span>) <span class="pl-k">return</span> <span class="pl-v">X_reduced</span> <span class="pl-v">X_reduced</span> <span class="pl-c1">=</span> <span class="pl-en">correlation_selection</span>(<span class="pl-v">X</span>) <span class="pl-c"># feature matrix after removing correlated columns</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">X_reduced</span> <span class="pl-en">array</span>([[<span class="pl-c1">3</span>, <span class="pl-c1">9</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">2</span>], [<span class="pl-c1">2</span>, <span class="pl-c1">1</span>], [<span class="pl-c1">1</span>, <span class="pl-c1">3</span>]])</pre></div>
<p dir="auto">I am updating some code in <code class="notranslate">imbalanced-learn</code> to use the estimator tag. In some way, I was able to add a new entry in the <code class="notranslate">_DEFAULT_TAGS</code> and use the implementation of <code class="notranslate">_safe_tags</code>.</p> <p dir="auto">I have the following use case:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="_DEFAULT_TAGS = {'sample_indices': False} class BaseClass: ... def _more_tags(self): return {'sample_indices': True} class SpecialClass(BaseClass): ... def _more_tags(self): tags = super()._more_tags() tags['sample_indices'] = False return tags"><pre class="notranslate"><span class="pl-s1">_DEFAULT_TAGS</span> <span class="pl-c1">=</span> {<span class="pl-s">'sample_indices'</span>: <span class="pl-c1">False</span>} <span class="pl-k">class</span> <span class="pl-v">BaseClass</span>: ... <span class="pl-k">def</span> <span class="pl-en">_more_tags</span>(<span class="pl-s1">self</span>): <span class="pl-k">return</span> {<span class="pl-s">'sample_indices'</span>: <span class="pl-c1">True</span>} <span class="pl-k">class</span> <span class="pl-v">SpecialClass</span>(<span class="pl-v">BaseClass</span>): ... <span class="pl-k">def</span> <span class="pl-en">_more_tags</span>(<span class="pl-s1">self</span>): <span class="pl-s1">tags</span> <span class="pl-c1">=</span> <span class="pl-en">super</span>().<span class="pl-en">_more_tags</span>() <span class="pl-s1">tags</span>[<span class="pl-s">'sample_indices'</span>] <span class="pl-c1">=</span> <span class="pl-c1">False</span> <span class="pl-k">return</span> <span class="pl-s1">tags</span></pre></div> <p dir="auto">For some reason, all estimators inheriting from the <code class="notranslate">BaseClass</code> would have a <code class="notranslate">sample_indices</code> tag to <code class="notranslate">True</code>. All but not for one class where I would like to overwrite the tag. Here, I made use of the <code class="notranslate">super</code> class to give the trick that I think could solve the following issue.</p> <p dir="auto">Because we are overwriting the <code class="notranslate">sample_indices</code>, <code class="notranslate">_get_tag</code> is failing due to what is currently considered as an inconsistent update of the tags dictionary:</p> <div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-31-5558b1aebfa8&gt; in &lt;module&gt; ----&gt; 1 _safe_tags(xx, 'sample_indices') ~/Documents/packages/scikit-learn/sklearn/utils/estimator_checks.py in _safe_tags(estimator, key) 68 if hasattr(estimator, &quot;_get_tags&quot;): 69 if key is not None: ---&gt; 70 return estimator._get_tags().get(key, _DEFAULT_TAGS[key]) 71 tags = estimator._get_tags() 72 return {key: tags.get(key, _DEFAULT_TAGS[key]) ~/Documents/packages/scikit-learn/sklearn/base.py in _get_tags(self) 320 if hasattr(self, '_more_tags'): 321 more_tags = self._more_tags() --&gt; 322 collected_tags = _update_if_consistent(collected_tags, more_tags) 323 tags = _DEFAULT_TAGS.copy() 324 tags.update(collected_tags) ~/Documents/packages/scikit-learn/sklearn/base.py in _update_if_consistent(dict1, dict2) 132 if dict1[key] != dict2[key]: 133 raise TypeError(&quot;Inconsistent values for tag {}: {} != {}&quot;.format( --&gt; 134 key, dict1[key], dict2[key] 135 )) 136 dict1.update(dict2) TypeError: Inconsistent values for tag sample_indices: True != False"><pre class="notranslate">--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-31-5558b1aebfa8&gt; in &lt;module&gt; ----&gt; 1 _safe_tags(xx, 'sample_indices') ~/Documents/packages/scikit-learn/sklearn/utils/estimator_checks.py in _safe_tags(estimator, key) <span class="pl-c1">68</span> <span class="pl-k">if</span> <span class="pl-c1">hasattr</span>(estimator, <span class="pl-s"><span class="pl-pds">"</span>_get_tags<span class="pl-pds">"</span></span>): <span class="pl-c1">69</span> <span class="pl-k">if</span> key <span class="pl-k">is</span> <span class="pl-k">not</span> <span class="pl-c1">None</span>: ---&gt; 70 return estimator._get_tags().get(key, _DEFAULT_TAGS[key]) <span class="pl-c1">71</span> tags <span class="pl-k">=</span> estimator._get_tags() <span class="pl-c1">72</span> <span class="pl-k">return</span> {key: tags.get(key, <span class="pl-c1">_DEFAULT_TAGS</span>[key]) ~/Documents/packages/scikit-learn/sklearn/base.py in _get_tags(self) <span class="pl-c1">320</span> <span class="pl-k">if</span> <span class="pl-c1">hasattr</span>(<span class="pl-c1">self</span>, <span class="pl-s"><span class="pl-pds">'</span>_more_tags<span class="pl-pds">'</span></span>): <span class="pl-c1">321</span> more_tags <span class="pl-k">=</span> <span class="pl-c1">self</span>._more_tags() --&gt; 322 collected_tags = _update_if_consistent(collected_tags, more_tags) <span class="pl-c1">323</span> tags <span class="pl-k">=</span> <span class="pl-c1">_DEFAULT_TAGS</span>.copy() <span class="pl-c1">324</span> tags.update(collected_tags) ~/Documents/packages/scikit-learn/sklearn/base.py in _update_if_consistent(dict1, dict2) <span class="pl-c1">132</span> <span class="pl-k">if</span> dict1[key] <span class="pl-k">!=</span> dict2[key]: <span class="pl-c1">133</span> <span class="pl-k">raise</span> <span class="pl-c1">TypeError</span>(<span class="pl-s"><span class="pl-pds">"</span>Inconsistent values for tag <span class="pl-c1">{}</span>: <span class="pl-c1">{}</span> != <span class="pl-c1">{}</span><span class="pl-pds">"</span></span>.format( --&gt; 134 key, dict1[key], dict2[key] <span class="pl-c1">135</span> )) <span class="pl-c1">136</span> dict1.update(dict2) <span class="pl-en">TypeError</span>: <span class="pl-s">Inconsistent values for tag sample_indices: True != False</span></pre></div> <p dir="auto">Without the call of <code class="notranslate">super()</code>, I find this rule quite meaningful and the error raising a good thing. However, I think that we could lift this rule in case where we call <code class="notranslate">super()</code> in <code class="notranslate">self._more_tag</code>. By calling <code class="notranslate">super()</code>, one should be aware of overwriting the base-class default tag.</p> <p dir="auto">Thus, by introspecting <code class="notranslate">self._more_tag</code> and check that <code class="notranslate">super()</code> is called (e.g. using <code class="notranslate">'super' in inspect.getclosurevars(self._more_tags).builtins</code>), we could still allow to update the tags.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/amueller/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/amueller">@amueller</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rth/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rth">@rth</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a> Do you think that it is use case and a solution which make sense. I still have the option to add a <code class="notranslate">_more_tag</code> to each classes but this is a lot of duplicated code then.</p> <p dir="auto">So the changes would be something like the following:</p> <div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-def _update_if_consistent(dict1, dict2): +def _update_if_consistent(dict1, dict2, force=False): common_keys = set(dict1.keys()).intersection(dict2.keys()) - for key in common_keys: - if dict1[key] != dict2[key]: - raise TypeError(&quot;Inconsistent values for tag {}: {} != {}&quot;.format( - key, dict1[key], dict2[key] - )) + if not force: + for key in common_keys: + if dict1[key] != dict2[key]: + raise TypeError(&quot;Inconsistent values for tag {}: {} != {}&quot; + .format(key, dict1[key], dict2[key])) dict1.update(dict2) return dict1 @@ -319,7 +319,10 @@ class BaseEstimator: more_tags) if hasattr(self, '_more_tags'): more_tags = self._more_tags() - collected_tags = _update_if_consistent(collected_tags, more_tags) + force = 'super' in inspect.getclosurevars(self._more_tags).builtins + collected_tags = _update_if_consistent( + collected_tags, more_tags, force=force + ) tags = _DEFAULT_TAGS.copy() tags.update(collected_tags) return tags"><pre class="notranslate"><span class="pl-md"><span class="pl-md">-</span>def _update_if_consistent(dict1, dict2):</span> <span class="pl-mi1"><span class="pl-mi1">+</span>def _update_if_consistent(dict1, dict2, force=False):</span> common_keys = set(dict1.keys()).intersection(dict2.keys()) <span class="pl-md"><span class="pl-md">-</span> for key in common_keys:</span> <span class="pl-md"><span class="pl-md">-</span> if dict1[key] != dict2[key]:</span> <span class="pl-md"><span class="pl-md">-</span> raise TypeError("Inconsistent values for tag {}: {} != {}".format(</span> <span class="pl-md"><span class="pl-md">-</span> key, dict1[key], dict2[key]</span> <span class="pl-md"><span class="pl-md">-</span> ))</span> <span class="pl-mi1"><span class="pl-mi1">+</span> if not force:</span> <span class="pl-mi1"><span class="pl-mi1">+</span> for key in common_keys:</span> <span class="pl-mi1"><span class="pl-mi1">+</span> if dict1[key] != dict2[key]:</span> <span class="pl-mi1"><span class="pl-mi1">+</span> raise TypeError("Inconsistent values for tag {}: {} != {}"</span> <span class="pl-mi1"><span class="pl-mi1">+</span> .format(key, dict1[key], dict2[key]))</span> dict1.update(dict2) return dict1 <span class="pl-mdr">@@ -319,7 +319,10 @@</span> class BaseEstimator: more_tags) if hasattr(self, '_more_tags'): more_tags = self._more_tags() <span class="pl-md"><span class="pl-md">-</span> collected_tags = _update_if_consistent(collected_tags, more_tags)</span> <span class="pl-mi1"><span class="pl-mi1">+</span> force = 'super' in inspect.getclosurevars(self._more_tags).builtins</span> <span class="pl-mi1"><span class="pl-mi1">+</span> collected_tags = _update_if_consistent(</span> <span class="pl-mi1"><span class="pl-mi1">+</span> collected_tags, more_tags, force=force</span> <span class="pl-mi1"><span class="pl-mi1">+</span> )</span> tags = _DEFAULT_TAGS.copy() tags.update(collected_tags) return tags</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">win_updates</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version ansible 2.4.0 (devel bfdf85e002) last updated 2017/07/26 15:31:51 (GMT -500) config file = None configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible python version = 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]"><pre class="notranslate"><code class="notranslate">$ ansible --version ansible 2.4.0 (devel bfdf85e002) last updated 2017/07/26 15:31:51 (GMT -500) config file = None configured module search path = [u'/Users/tanner/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Users/tanner/projects/ansible.git/ansible/lib/ansible executable location = /Users/tanner/projects/ansible.git/ansible/bin/ansible python version = 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Management host macOS 10.12.5<br> Managed host Windows 7</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">win_updates fails with "error": "Exception from HRESULT: 0x8024402C",</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Window updates win_updates: category_names: - SecurityUpdates - CriticalUpdates - UpdateRollups register: updates "><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Window updates</span> <span class="pl-ent">win_updates</span>: <span class="pl-ent">category_names</span>: - <span class="pl-s">SecurityUpdates</span> - <span class="pl-s">CriticalUpdates</span> - <span class="pl-s">UpdateRollups</span> <span class="pl-ent">register</span>: <span class="pl-s">updates </span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Window updates would be applied for the category_names</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto"><a href="https://gist.github.com/basictheprogram/ccf2109f854d7f64658bbbe556108e93">https://gist.github.com/basictheprogram/ccf2109f854d7f64658bbbe556108e93</a></p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">Module: win_updates</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0 config file = /opt/uss/ansible/config/2.2.1.cfg configured module search path = ['/usr/share/ansible']"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0 config file = /opt/uss/ansible/config/2.2.1.cfg configured module search path = ['/usr/share/ansible'] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">No special configuration options.</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">FROM: RHEL7<br> TO: MS Windows Server 2012 R2 Standard</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto"><code class="notranslate">win_updates</code> module fails to complete.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ansible -m win_updates -a &quot;state=search log_path=e:Scripts/ansible_win_updates.log&quot; -i inventory WindowsHosts.inv jumphost --tree out/ -vvv"><pre class="notranslate"><span class="pl-s">ansible -m win_updates -a "state=search log_path=e:Scripts/ansible_win_updates.log" -i inventory WindowsHosts.inv jumphost --tree out/ -vvv</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Successful module run</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="jumphost | FAILED! =&gt; { &quot;changed&quot;: false, &quot;error&quot;: &quot;Exception from HRESULT: 0x80244019&quot;, &quot;failed&quot;: true, &quot;invocation&quot;: { &quot;module_name&quot;: &quot;win_updates&quot; }, &quot;location&quot;: &quot;at DoWindowsUpdate, &lt;No file&gt;: line 72\r\nat &lt;ScriptBlock&gt;, &lt;No file&gt;: line 222&quot; }"><pre class="notranslate"><code class="notranslate">jumphost | FAILED! =&gt; { "changed": false, "error": "Exception from HRESULT: 0x80244019", "failed": true, "invocation": { "module_name": "win_updates" }, "location": "at DoWindowsUpdate, &lt;No file&gt;: line 72\r\nat &lt;ScriptBlock&gt;, &lt;No file&gt;: line 222" } </code></pre></div> <p dir="auto">I was able to grab the <code class="notranslate">ps1</code> script that it had tried to run, and here are the lines where it appears to have errored out:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Function DoWindowsUpdate { Param( [string[]]$category_names=@(&quot;CriticalUpdates&quot;,&quot;SecurityUpdates&quot;,&quot;UpdateRollups&quot;), [ValidateSet(&quot;installed&quot;, &quot;searched&quot;)] [string]$state=&quot;installed&quot;, [bool]$_ansible_check_mode=$false ) $is_check_mode = $($state -eq &quot;searched&quot;) -or $_ansible_check_mode $category_guids = $category_names | % { MapCategoryNameToGUID $_ } $update_status = @{ changed = $false } Write-DebugLog &quot;Creating Windows Update session...&quot; $session = New-Object -ComObject Microsoft.Update.Session Write-DebugLog &quot;Create Windows Update searcher...&quot; $searcher = $session.CreateUpdateSearcher() # OR is only allowed at the top-level, so we have to repeat base criteria inside # FUTURE: change this to client-side filtered? $criteriabase = &quot;IsInstalled = 0&quot; $criteria_list = $category_guids | % { &quot;($criteriabase AND CategoryIDs contains '$_')&quot; } $criteria = [string]::Join(&quot; OR &quot;, $criteria_list) Write-DebugLog &quot;Search criteria: $criteria&quot; Write-DebugLog &quot;Searching for updates to install in category IDs $category_guids...&quot; $searchresult = $searcher.Search($criteria) Write-DebugLog &quot;Creating update collection...&quot;"><pre class="notranslate"><code class="notranslate">Function DoWindowsUpdate { Param( [string[]]$category_names=@("CriticalUpdates","SecurityUpdates","UpdateRollups"), [ValidateSet("installed", "searched")] [string]$state="installed", [bool]$_ansible_check_mode=$false ) $is_check_mode = $($state -eq "searched") -or $_ansible_check_mode $category_guids = $category_names | % { MapCategoryNameToGUID $_ } $update_status = @{ changed = $false } Write-DebugLog "Creating Windows Update session..." $session = New-Object -ComObject Microsoft.Update.Session Write-DebugLog "Create Windows Update searcher..." $searcher = $session.CreateUpdateSearcher() # OR is only allowed at the top-level, so we have to repeat base criteria inside # FUTURE: change this to client-side filtered? $criteriabase = "IsInstalled = 0" $criteria_list = $category_guids | % { "($criteriabase AND CategoryIDs contains '$_')" } $criteria = [string]::Join(" OR ", $criteria_list) Write-DebugLog "Search criteria: $criteria" Write-DebugLog "Searching for updates to install in category IDs $category_guids..." $searchresult = $searcher.Search($criteria) Write-DebugLog "Creating update collection..." </code></pre></div> <p dir="auto">And the relevant lines from the error log:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2017-06-08 11:29:31Z Arguments: System.Collections.Hashtable | out-string 2017-06-08 11:29:32Z OS Version: Major Minor Build Revision ----- ----- ----- -------- 6 3 9600 0 2017-06-08 11:29:32Z Running as user: JUMPHOST\ansible_boot 2017-06-08 11:29:32Z Powershell version: Name Value ---- ----- PSVersion 5.0.10586.117 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.10586.117 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 2017-06-08 11:29:32Z Starting scheduled job with args: Name Value ---- ----- _ansible_debug False _ansible_version 2.2.1.0 _ansible_diff False _ansible_syslog_facility LOG_USER _ansible_check_mode False _ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs} _ansible_module_name win_updates state searched log_path e:/Scripts/ansible_win_updates.log _ansible_no_log False _ansible_verbosity 3 2017-06-08 11:29:32Z Registering scheduled job with args Name Value ---- ----- ScheduledJobOption {RunElevated} ArgumentList {System.Collections.Hashtable} InitializationScript ... Name ansible-win-updates ScriptBlock ... ErrorAction Stop 2017-06-08 11:29:32Z Starting scheduled job (PS4 method) 2017-06-08 11:29:32Z Waiting for job completion... 2017-06-08 11:29:34Z Scheduled job started with boundparms Name Value ---- ----- _ansible_debug False _ansible_version 2.2.1.0 _ansible_diff False _ansible_syslog_facility LOG_USER _ansible_check_mode False _ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs} _ansible_module_name win_updates state searched log_path e:/Scripts/ansible_win_updates.log _ansible_no_log False _ansible_verbosity 3 and unboundargs 2017-06-08 11:29:34Z Creating Windows Update session... 2017-06-08 11:29:34Z Create Windows Update searcher... 2017-06-08 11:29:34Z Search criteria: (IsInstalled = 0 AND CategoryIDs contains 'E6CF1350-C01B-414D-A61F-263D14D133B4') OR (IsInstalled = 0 AND CategoryIDs contains '0FA1201D-4330-4FA8-8AE9-B877473B6441') OR (IsInstalled = 0 AND CategoryIDs contains '28BC880E-0592-4CBF-8F95-C79B17911D5F') 2017-06-08 11:29:34Z Searching for updates to install in category IDs E6CF1350-C01B-414D-A61F-263D14D133B4 0FA1201D-4330-4FA8-8AE9-B877473B6441 28BC880E-0592-4CBF-8F95-C79B17911D5F... 2017-06-08 11:29:34Z Fatal exception: Exception from HRESULT: 0x80244019 at at DoWindowsUpdate, &lt;No file&gt;: line 72 at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 222 2017-06-08 11:29:35Z Scheduled job completed with output: Name Value ---- ----- error Exception from HRESULT: 0x80244019 location at DoWindowsUpdate, &lt;No file&gt;: line 72... failed True ```"><pre class="notranslate"><code class="notranslate">2017-06-08 11:29:31Z Arguments: System.Collections.Hashtable | out-string 2017-06-08 11:29:32Z OS Version: Major Minor Build Revision ----- ----- ----- -------- 6 3 9600 0 2017-06-08 11:29:32Z Running as user: JUMPHOST\ansible_boot 2017-06-08 11:29:32Z Powershell version: Name Value ---- ----- PSVersion 5.0.10586.117 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.10586.117 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 2017-06-08 11:29:32Z Starting scheduled job with args: Name Value ---- ----- _ansible_debug False _ansible_version 2.2.1.0 _ansible_diff False _ansible_syslog_facility LOG_USER _ansible_check_mode False _ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs} _ansible_module_name win_updates state searched log_path e:/Scripts/ansible_win_updates.log _ansible_no_log False _ansible_verbosity 3 2017-06-08 11:29:32Z Registering scheduled job with args Name Value ---- ----- ScheduledJobOption {RunElevated} ArgumentList {System.Collections.Hashtable} InitializationScript ... Name ansible-win-updates ScriptBlock ... ErrorAction Stop 2017-06-08 11:29:32Z Starting scheduled job (PS4 method) 2017-06-08 11:29:32Z Waiting for job completion... 2017-06-08 11:29:34Z Scheduled job started with boundparms Name Value ---- ----- _ansible_debug False _ansible_version 2.2.1.0 _ansible_diff False _ansible_syslog_facility LOG_USER _ansible_check_mode False _ansible_selinux_special_fs {fuse, nfs, vboxsf, ramfs} _ansible_module_name win_updates state searched log_path e:/Scripts/ansible_win_updates.log _ansible_no_log False _ansible_verbosity 3 and unboundargs 2017-06-08 11:29:34Z Creating Windows Update session... 2017-06-08 11:29:34Z Create Windows Update searcher... 2017-06-08 11:29:34Z Search criteria: (IsInstalled = 0 AND CategoryIDs contains 'E6CF1350-C01B-414D-A61F-263D14D133B4') OR (IsInstalled = 0 AND CategoryIDs contains '0FA1201D-4330-4FA8-8AE9-B877473B6441') OR (IsInstalled = 0 AND CategoryIDs contains '28BC880E-0592-4CBF-8F95-C79B17911D5F') 2017-06-08 11:29:34Z Searching for updates to install in category IDs E6CF1350-C01B-414D-A61F-263D14D133B4 0FA1201D-4330-4FA8-8AE9-B877473B6441 28BC880E-0592-4CBF-8F95-C79B17911D5F... 2017-06-08 11:29:34Z Fatal exception: Exception from HRESULT: 0x80244019 at at DoWindowsUpdate, &lt;No file&gt;: line 72 at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 222 2017-06-08 11:29:35Z Scheduled job completed with output: Name Value ---- ----- error Exception from HRESULT: 0x80244019 location at DoWindowsUpdate, &lt;No file&gt;: line 72... failed True ``` </code></pre></div>
1
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>For English only</strong>, other languages will not accept.</p> <p dir="auto">Before report a bug, make sure you have:</p> <ul dir="auto"> <li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li> <li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li> </ul> <p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br> If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p> <p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">ShardingSphere-4.0.1</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">Sharding-jdbc</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Don't match column is upper or lower case.</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">throw error.</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">upper and lower case.<br> The issue like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="629210826" data-permission-text="Title is private" data-url="https://github.com/apache/shardingsphere/issues/5893" data-hovercard-type="issue" data-hovercard-url="/apache/shardingsphere/issues/5893/hovercard" href="https://github.com/apache/shardingsphere/issues/5893">#5893</a></p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="spring: shardingsphere: sharding: encrypt-rule: tables: t_order: columns: phone: encryptor: encryptor_aes_salt plainColumn: PHONE assistedQueryColumn: PHONE_ASSISTED cipherColumn: PHONE_CIPHER"><pre class="notranslate"><code class="notranslate">spring: shardingsphere: sharding: encrypt-rule: tables: t_order: columns: phone: encryptor: encryptor_aes_salt plainColumn: PHONE assistedQueryColumn: PHONE_ASSISTED cipherColumn: PHONE_CIPHER </code></pre></div> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>For English only</strong>, other languages will not accept.</p> <p dir="auto">Before report a bug, make sure you have:</p> <ul dir="auto"> <li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li> <li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li> </ul> <p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br> If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p> <p dir="auto">Please answer these questions before submitting your issue. Thanks!</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">5.1.2</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">proxy</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">I use custom algorithm in shardingsphere-proxy, the version is 5.1.2 ,and config is :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="schemaName: orders dataSources: db_0: url: jdbc:mysql://127.0.0.1:3306/db_0?serverTimezone=Asia/Shanghai&amp;useSSL=false username: root password: 123456 connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 50 minPoolSize: 10 db_1: url: jdbc:mysql://127.0.0.1:3306/db_1?serverTimezone=Asia/Shanghai&amp;useSSL=false username: root password: 123456 connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 50 minPoolSize: 10 rules: - !SHARDING tables: t_order: actualDataNodes: db_${0..1}.t_order_${0..3} tableStrategy: standard: shardingColumn: user_id shardingAlgorithmName: t_order_inline defaultDatabaseStrategy: standard: shardingColumn: order_id shardingAlgorithmName: db_modulo defaultTableStrategy: none: shardingAlgorithms: db_modulo: type: CUSTOM_SHARD t_order_inline: type: INLINE props: algorithm-expression: t_order_${user_id % 2}"><pre class="notranslate"><code class="notranslate">schemaName: orders dataSources: db_0: url: jdbc:mysql://127.0.0.1:3306/db_0?serverTimezone=Asia/Shanghai&amp;useSSL=false username: root password: 123456 connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 50 minPoolSize: 10 db_1: url: jdbc:mysql://127.0.0.1:3306/db_1?serverTimezone=Asia/Shanghai&amp;useSSL=false username: root password: 123456 connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 50 minPoolSize: 10 rules: - !SHARDING tables: t_order: actualDataNodes: db_${0..1}.t_order_${0..3} tableStrategy: standard: shardingColumn: user_id shardingAlgorithmName: t_order_inline defaultDatabaseStrategy: standard: shardingColumn: order_id shardingAlgorithmName: db_modulo defaultTableStrategy: none: shardingAlgorithms: db_modulo: type: CUSTOM_SHARD t_order_inline: type: INLINE props: algorithm-expression: t_order_${user_id % 2} </code></pre></div> <p dir="auto">my MySQL version is 5.6.48; create table sql:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="create database db_0; CREATE TABLE `t_order_0` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `status` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `t_order_1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `status` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; create database db_1; ..."><pre class="notranslate"><code class="notranslate">create database db_0; CREATE TABLE `t_order_0` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `status` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `t_order_1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `status` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; create database db_1; ... </code></pre></div> <p dir="auto">my custom algorithm code</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public class CustomShardingDbAlgorithm implements StandardShardingAlgorithm&lt;Long&gt; { @Override public String doSharding(Collection&lt;String&gt; availableTargetNames, PreciseShardingValue&lt;Long&gt; preciseShardingValue) { Long shardCol = preciseShardingValue.getValue(); return null; } @Override public String getType() { return &quot;CUSTOM_SHARD&quot;; } }"><pre class="notranslate"><code class="notranslate">public class CustomShardingDbAlgorithm implements StandardShardingAlgorithm&lt;Long&gt; { @Override public String doSharding(Collection&lt;String&gt; availableTargetNames, PreciseShardingValue&lt;Long&gt; preciseShardingValue) { Long shardCol = preciseShardingValue.getValue(); return null; } @Override public String getType() { return "CUSTOM_SHARD"; } } </code></pre></div> <p dir="auto">then I use navicat connect to sharding-proxy. Insert data using the SQL as follows</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSERT INTO `t_order` ( `order_id`, `user_id`, `status`) VALUES ( 100000 ,100000, 'test'); "><pre class="notranslate"><code class="notranslate">INSERT INTO `t_order` ( `order_id`, `user_id`, `status`) VALUES ( 100000 ,100000, 'test'); </code></pre></div> <p dir="auto">Exception occurred.</p> <h3 dir="auto">Actual behavior</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ERROR] 2022-07-08 17:21:52.112 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at com.yuanian.shard.config.algorithm.CustomShardingDbAlgorithm.doSharding(CustomShardingDbAlgorithm.java:29) at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:83) at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:71) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeDataSources(ShardingStandardRoutingEngine.java:218) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route0(ShardingStandardRoutingEngine.java:206) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(ShardingStandardRoutingEngine.java:127) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditions(ShardingStandardRoutingEngine.java:117) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.getDataNodes(ShardingStandardRoutingEngine.java:94) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:70) at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:58) at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:45) at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:69) at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:55) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:58) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:47) at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:127) at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:73) at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:61) at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:103) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:116) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:81) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) "><pre class="notranslate"><code class="notranslate">[ERROR] 2022-07-08 17:21:52.112 [ShardingSphere-Command-0] o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at com.yuanian.shard.config.algorithm.CustomShardingDbAlgorithm.doSharding(CustomShardingDbAlgorithm.java:29) at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:83) at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:71) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeDataSources(ShardingStandardRoutingEngine.java:218) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route0(ShardingStandardRoutingEngine.java:206) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(ShardingStandardRoutingEngine.java:127) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditions(ShardingStandardRoutingEngine.java:117) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.getDataNodes(ShardingStandardRoutingEngine.java:94) at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:70) at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:58) at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:45) at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:69) at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:55) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:58) at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:47) at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:127) at org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:73) at org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:61) at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:103) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:116) at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:81) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) </code></pre></div> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">I think the exception happened here:<code class="notranslate">SQLVisitorEngine# visit(ParseASTNode)</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" public &lt;T&gt; T visit(final ParseASTNode parseASTNode) { ParseTreeVisitor&lt;T&gt; visitor = SQLVisitorFactory.newInstance(databaseType, visitorType, SQLVisitorRule.valueOf(parseASTNode.getRootNode().getClass()), props); T result = parseASTNode.getRootNode().accept(visitor); if (isParseComment) { appendSQLComments(parseASTNode, result); } return result; }"><pre class="notranslate"><code class="notranslate"> public &lt;T&gt; T visit(final ParseASTNode parseASTNode) { ParseTreeVisitor&lt;T&gt; visitor = SQLVisitorFactory.newInstance(databaseType, visitorType, SQLVisitorRule.valueOf(parseASTNode.getRootNode().getClass()), props); T result = parseASTNode.getRootNode().accept(visitor); if (isParseComment) { appendSQLComments(parseASTNode, result); } return result; } </code></pre></div> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <p dir="auto">server.yaml</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mode: type: Cluster repository: type: ZooKeeper props: namespace: governance_local server-lists: zkserver1:2181 retryIntervalMilliseconds: 600 timeToLiveSeconds: 1500 maxRetries: 3 overwrite: false rules: - !AUTHORITY users: - root@%:root - sharding@:sharding provider: type: ALL_PRIVILEGES_PERMITTED - !TRANSACTION defaultType: LOCAL props: max-connections-size-per-query: 5 # 每次查询的最大连接消耗数 kernel-executor-size: 16 proxy-frontend-flush-threshold: 128 proxy-opentracing-enabled: false proxy-hint-enabled: false sql-show: false check-table-metadata-enabled: false show-process-list-enabled: false proxy-backend-query-fetch-size: -1 check-duplicate-table-enabled: false proxy-frontend-executor-size: 0 proxy-backend-executor-suitable: OLAP proxy-frontend-max-connections: 0 sql-federation-enabled: false proxy-backend-driver-type: JDBC proxy-mysql-default-version: 5.6.48"><pre class="notranslate"><code class="notranslate">mode: type: Cluster repository: type: ZooKeeper props: namespace: governance_local server-lists: zkserver1:2181 retryIntervalMilliseconds: 600 timeToLiveSeconds: 1500 maxRetries: 3 overwrite: false rules: - !AUTHORITY users: - root@%:root - sharding@:sharding provider: type: ALL_PRIVILEGES_PERMITTED - !TRANSACTION defaultType: LOCAL props: max-connections-size-per-query: 5 # 每次查询的最大连接消耗数 kernel-executor-size: 16 proxy-frontend-flush-threshold: 128 proxy-opentracing-enabled: false proxy-hint-enabled: false sql-show: false check-table-metadata-enabled: false show-process-list-enabled: false proxy-backend-query-fetch-size: -1 check-duplicate-table-enabled: false proxy-frontend-executor-size: 0 proxy-backend-executor-suitable: OLAP proxy-frontend-max-connections: 0 sql-federation-enabled: false proxy-backend-driver-type: JDBC proxy-mysql-default-version: 5.6.48 </code></pre></div> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
0
<p dir="auto">Example: <a href="http://getbootstrap.com/javascript/#modals" rel="nofollow">http://getbootstrap.com/javascript/#modals</a></p> <ol dir="auto"> <li>Click "launch demo modal"</li> <li>Close window by clicking X</li> <li>Click "launch demo modal" again</li> <li>Close window by clicking at black page area</li> <li>Click "launch demo modal" again</li> <li>Close window by clicking X and see bug</li> </ol> <p dir="auto">Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0</p>
<p dir="auto">Hi,</p> <p dir="auto">The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.</p> <p dir="auto">I am checking on source code line 932, if I commented out this line then it is working again.</p> <p dir="auto">this.$element<br> .removeClass('in')<br> .attr('aria-hidden', true)<br> //.off('click.dismiss.modal')</p> <p dir="auto">Am I missing anything...?</p> <p dir="auto">Sorry for the grammar. Thanks.</p>
1
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">The recent transmission framebuffer is awesome 🎉 but I ran into a couple issues:</p> <ul dir="auto"> <li>The aspect ratio of the transmission framebuffer is uncoupled from the current render target, creating x / y warping dependent on viewing dimensions</li> <li>Nearest sampling is used for magnification which creates visual artefacts but there's no obvious motivation for Nearest over Linear here</li> </ul> <p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/431baa0a0e808637df959aa547c98e0b2380bdbe/src/renderers/WebGLRenderer.js#L1189">Relevant part of three.js source</a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="_transmissionRenderTarget = new renderTargetType( 1024, 1024, { generateMipmaps: true, type: utils.convert( HalfFloatType ) !== null ? HalfFloatType : UnsignedByteType, minFilter: LinearMipmapLinearFilter, magFilter: NearestFilter, wrapS: ClampToEdgeWrapping, wrapT: ClampToEdgeWrapping } );"><pre class="notranslate"><span class="pl-s1">_transmissionRenderTarget</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-s1">renderTargetType</span><span class="pl-kos">(</span> <span class="pl-c1">1024</span><span class="pl-kos">,</span> <span class="pl-c1">1024</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">generateMipmaps</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">type</span>: <span class="pl-s1">utils</span><span class="pl-kos">.</span><span class="pl-en">convert</span><span class="pl-kos">(</span> <span class="pl-v">HalfFloatType</span> <span class="pl-kos">)</span> <span class="pl-c1">!==</span> <span class="pl-c1">null</span> ? <span class="pl-v">HalfFloatType</span> : <span class="pl-v">UnsignedByteType</span><span class="pl-kos">,</span> <span class="pl-c1">minFilter</span>: <span class="pl-v">LinearMipmapLinearFilter</span><span class="pl-kos">,</span> <span class="pl-c1">magFilter</span>: <span class="pl-v">NearestFilter</span><span class="pl-kos">,</span> <span class="pl-c1">wrapS</span>: <span class="pl-v">ClampToEdgeWrapping</span><span class="pl-kos">,</span> <span class="pl-c1">wrapT</span>: <span class="pl-v">ClampToEdgeWrapping</span> <span class="pl-kos">}</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Current three.js</strong><br> Here we render scattered Points within a refractive sphere, notice the asymmetrical refraction pattern in the lower image and hard pixel edges in both<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3742992/138747728-e81cc880-2fae-40c7-9823-2ed2f7e7987a.jpg"><img src="https://user-images.githubusercontent.com/3742992/138747728-e81cc880-2fae-40c7-9823-2ed2f7e7987a.jpg" alt="Screenshot 2021-10-25 at 19 00 13" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3742992/138747735-529ed6ea-30ab-4e4a-a932-be391c1267fb.jpg"><img src="https://user-images.githubusercontent.com/3742992/138747735-529ed6ea-30ab-4e4a-a932-be391c1267fb.jpg" alt="Screenshot 2021-10-25 at 19 00 20" style="max-width: 100%;"></a></p> <p dir="auto"><strong>After correcting</strong><br> Here we use Linear sample and couple the transmission framebuffer's resolution to the viewing resolution. Refraction patterns are now symmetrical and the hard pixel edges are resolved</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3742992/138748059-d924b62b-c52c-493a-a780-3a2797ee6c64.jpg"><img src="https://user-images.githubusercontent.com/3742992/138748059-d924b62b-c52c-493a-a780-3a2797ee6c64.jpg" alt="Screenshot 2021-10-25 at 19 01 45" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3742992/138748069-3b863319-27f8-4bec-86c2-767a4c114eac.jpg"><img src="https://user-images.githubusercontent.com/3742992/138748069-3b863319-27f8-4bec-86c2-767a4c114eac.jpg" alt="Screenshot 2021-10-25 at 19 02 18" style="max-width: 100%;"></a></p> <p dir="auto"><strong>To Reproduce</strong></p> <ul dir="auto"> <li>Use a refracting material with roughness set to 0 (or close 0) and IOR greater than 1</li> <li>Notice the refraction effect has dimension dependence</li> <li>Notice hard pixel edges where refraction scales up</li> </ul> <p dir="auto"><em><strong>Code</strong></em><br> Example material</p> <div class="highlight highlight-source-hx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new MeshPhysicalMaterial({ roughness: 0.0, color: 0xffffff, transmission: 0.9, attenuationTint: new Color(0x59ff), attenuationDistance: 1.7, clearcoat: 0.9 })"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-en">MeshPhysicalMaterial</span>({ <span class="pl-smi">roughness</span>: <span class="pl-c1">0.0</span>, <span class="pl-smi">color</span>: <span class="pl-c1">0xffffff</span>, <span class="pl-smi">transmission</span>: <span class="pl-c1">0.9</span>, <span class="pl-smi">attenuationTint</span>: <span class="pl-k">new</span> <span class="pl-en">Color</span>(<span class="pl-c1">0x59ff</span>), <span class="pl-smi">attenuationDistance</span>: <span class="pl-c1">1.7</span>, <span class="pl-smi">clearcoat</span>: <span class="pl-c1">0.9</span> })</pre></div> <p dir="auto"><em><strong>Live example</strong></em></p> <p dir="auto">Example above, click "Fix Transmission" to toggle my fix<br> <a href="https://threejs-issue-22729.netlify.app" rel="nofollow">https://threejs-issue-22729.netlify.app</a></p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Transmission should be independent of viewing dimensions and use Linear filtering for magnification</p> <p dir="auto"><strong>Suggested fix</strong></p> <p dir="auto">The dimension issue has 2 complexities</p> <ul dir="auto"> <li>WebGL1 requires power-of-two dimensions for mipmapping</li> <li>Different passes may require different transmission texture dimensions, requiring some level of texture management</li> </ul> <p dir="auto">Both these issues can be solved fully but introduce complexity to the three.js codebase. Instead, if we expose creation of transmission textures to the user, they can handle this to suit their needs</p> <p dir="auto">For example: <a href="https://github.com/haxiomic/three.js-refraction/blob/f90ec8e27b61f0be4974c0da2f15f8789dc5336f/src/Main.hx#L60">https://github.com/haxiomic/three.js-refraction/blob/f90ec8e27b61f0be4974c0da2f15f8789dc5336f/src/Main.hx#L60</a></p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: All</li> <li>OS: All</li> <li>Browser: All</li> <li>Three.js version: [dev, r133.1]</li> </ul>
<p dir="auto">Reposting <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="778246160" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/21000" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/21000/hovercard?comment_id=862597968&amp;comment_type=issue_comment" href="https://github.com/mrdoob/three.js/issues/21000#issuecomment-862597968">#21000 (comment)</a> so as to consolidate some remaining issues.</p> <ol dir="auto"> <li> <p dir="auto"><code class="notranslate">webgl_loader_gltf_transmission</code> has the <code class="notranslate">transparent</code> property of each sphere to set to <code class="notranslate">false</code>. Is that what the loader should be doing? What should <code class="notranslate">transparent</code> be set to when <code class="notranslate">transmission</code> is non-zero?</p> </li> <li> <p dir="auto">After setting <code class="notranslate">transparent</code> to <code class="notranslate">true</code>, only front-faces show the hot-spot. (This may be a known limitation, but <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrdoob/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mrdoob">@mrdoob</a> just added support for properly rendering back-faces of double-sided meshes.) There should be two hot-spots.</p> </li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1000017/122269153-e4018880-ceaa-11eb-8e14-65e9c56f8866.png"><img width="123" alt="Screen Shot 2021-06-16 at 1 53 43 PM" src="https://user-images.githubusercontent.com/1000017/122269153-e4018880-ceaa-11eb-8e14-65e9c56f8866.png" style="max-width: 100%;"></a></p> <ol start="3" dir="auto"> <li><del>FIXED: This is caused by issue 7. below.</del></li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1000017/122269137-e06e0180-ceaa-11eb-991e-6d51fd134415.png"><img width="113" alt="Screen Shot 2021-06-16 at 1 51 42 PM" src="https://user-images.githubusercontent.com/1000017/122269137-e06e0180-ceaa-11eb-991e-6d51fd134415.png" style="max-width: 100%;"></a></p> <ol start="4" dir="auto"> <li><del>FIXED Also, in Chrome and Firefox (not Safari)</del></li> </ol> <blockquote> <p dir="auto"><del>THREE.WebGLProgram: gl.getProgramInfoLog() WARNING: Output of vertex shader 'vUv' not read by fragment shader</del></p> </blockquote> <p dir="auto"><del>Transmission always sets the <code class="notranslate">USE_UV</code> flag.</del></p> <ol start="5" dir="auto"> <li><del>FIXED: If performant, I think the dimensions of the "transmission render target" should match the dimensions of the "current render target".</del> Doing so will prevent artifacts like the following:</li> </ol> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1000017/123011145-ddcd4980-d38d-11eb-9a14-6284ed3ed306.png"><img width="555" alt="Screen Shot 2021-06-21 at 9 04 34 PM" src="https://user-images.githubusercontent.com/1000017/123011145-ddcd4980-d38d-11eb-9a14-6284ed3ed306.png" style="max-width: 100%;"></a></p> <ol start="6" dir="auto"> <li><del>FIXED In the following code snippet, <code class="notranslate">transmissionFactor</code> is applied to <code class="notranslate">getIBLVolumeRefraction()</code> twice. I expect that is a physical modeling error.</del></li> </ol> <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/mrdoob/three.js/blob/dd6ab3cf310f78a8375b8b2037db12ce8e31e82c/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js#L23-L28">three.js/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js</a> </p> <p class="mb-0 color-fg-muted"> Lines 23 to 28 in <a data-pjax="true" class="commit-tease-sha" href="/mrdoob/three.js/commit/dd6ab3cf310f78a8375b8b2037db12ce8e31e82c">dd6ab3c</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="L23" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="23"></td> <td id="LC23" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> vec3 transmission = transmissionFactor * getIBLVolumeRefraction(</span> </td> </tr> <tr class="border-0"> <td id="L24" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="24"></td> <td id="LC24" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> normal, v, roughnessFactor, material.diffuseColor, totalSpecular,</span> </td> </tr> <tr class="border-0"> <td id="L25" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="25"></td> <td id="LC25" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,</span> </td> </tr> <tr class="border-0"> <td id="L26" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="26"></td> <td id="LC26" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> attenuationColor, attenuationDistance );</span> </td> </tr> <tr class="border-0"> <td id="L27" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="27"></td> <td id="LC27" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"></span> </td> </tr> <tr class="border-0"> <td id="L28" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="28"></td> <td id="LC28" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> totalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );</span> </td> </tr> </tbody></table> </div> </div> <p></p> <ol start="7" dir="auto"> <li><del>FIXED Also in the above snippet, <code class="notranslate">totalSpecular</code> has units of radiance, and therefore cannot be the correct argument because the function expects a unit-less quantity. A reasonable guess would be <code class="notranslate">material.specularColor</code>, instead.</del></li> </ol> <ul dir="auto"> <li>Device: Desktop</li> <li>OS: macOS 11.4</li> <li>Browser: Chrome, Firefox, Safari</li> <li>Three.js version: r130dev</li> </ul> <p dir="auto">/ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/takahirox/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/takahirox">@takahirox</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/donmccurdy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/donmccurdy">@donmccurdy</a></p>
1