text1
stringlengths 0
536k
| text2
stringlengths 0
536k
| label
int64 0
1
|
---|---|---|
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1931590/12581872/a957344a-c439-11e5-824b-49920f6bc255.png"><img src="https://cloud.githubusercontent.com/assets/1931590/12581872/a957344a-c439-11e5-824b-49920f6bc255.png" alt="capture" style="max-width: 100%;"></a></p> | <p dir="auto">Trying to get packages from nuget. I'm not getting intellisense in project.json. In the JSON server output window I see a lot of this:<br>
<code class="notranslate">Request to the nuget repository failed: <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code /><m:message xml:lang="en-US">URI or query string invalid. Query option 'Format' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings.</m:message></m:error></code></p>
<p dir="auto">Running OS X 10.11.3 VS Code 0.10.9-insider and 0.10.9</p> | 1 |
<p dir="auto">At the moment the scripts directory is hard coded to <code class="notranslate">scriptsDirectory = new File(env.configFile(), "scripts");</code> but it would be handy to make this configurable.<br>
Main reason is that with the Puppet module we allow multiple instances, and it would be handy that all instances on a single node can share the same directory where the scripts are located.</p> | <p dir="auto">Since dynamic scripting is off by default since elasticsearch >=1.2 (which is good!), we have to move all our scripts to files in the <code class="notranslate">config/scripts</code> folder. It would be awesome to have an option to change that folder in the config to make it easier for using different folders in different environments. Best would be to set it through ENV variables <code class="notranslate">ELASTICSEARCH_SCRIPTS_FOLDER</code> and through the config file</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="path:
logs: /var/log/elasticsearch
data: /var/data/elasticsearch
scripts: /my/custom/script/folder"><pre class="notranslate"><code class="notranslate">path:
logs: /var/log/elasticsearch
data: /var/data/elasticsearch
scripts: /my/custom/script/folder
</code></pre></div>
<p dir="auto">thanks!</p> | 1 |
<p dir="auto"><strong>Issues</strong></p>
<p dir="auto"><strong>Other Links</strong></p>
<ul dir="auto">
<li><a href="https://daveceddia.com/angular-2-errors/" rel="nofollow">https://daveceddia.com/angular-2-errors/</a></li>
<li><a href="http://www.bennadel.com/blog/3040-i-have-a-fundamental-misunderstanding-of-change-detection-in-angular-2-beta-8.htm" rel="nofollow">http://www.bennadel.com/blog/3040-i-have-a-fundamental-misunderstanding-of-change-detection-in-angular-2-beta-8.htm</a></li>
</ul> | <p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
<a href="http://stackoverflow.com/questions/42398059/angular-2-testmodulemetadata-does-not-have-an-entrycomponents-property" rel="nofollow">Here is my question on StackOverflow</a>.</p>
<p dir="auto">When using <code class="notranslate">TestBed.createTestingModule(<TemplateModuleMetadata>)</code> in my unit tests to test a service which dynamically creates and injects a component into the DOM, I am getting an error in the output of <code class="notranslate">ng test</code> as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Error: No component factory found for TestDialogComponent. Did you add it to @NgModule.entryComponents?"><pre class="notranslate"><code class="notranslate"> Error: No component factory found for TestDialogComponent. Did you add it to @NgModule.entryComponents?
</code></pre></div>
<ol dir="auto">
<li><code class="notranslate">No Component factory found for TestDialogComponent</code> and</li>
<li><code class="notranslate">Did you add it to @NgModule.entryComponents</code></li>
</ol>
<p dir="auto">The 2nd point is the problem. I cannot add the <code class="notranslate">TestDialogComponent</code> to the Testing module, because <code class="notranslate">entryComponents</code> does not exist on the <code class="notranslate">TemplateModuleMetadata</code> object.</p>
<p dir="auto">This is the following code in <code class="notranslate">test_bed.d.ts</code>, which shows that <code class="notranslate">entryComponents</code> does not exist in that type definition:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/**
* @experimental
*/
export declare type TestModuleMetadata = {
providers?: any[];
declarations?: any[];
imports?: any[];
schemas?: Array<SchemaMetadata | any[]>;
};"><pre class="notranslate"><code class="notranslate">/**
* @experimental
*/
export declare type TestModuleMetadata = {
providers?: any[];
declarations?: any[];
imports?: any[];
schemas?: Array<SchemaMetadata | any[]>;
};
</code></pre></div>
<p dir="auto">I have added the component to the <code class="notranslate">entryComponents</code> and <code class="notranslate">declarations</code> sections of the service's parent <code class="notranslate">dialog.module.ts</code>, but the tests still fail because the component hasn't actually been added to the testing module.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
The <code class="notranslate">entryComponents</code> property should be defined in the <code class="notranslate">TestModuleMetadata</code> definition. I could be wrong, but I assumed that all properties that are available in the standard angular 2 NgModule should also be available for use in the <code class="notranslate">TestModuleMetadata</code> object, so that testing modules mimic the structure of the actual application as accurately as possible. If one of my application modules relies on the ability to dynamically inject components, shouldn't I be able to replicate that functionality in my test module?</p>
<p dir="auto">**Regarding my <a href="http://stackoverflow.com/questions/42398059/angular-2-testmodulemetadata-does-not-have-an-entrycomponents-property" rel="nofollow">StackOverflow question</a>, ** I've had a recommendation to simply add the Component I'd like to add to the <code class="notranslate">entryComponents</code> property to a test module, and then import that module.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto">I've replicated the functionality of the portion of my app in question - <a href="http://plnkr.co/edit/Wk6H5s5g3cAXRdGyTuhu" rel="nofollow">View the reproduction plnkr here.</a> <strong>Please Note:</strong> I'm not sure how to actually execute a jasmine test in Plnkr as I haven't used Plnkr much. If I had more time, I'd get it up and running, but hopefully my diagnostic description can suffice.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">Having to create a whole separate module to import into my testing module doesn't align to the actual structure of my application's code. It's not clear why <code class="notranslate">entryComponents</code> is not included in the TestModuleMetadata, so it is unclear to me whether my stylistic approach to my application's structure is the problem or if it's just a simple omission to the TestModuleMetadata that can be easily implemented? To me, it seems as though the test environment should replicate my application environment as closely as possible, maybe some others agree?</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular CLI:</strong> v1.0.0-beta.32.3</li>
<li><strong>Windows:</strong> v10</li>
<li><strong>Sublime Text:</strong> v3</li>
<li><strong>NPM:</strong> v3.10.10</li>
<li><strong>Node:</strong> v6.9.5</li>
<li><strong>Typescript:</strong> ~2.0.10</li>
<li><strong>Karma:</strong> 1.2.0</li>
<li><strong>Angular version:</strong> 2.4.7</li>
</ul>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>
<ul dir="auto">
<li>
<p dir="auto">Chrome (*(Karma-chrome-launcher:** v^2.0.0)</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</p>
</li>
<li>
<p dir="auto">Typescript</p>
</li>
<li>
<p dir="auto">ES6</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
<strong>Node:</strong> v6.9.5</p>
</li>
</ul> | 0 |
<p dir="auto">Two nodes went away as I updated the instances, but they still appear and, more importantly/confusingly, their daemonset pods are still in Running state.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ fleetctl list-machines
MACHINE IP METADATA
729947b9... 10.0.12.180 role=node
a0883347... 10.0.8.4 instance=m0,role=master
$ kubectl get nodes
NAME STATUS AGE
ip-10-0-10-222.ec2.internal NotReady 2d
ip-10-0-12-147.ec2.internal NotReady 1d
ip-10-0-12-180.ec2.internal Ready 17m
ip-10-0-8-4.ec2.internal Ready,SchedulingDisabled 2d
$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system fluentd-logging-2gxb1 1/1 Running 0 1d
kube-system fluentd-logging-33y2f 1/1 Running 0 1d
kube-system fluentd-logging-b1yuv 1/1 Running 0 17m
kube-system fluentd-logging-o9hvp 1/1 Running 0 1d"><pre class="notranslate"><code class="notranslate">$ fleetctl list-machines
MACHINE IP METADATA
729947b9... 10.0.12.180 role=node
a0883347... 10.0.8.4 instance=m0,role=master
$ kubectl get nodes
NAME STATUS AGE
ip-10-0-10-222.ec2.internal NotReady 2d
ip-10-0-12-147.ec2.internal NotReady 1d
ip-10-0-12-180.ec2.internal Ready 17m
ip-10-0-8-4.ec2.internal Ready,SchedulingDisabled 2d
$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system fluentd-logging-2gxb1 1/1 Running 0 1d
kube-system fluentd-logging-33y2f 1/1 Running 0 1d
kube-system fluentd-logging-b1yuv 1/1 Running 0 17m
kube-system fluentd-logging-o9hvp 1/1 Running 0 1d
</code></pre></div>
<p dir="auto">There are only two instances and thus two daemons up, not four.<br>
I understand the rationale for not killing the pods outright, but is there a timeout after which they change state or perhaps the nodes do?</p>
<p dir="auto">My concern is twofold:</p>
<ol dir="auto">
<li><code class="notranslate">Running</code> is a lie. Things will be confusing for monitoring/accounting/troubleshooting purposes.</li>
<li>State about pods and nodes is kept around for a long time. Imagine someone using DaemonSets on a pool of EC2 spot instances...</li>
</ol> | <p dir="auto">I don't see any existing issues filed for this.</p>
<p dir="auto">Allow the user to instruct Kubernetes, based on data from liveness/readiness probes (or failures to start new pods at all), to automatically undo a rollout, not just pause it. This could even have a configurable maxFailures knob to specify how many pods in "failed after upgrade" state to allow before rolling back. Similar for pending pods.</p> | 0 |
<p dir="auto">(It is very likely an issue of V8, but)<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="802496531" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/9421" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/9421/hovercard" href="https://github.com/denoland/deno/issues/9421">#9421</a> says it should be fixed.</p>
<p dir="auto">However, I am on a newly upgraded Deno binary but it still happens.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno 1.7.5 (release, aarch64-apple-darwin)
v8 9.0.123
typescript 4.1.4"><pre class="notranslate"><code class="notranslate">deno 1.7.5 (release, aarch64-apple-darwin)
v8 9.0.123
typescript 4.1.4
</code></pre></div>
<p dir="auto">This error happens when trying to invoke a wasm module:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#
# Fatal error in , line 0
# Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).
#
#
#
#FailureMessage Object: 0x16f0547e8
==== C stack trace ===============================
0 deno 0x00000001014e7fb4 v8::base::debug::StackTrace::StackTrace() + 24
1 deno 0x00000001014ec094 v8::platform::(anonymous namespace)::PrintStackTrace() + 24
2 deno 0x00000001014e48e8 V8_Fatal(char const*, ...) + 268
3 deno 0x0000000101a63304 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) + 0
4 deno 0x0000000101a6655c v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) + 44
5 deno 0x0000000101a7483c v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) + 348
6 deno 0x0000000101a72744 v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() + 544
7 deno 0x0000000101a73e30 v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) + 464
8 deno 0x0000000101a73fb0 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) + 272
9 deno 0x0000000101643614 v8::internal::StackGuard::HandleInterrupts() + 2148
10 deno 0x000000010193f5b4 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) + 312
11 deno 0x0000000101e2aeac Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 108
12 deno 0x0000000101ec0408 Builtins_JumpLoopHandler + 200
13 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
14 deno 0x0000000101e4724c Builtins_ArrayMap + 1292
15 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
16 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
17 deno 0x0000000101df283c Builtins_AsyncFunctionAwaitResolveClosure + 92
18 deno 0x0000000101e74f9c Builtins_PromiseFulfillReactionJob + 60
19 deno 0x0000000101de5780 Builtins_RunMicrotasks + 672
20 deno 0x0000000101dc2824 Builtins_JSRunMicrotasksEntry + 164
21 deno 0x000000010161b004 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 2468
22 deno 0x000000010161b51c v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 88
23 deno 0x000000010161b5e4 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) + 64
24 deno 0x00000001016407d0 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) + 420
25 deno 0x000000010164060c v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) + 56
26 deno 0x0000000101630f88 v8::internal::Isolate::FireCallCompletedCallback(v8::internal::MicrotaskQueue*) + 72
27 deno 0x0000000101545890 v8::Promise::Resolver::Resolve(v8::Local<v8::Context>, v8::Local<v8::Value>) + 364
28 deno 0x00000001014df2a0 v8__Promise__Resolver__Resolve + 12
29 deno 0x0000000100f9efc4 deno_core::runtime::JsRuntime::dyn_import_done::h35f6587d6755a58d + 388
30 deno 0x0000000101081694 tokio::runtime::Runtime::block_on::h725c4f0b2fff3478 + 960
31 deno 0x0000000100df1e40 std::sys_common::backtrace::__rust_begin_short_backtrace::h5e70bc2b112988fa + 12"><pre class="notranslate"><code class="notranslate">#
# Fatal error in , line 0
# Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).
#
#
#
#FailureMessage Object: 0x16f0547e8
==== C stack trace ===============================
0 deno 0x00000001014e7fb4 v8::base::debug::StackTrace::StackTrace() + 24
1 deno 0x00000001014ec094 v8::platform::(anonymous namespace)::PrintStackTrace() + 24
2 deno 0x00000001014e48e8 V8_Fatal(char const*, ...) + 268
3 deno 0x0000000101a63304 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) + 0
4 deno 0x0000000101a6655c v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) + 44
5 deno 0x0000000101a7483c v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> >, std::__1::hash<v8::internal::wasm::NativeModule*>, std::__1::equal_to<v8::internal::wasm::NativeModule*>, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocator<v8::internal::wasm::WasmCode*> > > > > const&) + 348
6 deno 0x0000000101a72744 v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() + 544
7 deno 0x0000000101a73e30 v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vector<v8::internal::wasm::WasmCode*>) + 464
8 deno 0x0000000101a73fb0 v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) + 272
9 deno 0x0000000101643614 v8::internal::StackGuard::HandleInterrupts() + 2148
10 deno 0x000000010193f5b4 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) + 312
11 deno 0x0000000101e2aeac Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 108
12 deno 0x0000000101ec0408 Builtins_JumpLoopHandler + 200
13 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
14 deno 0x0000000101e4724c Builtins_ArrayMap + 1292
15 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
16 deno 0x0000000101dc4c50 Builtins_InterpreterEntryTrampoline + 272
17 deno 0x0000000101df283c Builtins_AsyncFunctionAwaitResolveClosure + 92
18 deno 0x0000000101e74f9c Builtins_PromiseFulfillReactionJob + 60
19 deno 0x0000000101de5780 Builtins_RunMicrotasks + 672
20 deno 0x0000000101dc2824 Builtins_JSRunMicrotasksEntry + 164
21 deno 0x000000010161b004 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 2468
22 deno 0x000000010161b51c v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 88
23 deno 0x000000010161b5e4 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) + 64
24 deno 0x00000001016407d0 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) + 420
25 deno 0x000000010164060c v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) + 56
26 deno 0x0000000101630f88 v8::internal::Isolate::FireCallCompletedCallback(v8::internal::MicrotaskQueue*) + 72
27 deno 0x0000000101545890 v8::Promise::Resolver::Resolve(v8::Local<v8::Context>, v8::Local<v8::Value>) + 364
28 deno 0x00000001014df2a0 v8__Promise__Resolver__Resolve + 12
29 deno 0x0000000100f9efc4 deno_core::runtime::JsRuntime::dyn_import_done::h35f6587d6755a58d + 388
30 deno 0x0000000101081694 tokio::runtime::Runtime::block_on::h725c4f0b2fff3478 + 960
31 deno 0x0000000100df1e40 std::sys_common::backtrace::__rust_begin_short_backtrace::h5e70bc2b112988fa + 12
</code></pre></div> | <p dir="auto">I made the mistake of switching to macOS 11.2, since I get this error on my Deno projects:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3296671/107092259-8d50b780-6803-11eb-8fed-eda32bdd25c1.png"><img src="https://user-images.githubusercontent.com/3296671/107092259-8d50b780-6803-11eb-8fed-eda32bdd25c1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">It seems to be link to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="793190120" data-permission-text="Title is private" data-url="https://github.com/nodejs/node/issues/37061" data-hovercard-type="issue" data-hovercard-url="/nodejs/node/issues/37061/hovercard" href="https://github.com/nodejs/node/issues/37061">nodejs/node#37061</a>.</p> | 1 |
<p dir="auto">twitter thread <a href="https://twitter.com/domenic/status/697921719529398272" rel="nofollow">https://twitter.com/domenic/status/697921719529398272</a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/172399/13174587/02e38508-d705-11e5-92c5-372e75ff500d.png"><img src="https://cloud.githubusercontent.com/assets/172399/13174587/02e38508-d705-11e5-92c5-372e75ff500d.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">I am using VSC on Windows while developing for Linux-based webserver. Also, several people on my team are using Macs. It is very annoying for us to switch end of line sequence for each new file. It would be great if there was a user setting to ensure all new files are created with a certain eol sequence.</p> | 1 |
<p dir="auto">My current use case is to cluster a bunch of data to generate labels, then use a classifier to draw decision boundaries and make label predictions on new data.</p>
<p dir="auto">I love using pipeline and gridsearch packages in tandem, but can't use it for this because clustering does not have a transform method for X. Is it worthwhile to make pipeline components chain-able by the labels_ attribute in addition to transform?</p> | <p dir="auto">Following up on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32306582" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/3113" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/3113/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/3113">#3113</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32285638" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/3112" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/3112/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/3112">#3112</a>, what about arbitrary transforms to the <code class="notranslate">y</code> values? Those issues dealt primarily with "label transforms" but I would like to use transformers to mean or range center the <code class="notranslate">y</code> values as well.</p>
<p dir="auto">Ideally I would have some transform that can be applied to the y values before fitting and then applied in the inverse to the predicted <code class="notranslate">y</code> values coming out of <code class="notranslate">predict</code>.</p>
<p dir="auto">Ideally this Transformer could be added to a pipeline.</p>
<p dir="auto">Currently the signature for <code class="notranslate">transform</code> for <a href="https://github.com/scikit-learn/scikit-learn/blob/a413f875f1a7c9528290e01e1c030c336b9f32e4/sklearn/preprocessing/data.py#L338"><code class="notranslate">StandardScaler</code></a> allows for transforming <code class="notranslate">y</code> but as pointed out in the linked issues, not all transform methods have a signature allowing for a <code class="notranslate">y</code> to be passed in.</p>
<p dir="auto">Further even for <code class="notranslate">StandardScaler</code> there is an inconsistency with the <a href="https://github.com/scikit-learn/scikit-learn/blob/a413f875f1a7c9528290e01e1c030c336b9f32e4/sklearn/preprocessing/data.py#L366"><code class="notranslate">inverse_transform</code></a> NOT taking <code class="notranslate">y</code>.</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
After I upgrade @babel/core to v7.5.5, circleci build throw error <code class="notranslate">TypeError: helpers(...).ensure is not a function</code></p>
<p dir="auto">This error only happen in circleci environment. No error in windows or Mac</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): [v7.5.5]</li>
<li>Node/npm version: [e.g. Node 10/npm 5]</li>
<li>OS: [linux]</li>
<li>How you are using Babel: [<code class="notranslate">loader</code>]</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong><br>
The error happen in below line in v7.5.5<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/babel/babel/blob/fced5cea430cc00e916876b663a8d2a84a5dad1f/packages/babel-core/src/transformation/file/file.js#L207">babel/packages/babel-core/src/transformation/file/file.js</a>
</p>
<p class="mb-0 color-fg-muted">
Line 207
in
<a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/fced5cea430cc00e916876b663a8d2a84a5dad1f">fced5ce</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="L207" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="207"></td>
<td id="LC207" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">helpers</span><span class="pl-kos">.</span><span class="pl-en">ensure</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
</tr>
</tbody></table>
</div>
</div>
<p></p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5472912/61847532-9908b180-aedd-11e9-8c96-3a242c363300.png"><img src="https://user-images.githubusercontent.com/5472912/61847532-9908b180-aedd-11e9-8c96-3a242c363300.png" alt="image" style="max-width: 100%;"></a><br>
<a href="https://circleci.com/gh/freshesx/mogul/607" rel="nofollow">@babel/core v7.5.5 build log</a><br>
<a href="https://circleci.com/gh/freshesx/mogul/603" rel="nofollow">@babel/core v7.5.4 build log</a></p> | <p dir="auto">It looks like if I have:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Test {
constructor() {
someService.get().then(async () => {
this.foo = 'tada';
})
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Test</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-s1">someService</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'tada'</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"><code class="notranslate">this</code> is <code class="notranslate">undefined</code>. If I remove <code class="notranslate">async</code> I have the right <code class="notranslate">this</code>.</p> | 0 |
<p dir="auto">When installing on Windows 7 x64 with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install opencv-python # py 2.7"><pre class="notranslate"><code class="notranslate">pip install opencv-python # py 2.7
</code></pre></div>
<p dir="auto">or</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip3 install opencv-python # py 3.6"><pre class="notranslate"><code class="notranslate">pip3 install opencv-python # py 3.6
</code></pre></div>
<p dir="auto">in both cases, it installs succesfully but at the end, when doing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2"><pre class="notranslate"><code class="notranslate">import cv2
</code></pre></div>
<p dir="auto">we have this bug:</p>
<blockquote>
<p dir="auto">ImportError: DLL load failed: The specified module could not be found.</p>
</blockquote>
<p dir="auto">As noted <a href="https://github.com/skvark/opencv-python/issues/114" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv-python/issues/114/hovercard">on many posts</a>, the reason is that this file is missing:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MS-WIN-DOWNLEVEL-SHLWAPI-L1-1-0.DLL"><pre class="notranslate"><code class="notranslate">MS-WIN-DOWNLEVEL-SHLWAPI-L1-1-0.DLL
</code></pre></div>
<p dir="auto">Fix: install KB2670838 / <a href="https://www.microsoft.com/en-us/download/details.aspx?id=36805" rel="nofollow">Platform Update for Windows 7</a>, less than 15 MB</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows6.1-KB2670838-x64.msu"><pre class="notranslate"><code class="notranslate">Windows6.1-KB2670838-x64.msu
</code></pre></div>
<p dir="auto"><strong>Todo: Can we put this in the release notes of Open CV 3.4.3 or better:<br>
Can we do a <code class="notranslate">try: ... except: ...</code> and display <code class="notranslate">Please install Platform Update for Windows 7 / KB2670838</code> instead of just a non-explicit <code class="notranslate">DLL load failed</code> message ?</strong></p>
<p dir="auto">It would save countless hours for Windows users trying to install OpenCV.</p> | <p dir="auto">the installed opencv_world342.dll need "Api-ms-win-downlevel-shlwapi-l1-1-0.dll" which is not in Windows 7. (vc2015_redist.exe already installed).</p>
<p dir="auto">when I copy it from windows10, it works.</p> | 1 |
<p dir="auto">Hi,</p>
<p dir="auto">I don't know if this is a bug or a feature, or even if you guys noticed it already and it's not an issue, but this caused me some problems so I thought I should report it.</p>
<p dir="auto">When you use the read_csv command to read a csv, you can pass the columns you want to set as indexes. If those columns contain duplicated entries, the index will have duplicated entries.</p>
<p dir="auto">To reproduce this, read a csv file with this contents:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="indexcol, anothercol, yetanothercol
1, 1, 1
1, 2, 3
2, 1, 2"><pre class="notranslate"><code class="notranslate">indexcol, anothercol, yetanothercol
1, 1, 1
1, 2, 3
2, 1, 2
</code></pre></div>
<p dir="auto">with the command:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: import pandas
In [2]: pandas.read_csv('bar.csv', index_col = 'indexcol')
Out[2]:
anothercol yetanothercol
indexcol
1 1 1
1 2 3
2 1 2"><pre class="notranslate"><code class="notranslate">In [1]: import pandas
In [2]: pandas.read_csv('bar.csv', index_col = 'indexcol')
Out[2]:
anothercol yetanothercol
indexcol
1 1 1
1 2 3
2 1 2
</code></pre></div>
<p dir="auto">Is this what should happen? Is there a way to prevent it (like, for example, just read the first ocurrence of each duplicated index an drop the rest)? What I did to get rid of the duplicated entries was:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [3]: df = pandas.read_csv('bar.csv', index_col = 'indexcol')
In [4]: df.groupby(lambda x:x).first()
Out[4]:
anothercol yetanothercol
1 1 1
2 1 2"><pre class="notranslate"><code class="notranslate">In [3]: df = pandas.read_csv('bar.csv', index_col = 'indexcol')
In [4]: df.groupby(lambda x:x).first()
Out[4]:
anothercol yetanothercol
1 1 1
2 1 2
</code></pre></div> | <p dir="auto">What do we want out of our API docs? What are the current issues?</p>
<p dir="auto">I think we're (mostly) happy with <code class="notranslate">api.rst</code>: we manually list the classes and methods that we want to include the docs, grouped by topics of our choosing.</p>
<p dir="auto">I think we're unhappy with some aspects of the auto-genrated class pages.</p>
<p dir="auto">The <a href="https://github.com/pandas-dev/pandas/blob/c176a3c29ccabe7e471fa0b76c6cc1ceeb9bcd77/doc/sphinxext/numpydoc/numpydoc.py#L45-L48">hack</a> in our vendored <code class="notranslate">numpydoc.py</code> "fixing" the autosummary to not include a table of methods for certain classes. This avoids a ton of redundant pages with the parent class, but we can't call out important differences like <code class="notranslate">RangeIndex.start</code></p>
<p dir="auto">We'd like a way to limit autosummary to specific methods in a class (I think this can be done with a <code class="notranslate">Methods</code> section in the docstring)</p>
<p dir="auto">Tasks:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Limit API doc of classes to certain members (either extend autodoc or do it manually?) -> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272714788" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18202" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18202/hovercard" href="https://github.com/pandas-dev/pandas/pull/18202">#18202</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> DOC: fix API docs generation with sphinx 1.6 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="236163960" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/16705" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/16705/hovercard" href="https://github.com/pandas-dev/pandas/issues/16705">#16705</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> DOC: documenting cython class (eg Timestamp): "cyfunction is not a python function" <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20975147" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/5218" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/5218/hovercard" href="https://github.com/pandas-dev/pandas/issues/5218">#5218</a> -> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272714788" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18202" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18202/hovercard" href="https://github.com/pandas-dev/pandas/pull/18202">#18202</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Remove vendored IPython sphinxext (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272635793" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18193" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18193/hovercard" href="https://github.com/pandas-dev/pandas/pull/18193">#18193</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="296364134" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/19657" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/19657/hovercard" href="https://github.com/pandas-dev/pandas/pull/19657">#19657</a>)
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> should be OK with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="274783988" data-permission-text="Title is private" data-url="https://github.com/ipython/ipython/issues/10907" data-hovercard-type="pull_request" data-hovercard-url="/ipython/ipython/pull/10907/hovercard" href="https://github.com/ipython/ipython/pull/10907">ipython/ipython#10907</a> released)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> removed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="296364134" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/19657" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/19657/hovercard" href="https://github.com/pandas-dev/pandas/pull/19657">#19657</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> We should check on Windows!</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Align our numpydoc version with upstream / use upstream version: for this we somehow need to fix (or push upstream) our hacks to numpydoc ( I think this are the only relevant changes to the numpydoc source since it was last aligned with upstream in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25882381" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/6003" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/6003/hovercard" href="https://github.com/pandas-dev/pandas/pull/6003">#6003</a>) (xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="110203224" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11257" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/11257/hovercard" href="https://github.com/pandas-dev/pandas/pull/11257">#11257</a>)):
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pandas-dev/pandas/commit/cf40991093e746e5dde40fca4f322ecfc3dfff78/hovercard" href="https://github.com/pandas-dev/pandas/commit/cf40991093e746e5dde40fca4f322ecfc3dfff78"><tt>cf40991</tt></a> initial commit for allowing classes without members table -> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272714788" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18202" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18202/hovercard" href="https://github.com/pandas-dev/pandas/pull/18202">#18202</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pandas-dev/pandas/commit/70c9d318ed4ef32e1c294a4dbefcb783cda19dba/hovercard" href="https://github.com/pandas-dev/pandas/commit/70c9d318ed4ef32e1c294a4dbefcb783cda19dba"><tt>70c9d31</tt></a> for None attributes</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Remove vendored numpydoc (work around <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248280788" data-permission-text="Title is private" data-url="https://github.com/numpy/numpydoc/issues/106" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpydoc/pull/106/hovercard?comment_id=343220139&comment_type=issue_comment" href="https://github.com/numpy/numpydoc/pull/106#issuecomment-343220139">numpy/numpydoc#106 (comment)</a>)</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Fix <code class="notranslate">cache_readonly</code> copying docstring (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272665451" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18197" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/18197/hovercard" href="https://github.com/pandas-dev/pandas/issues/18197">#18197</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">Index.name</code> and other class attributes. Either fix in numpydoc to use sphinx magic, or make into properties</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">DataFrame.index</code> and <code class="notranslate">DataFrame.columns</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272659664" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18196" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/18196/hovercard" href="https://github.com/pandas-dev/pandas/pull/18196">#18196</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check performance (better than 1.6, but still slower? <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272898027" data-permission-text="Title is private" data-url="https://github.com/sphinx-doc/sphinx/issues/4230" data-hovercard-type="issue" data-hovercard-url="/sphinx-doc/sphinx/issues/4230/hovercard" href="https://github.com/sphinx-doc/sphinx/issues/4230">sphinx-doc/sphinx#4230</a>)</li>
</ul> | 0 |
<p dir="auto">Or it silently notices, and we should add clarity.</p>
<p dir="auto"><a href="http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/26411/#" rel="nofollow">http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/26411/#</a><br>
<a href="https://pantheon.corp.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/20464/kubernetes-pull-build-test-e2e-gce/26411/" rel="nofollow">https://pantheon.corp.google.com/storage/browser/kubernetes-jenkins/pr-logs/pull/20464/kubernetes-pull-build-test-e2e-gce/26411/</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="18:04:42 Feb 3 01:54:26.948: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (2.018815ms)
18:04:42 Feb 3 01:54:31.952: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (5.005524636s)
18:04:42 Feb 3 01:54:36.956: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (10.009565421s)
18:04:42 Feb 3 01:54:41.960: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (15.013511228s)
...
¢ Failure [827.605 seconds]
Services
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:896
should be able to change the type and nodeport settings of a service [It]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:610
Expected error:
<*errors.errorString | 0xc8206a1f70>: {
s: "service mutability-service-test in namespace e2e-tests-services-h1iyv still has LoadBalancer ingress points after 600.00 seconds",
}
service mutability-service-test in namespace e2e-tests-services-h1iyv still has LoadBalancer ingress points after 600.00 seconds
not to have occurred"><pre class="notranslate"><code class="notranslate">18:04:42 Feb 3 01:54:26.948: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (2.018815ms)
18:04:42 Feb 3 01:54:31.952: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (5.005524636s)
18:04:42 Feb 3 01:54:36.956: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (10.009565421s)
18:04:42 Feb 3 01:54:41.960: INFO: Waiting for service mutability-service-test in namespace e2e-tests-services-h1iyv to have no LoadBalancer ingress points (15.013511228s)
...
¢ Failure [827.605 seconds]
Services
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:896
should be able to change the type and nodeport settings of a service [It]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/service.go:610
Expected error:
<*errors.errorString | 0xc8206a1f70>: {
s: "service mutability-service-test in namespace e2e-tests-services-h1iyv still has LoadBalancer ingress points after 600.00 seconds",
}
service mutability-service-test in namespace e2e-tests-services-h1iyv still has LoadBalancer ingress points after 600.00 seconds
not to have occurred
</code></pre></div>
<p dir="auto">Brief scanning of controller manager logs shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0203 01:50:56.732467 6 servicecontroller.go:222] Got new Added delta for service: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:mutability-service-test GenerateName: Namespace:e2e-tests-services-h1iyv SelfLink:/api/v1/namespaces/e2e-tests-services-h1iyv/services/mutability-service-test UID:911cc0de-ca18-11e5-9af4-42010af00002 ResourceVersion:9107 Generation:0 CreationTimestamp:2016-02-03 01:50:56 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[]} Spec:{Type:ClusterIP Ports:[{Name: Protocol:TCP Port:80 TargetPort:{Type:0 IntVal:80 StrVal:} NodePort:0}] Selector:map[testid:mutability-service-test-911c15d6-ca18-11e5-b988-42010af0000d] ClusterIP:10.0.205.218 ExternalIPs:[] LoadBalancerIP: SessionAffinity:None} Status:{LoadBalancer:{Ingress:[]}}}"><pre class="notranslate"><code class="notranslate">I0203 01:50:56.732467 6 servicecontroller.go:222] Got new Added delta for service: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:mutability-service-test GenerateName: Namespace:e2e-tests-services-h1iyv SelfLink:/api/v1/namespaces/e2e-tests-services-h1iyv/services/mutability-service-test UID:911cc0de-ca18-11e5-9af4-42010af00002 ResourceVersion:9107 Generation:0 CreationTimestamp:2016-02-03 01:50:56 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[]} Spec:{Type:ClusterIP Ports:[{Name: Protocol:TCP Port:80 TargetPort:{Type:0 IntVal:80 StrVal:} NodePort:0}] Selector:map[testid:mutability-service-test-911c15d6-ca18-11e5-b988-42010af0000d] ClusterIP:10.0.205.218 ExternalIPs:[] LoadBalancerIP: SessionAffinity:None} Status:{LoadBalancer:{Ingress:[]}}}
</code></pre></div>
<p dir="auto">Which matches up to when it was created.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0203 01:53:53.114032 6 servicecontroller.go:222] Got new Updated delta for service: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:mutability-service-test GenerateName: Namespace:e2e-tests-services-h1iyv SelfLink:/api/v1/namespaces/e2e-tests-services-h1iyv/services/mutability-service-test UID:911cc0de-ca18-11e5-9af4-42010af00002 ResourceVersion:9205 Generation:0 CreationTimestamp:2016-02-03 01:50:56 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[]} Spec:{Type:LoadBalancer Ports:[{Name: Protocol:TCP Port:19482 TargetPort:{Type:0 IntVal:80 StrVal:} NodePort:31183}] Selector:map[testid:mutability-service-test-911c15d6-ca18-11e5-b988-42010af0000d] ClusterIP:10.0.205.218 ExternalIPs:[] LoadBalancerIP: SessionAffinity:None} Status:{LoadBalancer:{Ingress:[{IP:104.197.200.228 Hostname:}]}}}"><pre class="notranslate"><code class="notranslate">I0203 01:53:53.114032 6 servicecontroller.go:222] Got new Updated delta for service: &{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:mutability-service-test GenerateName: Namespace:e2e-tests-services-h1iyv SelfLink:/api/v1/namespaces/e2e-tests-services-h1iyv/services/mutability-service-test UID:911cc0de-ca18-11e5-9af4-42010af00002 ResourceVersion:9205 Generation:0 CreationTimestamp:2016-02-03 01:50:56 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[]} Spec:{Type:LoadBalancer Ports:[{Name: Protocol:TCP Port:19482 TargetPort:{Type:0 IntVal:80 StrVal:} NodePort:31183}] Selector:map[testid:mutability-service-test-911c15d6-ca18-11e5-b988-42010af0000d] ClusterIP:10.0.205.218 ExternalIPs:[] LoadBalancerIP: SessionAffinity:None} Status:{LoadBalancer:{Ingress:[{IP:104.197.200.228 Hostname:}]}}}
</code></pre></div>
<p dir="auto">Which matches when the loadbalancer came up.</p>
<p dir="auto">but when I'd expect to see the update for flipping out of type=lb, i instead see:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I0203 01:54:44.819605 6 servicecontroller.go:277] LB already exists and doesn't need update for service e2e-tests-services-h1iyv/mutability-service-test
I0203 01:54:44.819625 6 servicecontroller.go:277] LB already exists and doesn't need update for service e2e-tests-services-h1iyv/mutability-service-test"><pre class="notranslate"><code class="notranslate">I0203 01:54:44.819605 6 servicecontroller.go:277] LB already exists and doesn't need update for service e2e-tests-services-h1iyv/mutability-service-test
I0203 01:54:44.819625 6 servicecontroller.go:277] LB already exists and doesn't need update for service e2e-tests-services-h1iyv/mutability-service-test
</code></pre></div> | <p dir="auto">After running couple e2e tests on a GCE cluster created from HEAD endpoint controller stops working (no entries in controller log on master) and no endpoints are created for a service. I have this cluster still up and running - let me know if you need more data.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl get services
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
kubernetes 10.0.0.1 <none> 443/TCP <none> 1h
rc-default 10.0.5.65 <none> 80/TCP name=rc-default 8m"><pre class="notranslate"><code class="notranslate">kubectl get services
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
kubernetes 10.0.0.1 <none> 443/TCP <none> 1h
rc-default 10.0.5.65 <none> 80/TCP name=rc-default 8m
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl get endpoints --all-namespaces
NAMESPACE NAME ENDPOINTS AGE
default kubernetes 10.240.0.2:443 59m
kube-system default-http-backend 10.245.0.5:8080 59m
kube-system elasticsearch-logging 10.245.0.6:9200,10.245.1.5:9200 59m
kube-system heapster 10.245.1.3:8082 59m
kube-system kibana-logging 10.245.0.3:5601 59m
kube-system kube-dns 10.245.0.7:53,10.245.0.7:53 59m
kube-system kube-ui 10.245.0.4:8080 59m
kube-system monitoring-grafana 10.245.1.4:3000 59m
kube-system monitoring-influxdb 10.245.1.4:8083,10.245.1.4:8086 59m"><pre class="notranslate"><code class="notranslate">kubectl get endpoints --all-namespaces
NAMESPACE NAME ENDPOINTS AGE
default kubernetes 10.240.0.2:443 59m
kube-system default-http-backend 10.245.0.5:8080 59m
kube-system elasticsearch-logging 10.245.0.6:9200,10.245.1.5:9200 59m
kube-system heapster 10.245.1.3:8082 59m
kube-system kibana-logging 10.245.0.3:5601 59m
kube-system kube-dns 10.245.0.7:53,10.245.0.7:53 59m
kube-system kube-ui 10.245.0.4:8080 59m
kube-system monitoring-grafana 10.245.1.4:3000 59m
kube-system monitoring-influxdb 10.245.1.4:8083,10.245.1.4:8086 59m
</code></pre></div>
<p dir="auto">On some healthy cluster, with the same service definition</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubectl get endpoints --all-namespaces
NAMESPACE NAME ENDPOINTS AGE
default kubernetes 10.240.0.2:443 1d
default rc-default <none> 29s
[...]"><pre class="notranslate"><code class="notranslate">kubectl get endpoints --all-namespaces
NAMESPACE NAME ENDPOINTS AGE
default kubernetes 10.240.0.2:443 1d
default rc-default <none> 29s
[...]
</code></pre></div> | 1 |
<p dir="auto">Run the following program on the following input:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main
import (
"bytes"
"io/ioutil"
"os"
"golang.org/x/image/bmp"
)
func main() {
data, _ := ioutil.ReadFile(os.Args[1])
img, err := bmp.Decode(bytes.NewReader(data))
if err != nil {
return
}
var w bytes.Buffer
err = bmp.Encode(&w, img)
if err != nil {
panic(err)
}
}"><pre class="notranslate"><span class="pl-k">package</span> main
<span class="pl-k">import</span> (
<span class="pl-s">"bytes"</span>
<span class="pl-s">"io/ioutil"</span>
<span class="pl-s">"os"</span>
<span class="pl-s">"golang.org/x/image/bmp"</span>
)
<span class="pl-k">func</span> <span class="pl-en">main</span>() {
<span class="pl-s1">data</span>, <span class="pl-s1">_</span> <span class="pl-c1">:=</span> <span class="pl-s1">ioutil</span>.<span class="pl-en">ReadFile</span>(<span class="pl-s1">os</span>.<span class="pl-c1">Args</span>[<span class="pl-c1">1</span>])
<span class="pl-s1">img</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">bmp</span>.<span class="pl-en">Decode</span>(<span class="pl-s1">bytes</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">data</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-k">return</span>
}
<span class="pl-k">var</span> <span class="pl-s1">w</span> bytes.<span class="pl-smi">Buffer</span>
<span class="pl-s1">err</span> <span class="pl-c1">=</span> <span class="pl-s1">bmp</span>.<span class="pl-en">Encode</span>(<span class="pl-c1">&</span><span class="pl-s1">w</span>, <span class="pl-s1">img</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-en">panic</span>(<span class="pl-s1">err</span>)
}
}</pre></div>
<p dir="auto"><a href="https://drive.google.com/file/d/0B20Uwp8Hs1oCc1dwYXJlMTRna0E/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0B20Uwp8Hs1oCc1dwYXJlMTRna0E/view?usp=sharing</a></p>
<p dir="auto">It crashes as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: runtime error: makeslice: len out of range
goroutine 1 [running]:
runtime.gopanic(0x4d6b40, 0xc20800e590)
src/runtime/panic.go:477 +0x3fe fp=0xc208041c50 sp=0xc208041bd0
runtime.makeslice(0x4ac5a0, 0x3c00009f60, 0x3c00009f60, 0x0, 0x0, 0x0)
src/runtime/slice.go:26 +0xce fp=0xc208041ca0 sp=0xc208041c50
golang.org/x/image/bmp.decodeRGB(0x7fe619a4d2d8, 0xc20800a480, 0x7fe619a4d0d0, 0xc20802e020, 0x400000aa, 0x3c, 0x0, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:57 +0x185 fp=0xc208041e30 sp=0xc208041ca0
golang.org/x/image/bmp.Decode(0x7fe619a4d2d8, 0xc20800a480, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:112 +0x15b fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0"><pre class="notranslate"><code class="notranslate">panic: runtime error: makeslice: len out of range
goroutine 1 [running]:
runtime.gopanic(0x4d6b40, 0xc20800e590)
src/runtime/panic.go:477 +0x3fe fp=0xc208041c50 sp=0xc208041bd0
runtime.makeslice(0x4ac5a0, 0x3c00009f60, 0x3c00009f60, 0x0, 0x0, 0x0)
src/runtime/slice.go:26 +0xce fp=0xc208041ca0 sp=0xc208041c50
golang.org/x/image/bmp.decodeRGB(0x7fe619a4d2d8, 0xc20800a480, 0x7fe619a4d0d0, 0xc20802e020, 0x400000aa, 0x3c, 0x0, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:57 +0x185 fp=0xc208041e30 sp=0xc208041ca0
golang.org/x/image/bmp.Decode(0x7fe619a4d2d8, 0xc20800a480, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:112 +0x15b fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0
</code></pre></div>
<p dir="auto">I am on commit 65a798f031fd31a65574938bed2ec44c2bcba496</p> | <p dir="auto">Run the following program on the following input:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package main
import (
"bytes"
"io/ioutil"
"os"
"golang.org/x/image/bmp"
)
func main() {
data, _ := ioutil.ReadFile(os.Args[1])
img, err := bmp.Decode(bytes.NewReader(data))
if err != nil {
return
}
var w bytes.Buffer
err = bmp.Encode(&w, img)
if err != nil {
panic(err)
}
}"><pre class="notranslate"><span class="pl-k">package</span> main
<span class="pl-k">import</span> (
<span class="pl-s">"bytes"</span>
<span class="pl-s">"io/ioutil"</span>
<span class="pl-s">"os"</span>
<span class="pl-s">"golang.org/x/image/bmp"</span>
)
<span class="pl-k">func</span> <span class="pl-en">main</span>() {
<span class="pl-s1">data</span>, <span class="pl-s1">_</span> <span class="pl-c1">:=</span> <span class="pl-s1">ioutil</span>.<span class="pl-en">ReadFile</span>(<span class="pl-s1">os</span>.<span class="pl-c1">Args</span>[<span class="pl-c1">1</span>])
<span class="pl-s1">img</span>, <span class="pl-s1">err</span> <span class="pl-c1">:=</span> <span class="pl-s1">bmp</span>.<span class="pl-en">Decode</span>(<span class="pl-s1">bytes</span>.<span class="pl-en">NewReader</span>(<span class="pl-s1">data</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-k">return</span>
}
<span class="pl-k">var</span> <span class="pl-s1">w</span> bytes.<span class="pl-smi">Buffer</span>
<span class="pl-s1">err</span> <span class="pl-c1">=</span> <span class="pl-s1">bmp</span>.<span class="pl-en">Encode</span>(<span class="pl-c1">&</span><span class="pl-s1">w</span>, <span class="pl-s1">img</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-en">panic</span>(<span class="pl-s1">err</span>)
}
}</pre></div>
<p dir="auto"><a href="https://drive.google.com/file/d/0B20Uwp8Hs1oCTzFrMndWMjNtTHM/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0B20Uwp8Hs1oCTzFrMndWMjNtTHM/view?usp=sharing</a></p>
<p dir="auto">It crashes as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal error: runtime: out of memory
goroutine 1 [running]:
runtime.systemstack_switch()
src/runtime/asm_amd64.s:216 fp=0xc208041b58 sp=0xc208041b50
runtime.mallocgc(0x1000000300, 0x4b27c0, 0x1, 0x0)
src/runtime/malloc.go:625 +0x8f1 fp=0xc208041c28 sp=0xc208041b58
runtime.newarray(0x4b27c0, 0x1000000300, 0x1)
src/runtime/malloc.go:736 +0xce fp=0xc208041c68 sp=0xc208041c28
runtime.makeslice(0x4ac5a0, 0x1000000300, 0x1000000300, 0x0, 0x0, 0x0)
src/runtime/slice.go:32 +0x178 fp=0xc208041cb8 sp=0xc208041c68
golang.org/x/image/bmp.decodeNRGBA(0x7f87732092d8, 0xc208014420, 0x7f87732090d0, 0xc20802e020, 0x10, 0x4000000c, 0x1, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:83 +0x185 fp=0xc208041e30 sp=0xc208041cb8
golang.org/x/image/bmp.Decode(0x7f87732092d8, 0xc208014420, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:114 +0x1be fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0"><pre class="notranslate"><code class="notranslate">fatal error: runtime: out of memory
goroutine 1 [running]:
runtime.systemstack_switch()
src/runtime/asm_amd64.s:216 fp=0xc208041b58 sp=0xc208041b50
runtime.mallocgc(0x1000000300, 0x4b27c0, 0x1, 0x0)
src/runtime/malloc.go:625 +0x8f1 fp=0xc208041c28 sp=0xc208041b58
runtime.newarray(0x4b27c0, 0x1000000300, 0x1)
src/runtime/malloc.go:736 +0xce fp=0xc208041c68 sp=0xc208041c28
runtime.makeslice(0x4ac5a0, 0x1000000300, 0x1000000300, 0x0, 0x0, 0x0)
src/runtime/slice.go:32 +0x178 fp=0xc208041cb8 sp=0xc208041c68
golang.org/x/image/bmp.decodeNRGBA(0x7f87732092d8, 0xc208014420, 0x7f87732090d0, 0xc20802e020, 0x10, 0x4000000c, 0x1, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:83 +0x185 fp=0xc208041e30 sp=0xc208041cb8
golang.org/x/image/bmp.Decode(0x7f87732092d8, 0xc208014420, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:114 +0x1be fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0
</code></pre></div>
<p dir="auto">I am on commit 65a798f031fd31a65574938bed2ec44c2bcba496</p> | 1 |
<p dir="auto">Using data-toggle="buttons" doesn't set the initial active state of the radio/checkbox buttons if they are already checked.</p>
<p dir="auto">In the following example, the first button should get a class of active when the widget is initialized, but it does not.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" checked="checked"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>"><pre class="notranslate"><code class="notranslate"><div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" checked="checked"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>
</code></pre></div> | <p dir="auto">Hi guys! Love your work!</p>
<p dir="auto">Have some issues with checkbox and radio Buttons on Button-groups. I've try to pre-load option with a form, but got all buttons disabled. Hope you'll fix it.</p>
<p dir="auto">Thank you!</p> | 1 |
<p dir="auto">Getting a <code class="notranslate">TypeError</code> while using <code class="notranslate">np.unique</code> with array of <code class="notranslate">dtype=object</code></p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
a = np.array([1, 2, 3, 2, 'a', 'b', 'a'], dtype=object)
np.unique(a)"><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">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-s">'a'</span>, <span class="pl-s">'b'</span>, <span class="pl-s">'a'</span>], <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">object</span>)
<span class="pl-s1">np</span>.<span class="pl-en">unique</span>(<span class="pl-s1">a</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="----> 1 np.unique(a)
<__array_function__ internals> in unique(*args, **kwargs)
~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in unique(ar, return_index, return_inverse, return_counts, axis)
260 ar = np.asanyarray(ar)
261 if axis is None:
--> 262 ret = _unique1d(ar, return_index, return_inverse, return_counts)
263 return _unpack_tuple(ret)
264
~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in _unique1d(ar, return_index, return_inverse, return_counts)
308 aux = ar[perm]
309 else:
--> 310 ar.sort()
311 aux = ar
312 mask = np.empty(aux.shape, dtype=np.bool_)
TypeError: '<' not supported between instances of 'str' and 'int'"><pre class="notranslate"><code class="notranslate">----> 1 np.unique(a)
<__array_function__ internals> in unique(*args, **kwargs)
~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in unique(ar, return_index, return_inverse, return_counts, axis)
260 ar = np.asanyarray(ar)
261 if axis is None:
--> 262 ret = _unique1d(ar, return_index, return_inverse, return_counts)
263 return _unpack_tuple(ret)
264
~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in _unique1d(ar, return_index, return_inverse, return_counts)
308 aux = ar[perm]
309 else:
--> 310 ar.sort()
311 aux = ar
312 mask = np.empty(aux.shape, dtype=np.bool_)
TypeError: '<' not supported between instances of 'str' and 'int'
</code></pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">1.18.0 3.7.5 (default, Oct 25 2019, 10:52:18)<br>
[Clang 4.0.1 (tags/RELEASE_401/final)]</p> | <p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/2188" rel="nofollow">http://projects.scipy.org/numpy/ticket/2188</a> on 2012-07-23 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yarikoptic/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yarikoptic">@yarikoptic</a>, assigned to unknown.</em></p>
<p dir="auto">tested against current master (present in 1.6.2 as well):</p>
<p dir="auto">If with python2.x series it works ok, without puking:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$> python2.7 -c 'import numpy as np; print repr(repr(np.unique(np.array([1,2, None, "str"]))))'
'array([None, 1, 2, str], dtype=object)'"><pre class="notranslate"><code class="notranslate">$> python2.7 -c 'import numpy as np; print repr(repr(np.unique(np.array([1,2, None, "str"]))))'
'array([None, 1, 2, str], dtype=object)'
</code></pre></div>
<p dir="auto">NB I will report a bug on <strong>repr</strong> here separately if not yet filed</p>
<p dir="auto">it fails with python3.x altogether:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$> python3.2 -c 'import numpy as np; print(repr(repr(np.unique(np.array([1,2,None, "str"])))))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.2/dist-packages/numpy/lib/arraysetops.py", line 194, in unique
ar.sort()
TypeError: unorderable types: int() > NoneType()"><pre class="notranslate"><code class="notranslate">$> python3.2 -c 'import numpy as np; print(repr(repr(np.unique(np.array([1,2,None, "str"])))))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.2/dist-packages/numpy/lib/arraysetops.py", line 194, in unique
ar.sort()
TypeError: unorderable types: int() > NoneType()
</code></pre></div>
<p dir="auto">whenever IMHO it must operate correctly -- semantic of unique() action should not imply ability to sort the elements</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://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first. (No option to post for me)</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). - Celery 4.4.0 (cliffs)</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 & rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies. Works in Celery 4.1</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version 4.4.0 (cliffs)</strong>:</p>
<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()"><pre class="notranslate"><code class="notranslate">sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()
</code></pre></div>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 2.7</li>
<li><strong>Minimal Celery Version</strong>: 4.4</li>
<li><strong>Minimal Kombu Version</strong>: 4.6.7</li>
<li><strong>Minimal Broker Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Version</strong>: N/A</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A</li>
<li><strong>Minimal Broker Client Version</strong>: N/A</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A</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="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()"><pre class="notranslate"><code class="notranslate">sig = signature('any_taskname', queue='any_q')
chain( [ chain( sig ) ] ).apply_async()
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">It should publish task 'any_taskname' to queue 'any_q'</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Max recursion depth exceeded</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
File "test.py", line 30, in <module>
chain([chain(s2)]).apply_async() # issue
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 642, in apply_async
dict(self.options, **options) if options else self.options))
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 660, in run
task_id, group_id, chord,
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 721, in prepare_steps
task = task.clone(args, kwargs)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
...
..
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
keeps repeating
..
..
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 617, in clone
signature = Signature.clone(self, *args, **kwargs)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 272, in clone
app=self._app)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 153, in from_dict
return target_cls.from_dict(d, app=app)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 599, in from_dict
return _upgrade(d, _chain(tasks, app=app, **d['options']))
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 602, in __init__
tasks = (regen(tasks[0]) if len(tasks) == 1 and is_list(tasks[0])
File "/bb/bin/dl/celery/4.4/kombu/utils/functional.py", line 256, in is_list
return isinstance(l, iters) and not isinstance(l, scalars or ())
File "/opt/bb/lib/python2.7/abc.py", line 132, in __instancecheck__
if subclass is not None and subclass in cls._abc_cache:
File "/opt/bb/lib/python2.7/_weakrefset.py", line 72, in __contains__
wr = ref(item)
RuntimeError: maximum recursion depth exceeded"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
File "test.py", line 30, in <module>
chain([chain(s2)]).apply_async() # issue
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 642, in apply_async
dict(self.options, **options) if options else self.options))
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 660, in run
task_id, group_id, chord,
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 721, in prepare_steps
task = task.clone(args, kwargs)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
...
..
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 620, in clone
for sig in signature.kwargs['tasks']
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 1513, in maybe_signature
d = d.clone()
keeps repeating
..
..
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 617, in clone
signature = Signature.clone(self, *args, **kwargs)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 272, in clone
app=self._app)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 153, in from_dict
return target_cls.from_dict(d, app=app)
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 599, in from_dict
return _upgrade(d, _chain(tasks, app=app, **d['options']))
File "/bb/bin/dl/celery/4.4/celery/canvas.py", line 602, in __init__
tasks = (regen(tasks[0]) if len(tasks) == 1 and is_list(tasks[0])
File "/bb/bin/dl/celery/4.4/kombu/utils/functional.py", line 256, in is_list
return isinstance(l, iters) and not isinstance(l, scalars or ())
File "/opt/bb/lib/python2.7/abc.py", line 132, in __instancecheck__
if subclass is not None and subclass in cls._abc_cache:
File "/opt/bb/lib/python2.7/_weakrefset.py", line 72, in __contains__
wr = ref(item)
RuntimeError: maximum recursion depth exceeded
</code></pre></div> | <h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" 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"> 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 & 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>Introduced by <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/0463bff0530b8aef8d31bd8039f245735295db59/hovercard" href="https://github.com/celery/celery/commit/0463bff0530b8aef8d31bd8039f245735295db59"><tt>0463bff</tt></a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="625829967" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/6122" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/6122/hovercard" href="https://github.com/celery/celery/pull/6122">#6122</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.4.4</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>
<ol dir="auto">
<li>Upgrade from Celery 4.4.3 to 4.4.4</li>
<li>Get <code class="notranslate">ModuleNotFoundError: No module named 'future'</code> eror</li>
</ol>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">It would work after upgrade. In case new dependencies were introduced, these should be installed.</p>
<h1 dir="auto">Actual Behavior</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" weblate_1 | File "/usr/local/lib/python3.7/dist-packages/celery/backends/redis.py", line 25, in <module>
weblate_1 | from .base import BaseKeyValueStoreBackend
weblate_1 | File "/usr/local/lib/python3.7/dist-packages/celery/backends/base.py", line 10, in <module>
weblate_1 | from future.utils import raise_with_traceback
weblate_1 | ModuleNotFoundError: No module named 'future'"><pre class="notranslate"><code class="notranslate"> weblate_1 | File "/usr/local/lib/python3.7/dist-packages/celery/backends/redis.py", line 25, in <module>
weblate_1 | from .base import BaseKeyValueStoreBackend
weblate_1 | File "/usr/local/lib/python3.7/dist-packages/celery/backends/base.py", line 10, in <module>
weblate_1 | from future.utils import raise_with_traceback
weblate_1 | ModuleNotFoundError: No module named 'future'
</code></pre></div>
<p dir="auto">See <a href="https://github.com/WeblateOrg/docker/runs/733499300">https://github.com/WeblateOrg/docker/runs/733499300</a></p> | 0 |
<h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">It would be more useful if already running programs are shown first in the results list in the quick launcher (like the old WindowWalker). <strong><em>Or maybe an option to change the priority.</em></strong></p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">In the results list, the running programs should be first in the list.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49621788/82359297-b4e1c480-99d5-11ea-9f35-8cdf32108868.png"><img src="https://user-images.githubusercontent.com/49621788/82359297-b4e1c480-99d5-11ea-9f35-8cdf32108868.png" alt="1" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/49621788/82359300-b57a5b00-99d5-11ea-964c-1b39bb99600d.png"><img src="https://user-images.githubusercontent.com/49621788/82359300-b57a5b00-99d5-11ea-964c-1b39bb99600d.png" alt="2" style="max-width: 100%;"></a></p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Enterprise 1903
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run"><pre class="notranslate"><code class="notranslate">Windows build number: Enterprise 1903
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open an application, manually or with PTR (Firefox Developer Edition and Slack in my case)</li>
<li>Activate shortcut to open PTR</li>
<li>Type in name of application (Firefox, Slack)</li>
<li>Press Enter</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Switch to most recently used window that matches title<br>
List matching entries in descending order based on when last used (would be nice to have application icon as well, rather than the blue-circled icon)<br>
Display entries to launch new instances of the application below</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">New instance of application launches.<br>
In the case of typing in Firefox, a new instance of mainstream Firefox launched.</p>
<h1 dir="auto">Screenshots</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1207114/82357065-2ca9f200-99ca-11ea-8328-dd9d2ef240b0.png"><img src="https://user-images.githubusercontent.com/1207114/82357065-2ca9f200-99ca-11ea-8328-dd9d2ef240b0.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11857803/19584877/b0af723e-96fc-11e6-9173-58e31efca481.PNG"><img src="https://cloud.githubusercontent.com/assets/11857803/19584877/b0af723e-96fc-11e6-9173-58e31efca481.PNG" alt="img_0002" style="max-width: 100%;"></a></p> | <p dir="auto">I would expect either the whole word to wrap, or probably better to have it change phone size or ellipsize. We probably want some standardized titlebar behavior here.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/11857803/19585022/e1e33632-96fd-11e6-9dad-417ca15f908f.PNG"><img src="https://cloud.githubusercontent.com/assets/11857803/19585022/e1e33632-96fd-11e6-9dad-417ca15f908f.PNG" alt="img_0003" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto"><code class="notranslate">.text-center</code> and <code class="notranslate">.text-right</code> do not apply to table td / th elements, as the align left rule for those takes precedence.</p>
<p dir="auto">I've added this as a workaround; an alternative might be to add <code class="notranslate">!important</code> to the <code class="notranslate">.text-</code> rules</p>
<div class="highlight highlight-source-css-less notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=".table th, .table td {
&.text-center { text-align: center; }
&.text-right { text-align: right; }
}"><pre class="notranslate"><span class="pl-e">.table</span> <span class="pl-ent">th</span>, <span class="pl-e">.table</span> <span class="pl-ent">td</span> {
<span class="pl-e">&</span><span class="pl-e">.text-center</span> { <span class="pl-c1">text-align</span>: <span class="pl-c1">center</span>; }
<span class="pl-e">&</span><span class="pl-e">.text-right</span> { <span class="pl-c1">text-align</span>: <span class="pl-c1">right</span>; }
}</pre></div> | <p dir="auto">Hi,</p>
<p dir="auto">The new <code class="notranslate">text-left</code>, <code class="notranslate">text-center</code> and <code class="notranslate">text-right</code> classes doesn't work on the table cells. Maybe it would be nice to add an <code class="notranslate">!important</code> hack to force alignment ?</p> | 1 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">Using a test of the form</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rules: [{
test: /\/filename.ext$/
}]"><pre class="notranslate"><code class="notranslate">rules: [{
test: /\/filename.ext$/
}]
</code></pre></div>
<p dir="auto">will fail on node users in the MINGW64 / msys2 / msysgit environment because the path separator is <code class="notranslate">\</code>.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<ol dir="auto">
<li>Run webpack in a native Windows environment.</li>
<li>Observe path separators are \ and not /.</li>
<li>Observe this interacts poorly with path testing in Webpack.</li>
</ol>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Paths might have to be tested twice, once with forward slashes and once with backslashes.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.32.0<br>
Node.js version: v16.0.0<br>
Operating System: Windows 10<br>
Additional tools: MSYS2 (i.e. the native bash provided by the Git client for Windows)</p> | <p dir="auto">I'm attempting to use dynamic requires, but I want the mappings to have lower-case aliases (I'm experimenting with the routing). When I'm using it like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="compiler.plugin('context-module-factory', function (cmf) {
cmf.plugin('alternatives', function (items, callback) {
items.push({
context: items[0].context,
request: items[0].request.substr(0, items[0].request.length - 3).toLowerCase()
});
callback(null, items);
});
}); "><pre class="notranslate"><code class="notranslate">compiler.plugin('context-module-factory', function (cmf) {
cmf.plugin('alternatives', function (items, callback) {
items.push({
context: items[0].context,
request: items[0].request.substr(0, items[0].request.length - 3).toLowerCase()
});
callback(null, items);
});
});
</code></pre></div>
<p dir="auto">I end up with this in the bundle:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var map = {
"./Dialogue": 22,
"./Dialogue.js": 22,
"./Locales": 23,
"./Locales.js": 23,
"./dialogue": 24,
"./locales": 25
};"><pre class="notranslate"><code class="notranslate">var map = {
"./Dialogue": 22,
"./Dialogue.js": 22,
"./Locales": 23,
"./Locales.js": 23,
"./dialogue": 24,
"./locales": 25
};
</code></pre></div>
<p dir="auto">It works, but it attaches the same blocks twice, which isn't how it's intended. Is there a way to overcome this without dirty hacks?</p> | 0 |
<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto"><code class="notranslate">webpack-dev-server</code> (via <code class="notranslate">webpack serve</code>) compiles twice on every save in VSCode. This doesn't happen when using an other editor such as Sublime.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">Create a fresh package with <code class="notranslate">webpack</code>, <code class="notranslate">webpack-cli</code> and <code class="notranslate">webpack-dev-server</code> as <code class="notranslate">devDependencies</code>.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// src/index.js
console.log("Hi");"><pre class="notranslate"><span class="pl-c">// src/index.js</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">"Hi"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Launch the server:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="webpack serve --mode=production"><pre class="notranslate">webpack serve --mode=production</pre></div>
<p dir="auto">Open the <code class="notranslate">src/index.js</code> file in VSCode. You'll notice in the console's output that every time you press save, the code gets compiled twice. Try with an other editor (such as Sublime) and you'll see that compilation occurs once, as expected.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Compilation should occur only once.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: <code class="notranslate">v5.67.0</code><br>
Node.js version: <code class="notranslate">v16.13.0</code><br>
Operating System: MacOS Monterey<br>
Additional tools: VSCode <code class="notranslate">v1.63.2</code> (with default settings + no extensions)</p> | <h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong><br>
Hot module reloading is not working after updating webpack to v5.66.0.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<ul dir="auto">
<li>Clone <a href="https://github.com/saltire/react-node-boilerplate">https://github.com/saltire/react-node-boilerplate</a>.</li>
<li>Run <code class="notranslate">npm i webpack@latest</code> to update to <strong>5.66.0</strong>.</li>
<li>Run <code class="notranslate">npm run watch</code>.</li>
<li>Modify <code class="notranslate">src/App.jsx</code>. The browser console reports <code class="notranslate">bundle rebuilding</code> twice, the request to <code class="notranslate">main.xxxxx.hot-update.json</code> fails with status 404, and the app does not update.</li>
</ul>
<p dir="auto">Notice the issue does not occur if webpack <strong>5.65.0</strong> is installed.</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
When making a change to a jsx file, the app should reload automatically.</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.66.0<br>
Node.js version: 16<br>
Operating System: MacOS<br>
Additional tools</p>
<p dir="auto">This repo uses <code class="notranslate">webpack-dev-middleware</code>, <code class="notranslate">webpack-hot-middleware</code>, <code class="notranslate">react-refresh</code>, and <code class="notranslate">@pmmmwh/react-refresh-webpack-plugin</code>, among other packages. The issue may stem from a conflict with one of these, but I don't have enough internal knowledge of webpack or these packages to say which. It could also be a misconfiguration on my part. I'm filing the issue with <code class="notranslate">webpack</code> because I was able to isolate the problem to an update of this package.</p>
<p dir="auto">Let me know if you need any more info!</p> | 1 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tomasteicher/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tomasteicher">@tomasteicher</a>: 'When I want to delete a node, i need to delete all its relationships first. Maybe it would be good when there would be a method that do all this deletions together.</p>
<p dir="auto">For example, when I am deleting a node, I am using this my custom method</p>
<p dir="auto">/**<br>
* delete all nodes from first parameter with all its relationships from the<br>
* database<br>
*<br>
* <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/param/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/param">@param</a> nodes ArrayList of nodes to delete<br>
*/<br>
public static void deleteNodesWithRelationships(ArrayList nodes) {<br>
if (nodes == null || nodes.size() == 0) {<br>
return;<br>
} else {<br>
Map<String, Object> params = new HashMap<String, Object>();<br>
params.put("nodes", nodes);<br>
String query = "START n = node({nodes}) MATCH n-[r]-() DELETE n, r";<br>
ExecutionResult result = executionEngine.execute(query, params);<br>
}<br>
}</p>
<p dir="auto">I am not sure whether this method is optimal for its task. Therefore it would be better when this task (remove node with its relationships) would be part of Neo4j Java API, for example as a method of GraphDatabaseService interface.'</p> | <p dir="auto">This a request for a convenience modifier described in the subject. This would allow Cypher queries to be constructed without having to figure out how to add additional clauses to delete the nodes' relationships.</p>
<p dir="auto">Rationale:</p>
<p dir="auto">For a "simple" delete this is easy enough:</p>
<p dir="auto">START n = node(...) MATCH n-[r?]-() DELETE r,n</p>
<p dir="auto">But when the query gets more complex, the clause needed to find the relationships becomes more complex as well.</p>
<p dir="auto">It would be convenient if the Cypher query could simply indicate the intent of deleting certain nodes and Cypher takes care of doing whatever needs to be done to make that happen. It could look something like:</p>
<p dir="auto">START n = node(...), m=node(...) MATCH [match clause that may find other nodes] FORCE DELETE n, m, other_nodes...</p>
<p dir="auto">This is in keeping with query languages like SQL, in which you define a predicate. That predicate is then used to either return the result or delete the result without requiring additions to the predicate itself.</p> | 1 |
<p dir="auto">Error Description - Screen is keep moving up and down. Following error is thrown</p>
<p dir="auto">Detail Error from the logs<br>
waiting for getByTestId('actions-7').getByTestId('button-anchor')</p>
<p dir="auto">locator resolved to <button type="button" id="button-anchor" class="css-16nx…>…</p>
<p dir="auto">attempting click action</p>
<p dir="auto">waiting for element to be visible, enabled and stable</p>
<p dir="auto">forcing action</p>
<p dir="auto">element is visible, enabled and stable</p>
<p dir="auto">scrolling into view if needed</p>
<p dir="auto">done scrolling</p>
<p dir="auto">performing click action</p>
<p dir="auto">click action done</p>
<p dir="auto">waiting for scheduled navigations to finish</p>
<p dir="auto">navigations have finished</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.XX] "@playwright/test": "^1.35.1"</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]MacOS</li>
<li>Browser: [All, Chromium, Firefox, WebKit]chrome</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</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">projects</span>: <span class="pl-kos">[</span>
<span class="pl-kos">{</span>
<span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
<span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span><span class="pl-kos"></span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
await page.getByRole('checkbox').check();
await expect(page.getByRole('checkbox')).toBeChecked();
});"><pre class="notranslate"><span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should check the box using setChecked'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">setContent</span><span class="pl-kos">(</span><span class="pl-s">`<input id='checkbox' type='checkbox'></input>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'checkbox'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">check</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByRole</span><span class="pl-kos">(</span><span class="pl-s">'checkbox'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBeChecked</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Steps</strong><br>
table contain a set of rows. Each row has a modal dialogue box. by clicking on the modal dialogue box a menu should appear with label as "Re-award base". Since there are many rows scrolling has been implemented.</p>
<ul dir="auto">
<li>[Run the test]</li>
<li>[...]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Expected the row element should be clicked and open the modal dialogue box.<br>
But actually the screen keep moving up and down saying the element is unstable</p> | <h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33]</li>
<li>Operating System: Mac</li>
<li>Browser: All</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto">[https://github.com/your_profile/playwright_issue_title]</p>
<p dir="auto">or</p>
<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
fullyParallel: true,
});"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</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">fullyParallel</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"><strong>Test file (self-contained)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, expect } from '@playwright/test';
// test.describe.configure({ mode: 'parallel' });
test.describe('basic test', () => {
test('first', async ({ page }) => {
await page.goto('https://playwright.dev/');
await expect(page).toHaveTitle(/Playwright/);
});
test('second', async ({ page }) => {
await page.goto('https://playwright.dev/');
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-c">// test.describe.configure({ mode: 'parallel' });</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">describe</span><span class="pl-kos">(</span><span class="pl-s">'basic test'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'first'</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">=></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-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>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'second'</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">=></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-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>
<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>npx playwright test</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">According to the doc, I can set <code class="notranslate">fullyParallel: true</code> to run all tests within a single file in parallel without having <code class="notranslate">test.describe.configure({ mode: 'parallel' });</code> in each file.</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Currently, using <code class="notranslate">fullyParallel: true</code> doesn't run them tests within a single file in parallel. I have use <code class="notranslate">test.describe.configure({ mode: 'parallel' });</code> to make it work</p> | 0 |
<p dir="auto">I am observing that an error thrown by a dynamic import always results in an "uncaught error". Here is an example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// a.ts
try {
await import('./b.ts')
} catch {
console.log('catch')
}"><pre class="notranslate"><span class="pl-c">// a.ts</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">'./b.ts'</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</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">'catch'</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// b.ts
throw Error()"><pre class="notranslate"><span class="pl-c">// b.ts</span>
<span class="pl-k">throw</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Expected Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="catch"><pre class="notranslate"><code class="notranslate">catch
</code></pre></div>
<p dir="auto">Actual Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="catch
error: Uncaught Error
at file:///b.ts:1:7"><pre class="notranslate"><code class="notranslate">catch
error: Uncaught Error
at file:///b.ts:1:7
</code></pre></div> | <p dir="auto">There is relevant failing test in <code class="notranslate">html/webappapis/structured-clone/structured-clone.any.js</code>. We are likely not forwarding the error somewhere.</p> | 0 |
<p dir="auto">Hi. Please see the question I have made here for a description of the problem.</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/34546446/flattening-typescript-typings-or-interfaces" rel="nofollow">http://stackoverflow.com/questions/34546446/flattening-typescript-typings-or-interfaces</a></p>
<p dir="auto">Here's the post:</p>
<p dir="auto">As a TypeScript developer, I have become too used to "Duplicate identifier" issues when working with <code class="notranslate">.d.ts</code> files.</p>
<p dir="auto">Most recently, this occurred because I needed both the typings (<code class="notranslate">.d.ts</code> files) of Angular 2, and Parse.</p>
<p dir="auto">Angular 2 doesn't distribute their <code class="notranslate">.d.ts</code> files through <code class="notranslate">DefinitelyTyped</code>, so I had to fetch Angular 2 through NPM which includes the source files as well.</p>
<p dir="auto">Now, Parse's <code class="notranslate">.d.ts</code> come from <code class="notranslate">DefinitelyTyped</code>. Fine - so far, so good.</p>
<p dir="auto">The issue then arises because both of these libraries depend on Node JS typings. The Node JS typings of Parse are located in the <code class="notranslate">typings</code> folder, whereas the Node JS typings of Angular 2 are located in a subfolder under <code class="notranslate">node_modules/angular2</code>.</p>
<p dir="auto">This gives me a huge amount of duplicate identifier issues when compiling.</p>
<h3 dir="auto">So, the big question(s)</h3>
- Can I flatten `.d.ts` files so that it doesn't have duplicates somehow?
- Can I somehow make the TypeScript compiler ignore duplicate interface definitions? | <p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.7</p>
<p dir="auto"><strong>Code</strong></p>
<p dir="auto">Transpiling <code class="notranslate">_apply.js</code> of <code class="notranslate">[email protected]</code> with the command</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tsc --allowJs _apply.js --out apply.js -m amd"><pre class="notranslate"><code class="notranslate">tsc --allowJs _apply.js --out apply.js -m amd
</code></pre></div>
<p dir="auto">breaks the code. Apparently, the (arguably invalid) <code class="notranslate">@param {...*} args</code> JSDoc comment causes the TypeScript compiler to generate code as if the parameter declaration was <code class="notranslate">apply(func, thisArg, ...args)</code>, although it is not.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
var length = args.length;
switch (length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
export default apply;"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * A faster alternative to `Function#apply`, this function invokes `func`</span>
<span class="pl-c"> * with the `this` binding of `thisArg` and the arguments of `args`.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@private</span></span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">Function</span>} func The function to invoke.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">*</span>} thisArg The `this` binding of `func`.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">...*</span>} args The arguments to invoke `func` with.</span>
<span class="pl-c"> * <span class="pl-k">@returns</span> {<span class="pl-smi">*</span>} Returns the result of `func`.</span>
<span class="pl-c"> */</span>
<span class="pl-k">function</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">func</span><span class="pl-kos">,</span> <span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">length</span> <span class="pl-c1">=</span> <span class="pl-s1">args</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">0</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">1</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">2</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">3</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">args</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">apply</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="define("_apply", ["require", "exports"], function (require, exports) {
"use strict";
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
var length = args.length;
switch (length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
exports.__esModule = true;
exports["default"] = apply;
});"><pre class="notranslate"><span class="pl-en">define</span><span class="pl-kos">(</span><span class="pl-s">"_apply"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"require"</span><span class="pl-kos">,</span> <span class="pl-s">"exports"</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">require</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-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * A faster alternative to `Function#apply`, this function invokes `func`</span>
<span class="pl-c"> * with the `this` binding of `thisArg` and the arguments of `args`.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@private</span></span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">Function</span>} func The function to invoke.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">*</span>} thisArg The `this` binding of `func`.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">...*</span>} args The arguments to invoke `func` with.</span>
<span class="pl-c"> * <span class="pl-k">@returns</span> {<span class="pl-smi">*</span>} Returns the result of `func`.</span>
<span class="pl-c"> */</span>
<span class="pl-k">function</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">func</span><span class="pl-kos">,</span> <span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">length</span> <span class="pl-c1">=</span> <span class="pl-s1">args</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">0</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">1</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">2</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">3</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">args</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">__esModule</span> <span class="pl-c1">=</span> <span class="pl-c1">true</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-s1">apply</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>Actual behavior:</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="define("_apply", ["require", "exports"], function (require, exports) {
"use strict";
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg) {
var args = [];
for (var _i = 2; _i < arguments.length; _i++) {
args[_i - 2] = arguments[_i];
}
var length = args.length;
switch (length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
exports.__esModule = true;
exports["default"] = apply;
});"><pre class="notranslate"><span class="pl-en">define</span><span class="pl-kos">(</span><span class="pl-s">"_apply"</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">"require"</span><span class="pl-kos">,</span> <span class="pl-s">"exports"</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">require</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-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * A faster alternative to `Function#apply`, this function invokes `func`</span>
<span class="pl-c"> * with the `this` binding of `thisArg` and the arguments of `args`.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * <span class="pl-k">@private</span></span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">Function</span>} func The function to invoke.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">*</span>} thisArg The `this` binding of `func`.</span>
<span class="pl-c"> * <span class="pl-k">@param</span> {<span class="pl-smi">...*</span>} args The arguments to invoke `func` with.</span>
<span class="pl-c"> * <span class="pl-k">@returns</span> {<span class="pl-smi">*</span>} Returns the result of `func`.</span>
<span class="pl-c"> */</span>
<span class="pl-k">function</span> <span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">func</span><span class="pl-kos">,</span> <span class="pl-s1">thisArg</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">args</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_i</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span> <span class="pl-c1"><</span> <span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">_i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-s1">_i</span> <span class="pl-c1">-</span> <span class="pl-c1">2</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">_i</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">var</span> <span class="pl-s1">length</span> <span class="pl-c1">=</span> <span class="pl-s1">args</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span>
<span class="pl-k">switch</span> <span class="pl-kos">(</span><span class="pl-s1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">case</span> <span class="pl-c1">0</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">1</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">2</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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-kos">;</span>
<span class="pl-k">case</span> <span class="pl-c1">3</span>: <span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">args</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-s1">func</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-s1">thisArg</span><span class="pl-kos">,</span> <span class="pl-s1">args</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">__esModule</span> <span class="pl-c1">=</span> <span class="pl-c1">true</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-s1">apply</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I've not been able to reproduce this in the TypeScript playground (currently running 1.8.2), which suggests a regression somewhere between 1.8.2 and 1.8.7.</p> | 0 |
<p dir="auto">It would be nice to be able to set a flag that will trigger invariant warnings any time a prop is referenced from or passed into a component, but that was not declared in propTypes.</p> | <p dir="auto">It would be great if in debug mode react would warn you when you pass in a property on props which is not specified in the propTypes object for that component. i.e. a way to enforce that props should ONLY have the props specified in propTypes and no others.</p>
<p dir="auto">This would prevent use of undocumented properties and also allow better code maintenance as unused props would be more easily removed.</p> | 1 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-galaxy</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.5.0 (devel 33c4351a35) last updated 2018/01/23 14:32:52 (GMT -700)
config file = None
configured module search path = [u'/home/benb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/benb/dev/ansible/ansible/lib/ansible
executable location = /home/benb/dev/ansible/ansible/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.5.0 (devel 33c4351a35) last updated 2018/01/23 14:32:52 (GMT -700)
config file = None
configured module search path = [u'/home/benb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/benb/dev/ansible/ansible/lib/ansible
executable location = /home/benb/dev/ansible/ansible/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">If a role has been installed in the default role path, it cannot be installed in another path using -p or --roles-path</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible-galaxy install jdauphant.nginx
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully
$ ansible-galaxy install jdauphant.nginx -p ~/test
[WARNING]: - jdauphant.nginx (v2.13) is already installed - use --force to change version to unspecified
$ ansible-galaxy install jdauphant.nginx -p ~/test --force
- changing role jdauphant.nginx from v2.13 to unspecified
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully"><pre class="notranslate"><code class="notranslate">$ ansible-galaxy install jdauphant.nginx
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully
$ ansible-galaxy install jdauphant.nginx -p ~/test
[WARNING]: - jdauphant.nginx (v2.13) is already installed - use --force to change version to unspecified
$ ansible-galaxy install jdauphant.nginx -p ~/test --force
- changing role jdauphant.nginx from v2.13 to unspecified
- downloading role 'nginx', owned by jdauphant
- downloading role from https://github.com/jdauphant/ansible-role-nginx/archive/v2.13.tar.gz
- extracting jdauphant.nginx to /home/benb/.ansible/roles/jdauphant.nginx
- jdauphant.nginx (v2.13) was installed successfully
</code></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">jdauphant.nginx should be installed in <code class="notranslate">~/test</code> and <code class="notranslate">/home/benb/.ansible/roles/</code></p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">jdauphant.nginx is installed only in <code class="notranslate">/home/benb/.ansible/roles/</code></p> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">ansible-vault</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.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">export ANSIBLE_VAULT_PASSWORD_FILE=~/.vault_pass.txt</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Ubuntu 16.04.2 LTS managing Ubuntu 12.04 LTS</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I was trying to use the Single Encrypted Variable feature for storing a password for new user creation, but I could not log in with the supplied password.</p>
<p dir="auto">I used the debug module to show the output of the password_hash. Realizing that I could not be sure that the hash function had the proper input, I used to_nice_json instead. The resulting output was the encrypted ANSIBLE_VAULT string.</p>
<p dir="auto">To verify I tried using the entire string as the password input when I ssh into the target host and it worked.</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="---
# vars file
upasswd: !vault |
$ANSIBLE_VAULT;1.1;AES256
33356630336539323036653532366332363230663664363839656230366462326162336538393065
6533663030353564663133646636396561383365383061610a353632376561303564626630616162
31616439613431333937643835653261616666653365333732366463616339316464616635353564
6236383732386636380a626130373936626639373861623263306435386639383839666261663434
3461
---
- debug:
msg: "{{ upasswd | to_nice_json }}""><pre class="notranslate">---
<span class="pl-c"><span class="pl-c">#</span> vars file</span>
<span class="pl-ent">upasswd</span>: <span class="pl-k">!vault</span> <span class="pl-s">|</span>
<span class="pl-s"> $ANSIBLE_VAULT;1.1;AES256</span>
<span class="pl-s"> 33356630336539323036653532366332363230663664363839656230366462326162336538393065</span>
<span class="pl-s"> 6533663030353564663133646636396561383365383061610a353632376561303564626630616162</span>
<span class="pl-s"> 31616439613431333937643835653261616666653365333732366463616339316464616635353564</span>
<span class="pl-s"> 6236383732386636380a626130373936626639373861623263306435386639383839666261663434</span>
<span class="pl-s"> 3461</span>
<span class="pl-s"></span>
<span class="pl-s"></span>---
- <span class="pl-ent">debug</span>:
<span class="pl-ent">msg</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ upasswd | to_nice_json }}<span class="pl-pds">"</span></span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"testpw\""
}"><pre class="notranslate"><code class="notranslate">TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"testpw\""
}
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"$ANSIBLE_VAULT;1.1;AES256\\n33356630336539323036653532366332363230663664363839656230366462326162336538393065\\n6533663030353564663133646636396561383365383061610a353632376561303564626630616162\\n31616439613431333937643835653261616666653365333732366463616339316464616635353564\\n6236383732386636380a626130373936626639373861623263306435386639383839666261663434\\n3461\\n\""
}"><pre class="notranslate"><code class="notranslate">TASK [adduser : debug] *********************************************************************************************
task path: /home/abonaparte/src/git/ansible/roles/adduser/tasks/adduser.yaml:2
ok: [app] => {
"msg": "\"$ANSIBLE_VAULT;1.1;AES256\\n33356630336539323036653532366332363230663664363839656230366462326162336538393065\\n6533663030353564663133646636396561383365383061610a353632376561303564626630616162\\n31616439613431333937643835653261616666653365333732366463616339316464616635353564\\n6236383732386636380a626130373936626639373861623263306435386639383839666261663434\\n3461\\n\""
}
</code></pre></div> | 0 |
<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ochafik/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ochafik">@ochafik</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.1.1 (babel-core 6.0.20)</li>
<li><strong>Node version:</strong> 5.5.0</li>
<li><strong>npm version:</strong> 3.3.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--presets es2015"><pre class="notranslate"><code class="notranslate">--presets es2015
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Foo { foo() { let foo = 1 } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Foo</span> <span class="pl-kos">{</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-k">let</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">The following code causes a bug:</p>
<p dir="auto"><code class="notranslate">echo "class Foo { foo() { let foo = 1 } }" | babel --presets es2015</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: unknown: Duplicate declaration "foo"
> 1 | class Foo { foo() { let foo = 1 } }"><pre class="notranslate"><code class="notranslate">TypeError: unknown: Duplicate declaration "foo"
> 1 | class Foo { foo() { let foo = 1 } }
</code></pre></div>
<p dir="auto">Note that using <code class="notranslate">var</code> instead of <code class="notranslate">let</code> is fine:<br>
<code class="notranslate">echo "class Foo { foo() { var foo = 1 } }" | babel --presets es2015</code></p> | <h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
babel throws</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Duplicate declaration "foo" (This is an error on an internal node. Probably an internal error.)"><pre class="notranslate"><code class="notranslate">Duplicate declaration "foo" (This is an error on an internal node. Probably an internal error.)
</code></pre></div>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>REPL or Repo link if applicable:</li>
</ul>
<p dir="auto"><a href="https://babeljs.io/repl#?babili=false&browsers=Chrome%20%3E%3D%2045%2Clast%202%20Firefox%20versions%2Cie%20%3E%3D%209%2CEdge%20%3E%3D%2012%2CiOS%20%3E%3D%209%2CAndroid%20%3E%3D%204%2Clast%202%20ChromeAndroid%20versions&build=&builtIns=false&spec=false&loose=false&code_lz=BQQwzgngdgxgBMAlHAvAPjgbwFBzw8aeJVDHffGAeyjABc4AzKq1OAFgCYBuXfAX0RI-g4XiA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=&prettier=false&targets=&version=7.0.0-beta.34&envVersion=7.0.0-beta.34" rel="nofollow">https://babeljs.io/repl#?babili=false&browsers=Chrome%20%3E%3D%2045%2Clast%202%20Firefox%20versions%2Cie%20%3E%3D%209%2CEdge%20%3E%3D%2012%2CiOS%20%3E%3D%209%2CAndroid%20%3E%3D%204%2Clast%202%20ChromeAndroid%20versions&build=&builtIns=false&spec=false&loose=false&code_lz=BQQwzgngdgxgBMAlHAvAPjgbwFBzw8aeJVDHffGAeyjABc4AzKq1OAFgCYBuXfAX0RI-g4XiA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=&prettier=false&targets=&version=7.0.0-beta.34&envVersion=7.0.0-beta.34</a></p>
<p dir="auto">Note: you have to manually add <code class="notranslate">@babel/transform-regenerator</code> 7.0.0 plugin since the url does not synchronize plugin selections.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(async () => {
(async () => {
const foo = 42;
})()
})()
"><pre class="notranslate"><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">42</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/code</strong><br>
Compiled as regenerator calls</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
plugins: [
"@babel/transform-regenerator"
]
}"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
<span class="pl-c1">plugins</span>: <span class="pl-kos">[</span>
<span class="pl-s">"@babel/transform-regenerator"</span>
<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v7.0.0</li>
<li>Node/npm version: Node 10</li>
<li>OS: macOS 10.14</li>
<li>Monorepo no</li>
<li>How you are using Babel: cli</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong><br>
Workaround: add <code class="notranslate">await</code> to the nested async function.</p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
Possibly related: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="353773136" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/8525" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/8525/hovercard" href="https://github.com/babel/babel/issues/8525">#8525</a></p> | 0 |
<p dir="auto">Incorrect/invalid select tag is generated if choices have duplicate content ('Category 4').</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$f = $this->formFactory->createNamedBuilder('category', 'form')
->add('parent_category', 'choice', array(
'label' => 'Name',
'choices' => array(
'1' => 'Category 1',
'2' => 'Category 4',
'3' => 'Category 3',
'4' => 'Category 4',
'5' => 'Category 5'
)
))
->add('save', 'submit', array(
'label' => 'Save'
))
->getForm();"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>f</span> = <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-><span class="pl-c1">formFactory</span>-><span class="pl-en">createNamedBuilder</span>(<span class="pl-s">'category'</span>, <span class="pl-s">'form'</span>)
-><span class="pl-en">add</span>(<span class="pl-s">'parent_category'</span>, <span class="pl-s">'choice'</span>, <span class="pl-en">array</span>(
<span class="pl-s">'label'</span> => <span class="pl-s">'Name'</span>,
<span class="pl-s">'choices'</span> => <span class="pl-en">array</span>(
<span class="pl-s">'1'</span> => <span class="pl-s">'Category 1'</span>,
<span class="pl-s">'2'</span> => <span class="pl-s">'Category 4'</span>,
<span class="pl-s">'3'</span> => <span class="pl-s">'Category 3'</span>,
<span class="pl-s">'4'</span> => <span class="pl-s">'Category 4'</span>,
<span class="pl-s">'5'</span> => <span class="pl-s">'Category 5'</span>
)
))
-><span class="pl-en">add</span>(<span class="pl-s">'save'</span>, <span class="pl-s">'submit'</span>, <span class="pl-en">array</span>(
<span class="pl-s">'label'</span> => <span class="pl-s">'Save'</span>
))
-><span class="pl-en">getForm</span>();</pre></div>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<select>
<option value="1" >Category 1</option>
<option value="4" >Category 4</option>
<option value="3" >Category 3</option>
<option value="5" >Category 5</option>
</select>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">select</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">1</span>" <span class="pl-kos">></span>Category 1<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">4</span>" <span class="pl-kos">></span>Category 4<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">3</span>" <span class="pl-kos">></span>Category 3<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">5</span>" <span class="pl-kos">></span>Category 5<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"></</span><span class="pl-ent">select</span><span class="pl-kos">></span></pre></div>
<p dir="auto">Where is option with value="2"?</p> | <p dir="auto">Hello!</p>
<p dir="auto">Here is the new list for master :)<br>
(up to <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/symfony/symfony/commit/8725243a88b6d49d1d9a04131d09565d899c3a6c/hovercard" href="https://github.com/symfony/symfony/commit/8725243a88b6d49d1d9a04131d09565d899c3a6c"><tt>8725243</tt></a></p>
<p dir="auto">Validator<br>
/src/Symfony/Component/Validator/Resources/translations</p>
<p dir="auto">Missing ids</p>
<table role="table">
<thead>
<tr>
<th>Locale</th>
<th>Message ids</th>
</tr>
</thead>
<tbody>
<tr>
<td>af</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>ar</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>bg</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>cy</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>da</td>
<td>64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>el</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>et</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>eu</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>fa</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>fi</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>gl</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>he</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>hr</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>hy</td>
<td>49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>id</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>lb</td>
<td>78</td>
</tr>
<tr>
<td>mn</td>
<td>40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>nb</td>
<td>41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>no</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>ro</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>sq</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>sr_Cyrl</td>
<td>78</td>
</tr>
<tr>
<td>sr_Latn</td>
<td>78</td>
</tr>
<tr>
<td>th</td>
<td>78</td>
</tr>
<tr>
<td>tr</td>
<td>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78</td>
</tr>
<tr>
<td>uk</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>vi</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>zh_CN</td>
<td>73 74 75 76 77 78</td>
</tr>
<tr>
<td>zh_TW</td>
<td>73 74 75 76 77 78</td>
</tr>
</tbody>
</table>
<p dir="auto">Number of options differences:<br>
translation id (# of options in 'en', # of options in 'locale')</p>
<table role="table">
<thead>
<tr>
<th>Locale</th>
<th>Message ids</th>
</tr>
</thead>
<tbody>
<tr>
<td>ar</td>
<td>19 (2-6) 21 (2-6) 48 (2-6) 54 (2-6) 55 (2-6) 56 (2-6) 6 (2-6) 7 (2-6)</td>
</tr>
<tr>
<td>ca</td>
<td>21 (2-1)</td>
</tr>
<tr>
<td>cs</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>cy</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>da</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>et</td>
<td>19 (2-1) 21 (2-1) 48 (1-2) 54 (1-2) 55 (1-2) 56 (1-3) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>fi</td>
<td>19 (2-1) 21 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>hr</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>hy</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>id</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>ja</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>lb</td>
<td>19 (2-1) 21 (2-1) 54 (2-1) 55 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>lt</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>mn</td>
<td>19 (2-1) 21 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>nb</td>
<td>19 (2-1) 21 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>no</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>pl</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-1) 55 (2-1) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>pt</td>
<td>19 (2-1) 48 (2-1)</td>
</tr>
<tr>
<td>ro</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>ru</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>sk</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>sl</td>
<td>19 (2-4) 21 (2-4) 48 (2-4) 54 (2-4) 55 (2-4) 56 (2-4) 6 (2-4) 7 (2-4)</td>
</tr>
<tr>
<td>sr_Cyrl</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>sr_Latn</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-3)</td>
</tr>
<tr>
<td>th</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>tr</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>uk</td>
<td>19 (2-3) 21 (2-3) 48 (2-3) 54 (2-3) 55 (2-3) 56 (2-3) 6 (2-3) 7 (2-1)</td>
</tr>
<tr>
<td>zh_CN</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
<tr>
<td>zh_TW</td>
<td>19 (2-1) 21 (2-1) 48 (2-1) 54 (2-1) 55 (2-1) 56 (2-1) 6 (2-1) 7 (2-1)</td>
</tr>
</tbody>
</table> | 0 |
<pre class="notranslate">$ cat x.go
package p
type T interface{
_()
_()
}
$ go tool 6g x.go
x.go:6: internal compiler error: sigcmp vs sortinter _ _
It's inclear what a compiler should do, and the spec is silent. See spec <a href="https://golang.org/issue/6604" rel="nofollow">issue #6604</a>.
Once 6604 is resolved, this should be fixed.
For the reference: gccgo reports a duplicate method error which is peculiar since we
never report duplicates of _ objects. For instance, in structs we count on being able to
define multiple _ fields.</pre> | <p dir="auto">by <strong>getisboy</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
1. Compile the following code using 8g and run it:
package main
import "fmt"
func main() {
slice := make([]int, 6, 6);
fmt.Print(int(float(len(slice))), " ");
for i := 1; i < int(float(len(slice))); i++ {}
fmt.Println(int(float(len(slice))));
}
What is the expected output? What do you see instead?
This should print "6 6", but instead it prints "6 -2147483648".
What is your $GOOS? $GOARCH?
$GOOS is linux
$GOARCH is 386
Which revision are you using? (hg identify)
"77ab01e09eb7 tip"
Please provide any additional information below.
The bug only occurs when the length of the slice is 6 or greater.
The value of len(slice) is the same before and after the loop.
If you remove the line containing the loop, it prints the correct output.
I tried running it on gofmt.com and it runs correctly.</pre> | 0 |
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.1</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Create two files with DAGs<br>
Both DAGs must have the same ID<br>
Airflow will constantly update DAG structure/code resulting in dozens of weird behaviors and errors:</p>
<ul dir="auto">
<li>wrong DAG visualization</li>
<li>wrong DAG code</li>
<li>errors about missing tasks from time to time</li>
</ul>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">Airflow should show an error to the user and disable both DAGs.</p>
<h3 dir="auto">How to reproduce</h3>
<ol dir="auto">
<li>Create two files with DAGs</li>
<li>Both DAGs should have the same ID</li>
</ol>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 22.04</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Docker-Compose</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul> | <p dir="auto"><strong>Description</strong></p>
<p dir="auto">I would like to see an error in Airflow UI (like <code class="notranslate">"Broken DAG: duplicate DAG-id"</code>) when a DAG is present that has the same (non-unique) DAG-id as another DAG. Currently, Airflow silently ignores one of these duplicated DAGs.</p>
<p dir="auto"><strong>Use case / motivation</strong><br>
For users that either knowingly or unknowingly have multiple DAGs with the same DAG-id (which could happen especially in the case of dynamically generating DAGs), unintended/weird functionality can result as Airflow tries to figure out which DAG is the right one. It is not clear how Airflow will choose, and if that choice can change each time it parses for DAG changes.</p>
<p dir="auto"><strong>Additional Info</strong><br>
Currently in Airflow, my understanding is that the DAG file processor creates a new process and a new DagBag per file. As a result each DagBag only parses one DAG-script and thus DAGs with duplicate ids in different scripts are never detected. <a href="https://github.com/apache/airflow/blob/main/airflow/dag_processing/processor.py#L613">https://github.com/apache/airflow/blob/main/airflow/dag_processing/processor.py#L613</a></p>
<p dir="auto">Additionally, there's already a test and exception (<code class="notranslate">AirflowDagDuplicatedIdException</code>) in place for this, but it depends on a single DagBag having multiple DAGs in it, which isn't the case when actually running Airflow, from discussion with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/BasPH/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/BasPH">@BasPH</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/uranusjr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/uranusjr">@uranusjr</a>.<br>
<a href="https://github.com/apache/airflow/blob/2.1.3/airflow/models/dagbag.py#L405-L409">https://github.com/apache/airflow/blob/2.1.3/airflow/models/dagbag.py#L405-L409</a><br>
<a href="https://github.com/apache/airflow/blob/main/tests/models/test_dagbag.py#L143-L173">https://github.com/apache/airflow/blob/main/tests/models/test_dagbag.py#L143-L173</a></p>
<p dir="auto"><strong>Related Issues</strong></p>
<p dir="auto">I did not find other issues related to this, when searching for "duplicate DAG" or "duplicate DAG-id".</p> | 1 |
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The <code class="notranslate">horizontalalignment</code> keyword in <a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.suptitle.html" rel="nofollow">suptitle()</a> produces title alignment which is opposite to what I expect from it. Setting <code class="notranslate">horizontalalignment='left'</code> puts the alignment right, and vice versa.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
for direction in ['left', 'center', 'right']:
fig = plt.figure()
fig.suptitle('This is a test title', horizontalalignment=direction)
plt.subplot(1,1,1)
plt.plot(range(5),range(5))
plt.savefig('halign-' + direction + '.png')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">for</span> <span class="pl-s1">direction</span> <span class="pl-c1">in</span> [<span class="pl-s">'left'</span>, <span class="pl-s">'center'</span>, <span class="pl-s">'right'</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">fig</span>.<span class="pl-en">suptitle</span>(<span class="pl-s">'This is a test title'</span>, <span class="pl-s1">horizontalalignment</span><span class="pl-c1">=</span><span class="pl-s1">direction</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">1</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">plot</span>(<span class="pl-en">range</span>(<span class="pl-c1">5</span>),<span class="pl-en">range</span>(<span class="pl-c1">5</span>))
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'halign-'</span> <span class="pl-c1">+</span> <span class="pl-s1">direction</span> <span class="pl-c1">+</span> <span class="pl-s">'.png'</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto"><code class="notranslate">horizontalalignment='left'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1325693f54b50f81833a9e6743076b356caf5a5ab8bcccd78ccf0ab9d42be624/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d6c6566742e706e67"><img src="https://camo.githubusercontent.com/1325693f54b50f81833a9e6743076b356caf5a5ab8bcccd78ccf0ab9d42be624/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d6c6566742e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-left.png" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">horizontalalignment='center'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/473d0907351dff94365e026b14e0e0fa03b60caced981ab6db30ed891396506c/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d63656e7465722e706e67"><img src="https://camo.githubusercontent.com/473d0907351dff94365e026b14e0e0fa03b60caced981ab6db30ed891396506c/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d63656e7465722e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-center.png" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">horizontalalignment='right'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b4a027cabb683892711a8fadaa9c4d06584f22654841b51025a2026938080f05/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d72696768742e706e67"><img src="https://camo.githubusercontent.com/b4a027cabb683892711a8fadaa9c4d06584f22654841b51025a2026938080f05/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d72696768742e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-right.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><code class="notranslate">horizontalalignment='left'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/b4a027cabb683892711a8fadaa9c4d06584f22654841b51025a2026938080f05/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d72696768742e706e67"><img src="https://camo.githubusercontent.com/b4a027cabb683892711a8fadaa9c4d06584f22654841b51025a2026938080f05/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d72696768742e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-right.png" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">horizontalalignment='center'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/473d0907351dff94365e026b14e0e0fa03b60caced981ab6db30ed891396506c/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d63656e7465722e706e67"><img src="https://camo.githubusercontent.com/473d0907351dff94365e026b14e0e0fa03b60caced981ab6db30ed891396506c/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d63656e7465722e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-center.png" style="max-width: 100%;"></a></p>
<p dir="auto"><code class="notranslate">horizontalalignment='right'</code>:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1325693f54b50f81833a9e6743076b356caf5a5ab8bcccd78ccf0ab9d42be624/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d6c6566742e706e67"><img src="https://camo.githubusercontent.com/1325693f54b50f81833a9e6743076b356caf5a5ab8bcccd78ccf0ab9d42be624/68747470733a2f2f6164616d7367616172642e646b2f66696c65735f6e6f6e7075622f68616c69676e2d6c6566742e706e67" alt="" data-canonical-src="https://adamsgaard.dk/files_nonpub/halign-left.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Tested on OpenBSD (6.6) and Void Linux (x86_64, glibc)</li>
<li>Matplotlib version: Tested on 2.2.4, 3.1.0, 3.1.1, 3.1.2</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): GTK3Agg and agg</li>
<li>Python version: Tested on 3.7.4 and 3.6.9</li>
<li>Jupyter version (if applicable): N/A</li>
<li>Other libraries: N/A</li>
</ul>
<p dir="auto">Matplotlib and Python are installed through the Void linux and OpenBSD distribution packages.</p> | <h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto"><code class="notranslate">horizontalalignment = 'left'</code> aligns the title on the right, <code class="notranslate">horizontalalignment = 'right'</code> aligns a short title on the left, <code class="notranslate">horizontalalignment = 'right'</code> displaces a longer title on the far left</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="# Left alignment test, short title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the left', horizontalalignment = 'left')
ax.set_title('This axis title should be on the left', loc='left');
fig.savefig('left_align.png')
# Right alignment test, short title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the right', horizontalalignment = 'right')
ax.set_title('This axis title should be on the right', loc='right');
fig.savefig('right_align.png')
# Right alignment test, longer title
fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle should be on the right but it is far left', horizontalalignment = 'right')
ax.set_title('This axis title should be on the left', loc='left')
fig.savefig('far_left.png');"><pre class="notranslate"><span class="pl-c"># Left alignment test, short title</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">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">9</span>,<span class="pl-c1">4</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">fig</span>.<span class="pl-en">suptitle</span>(<span class="pl-s">'This figure suptitle should be on the left'</span>, <span class="pl-s1">horizontalalignment</span> <span class="pl-c1">=</span> <span class="pl-s">'left'</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'This axis title should be on the left'</span>, <span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-s">'left'</span>);
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'left_align.png'</span>)
<span class="pl-c"># Right alignment test, short title</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">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">9</span>,<span class="pl-c1">4</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">fig</span>.<span class="pl-en">suptitle</span>(<span class="pl-s">'This figure suptitle should be on the right'</span>, <span class="pl-s1">horizontalalignment</span> <span class="pl-c1">=</span> <span class="pl-s">'right'</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'This axis title should be on the right'</span>, <span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-s">'right'</span>);
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'right_align.png'</span>)
<span class="pl-c"># Right alignment test, longer title</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">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">9</span>,<span class="pl-c1">4</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">fig</span>.<span class="pl-en">suptitle</span>(<span class="pl-s">'This figure suptitle should be on the right but it is far left'</span>, <span class="pl-s1">horizontalalignment</span> <span class="pl-c1">=</span> <span class="pl-s">'right'</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'This axis title should be on the left'</span>, <span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-s">'left'</span>)
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'far_left.png'</span>);</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<ul dir="auto">
<li>
<p dir="auto">Left alignment test, short title<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3726359/45871500-f435b900-bd8d-11e8-9d57-754958f583b4.png"><img src="https://user-images.githubusercontent.com/3726359/45871500-f435b900-bd8d-11e8-9d57-754958f583b4.png" alt="left_align" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">Right alignment test, short title<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3726359/45871566-116a8780-bd8e-11e8-968c-58f873505e19.png"><img src="https://user-images.githubusercontent.com/3726359/45871566-116a8780-bd8e-11e8-968c-58f873505e19.png" alt="right_align" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">Right alignment test, longer title<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3726359/45871581-192a2c00-bd8e-11e8-8540-e78304e9ccc6.png"><img src="https://user-images.githubusercontent.com/3726359/45871581-192a2c00-bd8e-11e8-8540-e78304e9ccc6.png" alt="far_left" style="max-width: 100%;"></a></p>
</li>
</ul>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">The following code manually sets the figure title at the expected position:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fig = plt.figure(figsize=(9,4))
ax = fig.add_subplot(111)
fig.suptitle('This figure suptitle is long but it is manually positioned', x = 0.38)
ax.set_title('This axis title should be on the left', loc='left')
fig.savefig('manual_pos.png');"><pre class="notranslate"><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">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">9</span>,<span class="pl-c1">4</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">fig</span>.<span class="pl-en">suptitle</span>(<span class="pl-s">'This figure suptitle is long but it is manually positioned'</span>, <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-c1">0.38</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'This axis title should be on the left'</span>, <span class="pl-s1">loc</span><span class="pl-c1">=</span><span class="pl-s">'left'</span>)
<span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'manual_pos.png'</span>);</pre></div>
<p dir="auto">Which gives:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3726359/45871836-b4bb9c80-bd8e-11e8-94e9-e453adc39fda.png"><img src="https://user-images.githubusercontent.com/3726359/45871836-b4bb9c80-bd8e-11e8-94e9-e453adc39fda.png" alt="manual_pos" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Windows</li>
<li>Matplotlib version: 2.1.2 and 2.2.3</li>
<li>Matplotlib backend: agg</li>
<li>Python version: 3.6.4</li>
<li>Jupyter version: 4.4.0</li>
</ul> | 1 |
<p dir="auto">It would be nice if the popovers could be closed not only on the same element that opens the popover. So you just click outside the popover to close it. Like dropdowns.</p> | <p dir="auto">Is it possible to add a options to make over popover hidden when we click on a popover or on the body (html page)</p>
<p dir="auto">For the feature version.</p>
<p dir="auto">Thank's for your work</p> | 1 |
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
<code class="notranslate">x += y</code> doesn't evaluate the <code class="notranslate">x</code> value before <code class="notranslate">await</code>ing.</p>
<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="let x = 0;
async function test() {
x += await 1;
console.log(x);
}
test();
x += 1;"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">x</span> <span class="pl-c1">+=</span> <span class="pl-k">await</span> <span class="pl-c1">1</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">x</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">x</span> <span class="pl-c1">+=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
<code class="notranslate">1</code> should be logged.<br>
However, <code class="notranslate">2</code> is being logged.</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong><br>
<a href="https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=DYUwLgBAHhC8EAYDcAoAhgZwJ4DsDGEAZgK75gCWA9jhGCBmABQCUEA3ihNBANTxoB3NOUgBGVFzzUMlUADpglAOaMozVAF8UdBi1Qw-EcUA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&lineWrap=false&presets=es2015%2Ces2017&prettier=false&targets=&version=6.26.0&envVersion=" rel="nofollow">Preset 2015 and 2017</a>.</p>
<p dir="auto"><strong>Environment</strong><br>
<a href="https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=DYUwLgBAHhC8EAYDcAoAhgZwJ4DsDGEAZgK75gCWA9jhGCBmABQCUEA3ihNBANTxoB3NOUgBGVFzzUMlUADpglAOaMozVAF8UdBi1Qw-EcUA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&lineWrap=false&presets=es2015%2Ces2017&prettier=false&targets=&version=6.26.0&envVersion=" rel="nofollow">The website</a>.</p>
<p dir="auto"><strong>Possible Solution</strong><br>
Convert <code class="notranslate">x += await y</code> into <code class="notranslate">x = x + await y</code> as a first step.</p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9323190/40719126-00852e7c-6445-11e8-94e3-0b2bd090ed4c.png"><img width="1031" alt="screen shot 2018-05-30 at 8 06 36 pm" src="https://user-images.githubusercontent.com/9323190/40719126-00852e7c-6445-11e8-94e3-0b2bd090ed4c.png" style="max-width: 100%;"></a></p> | <h3 dir="auto">Input Code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="result = { __proto__: x, __proto__: y } = value;"><pre class="notranslate"><span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">__proto__</span>: <span class="pl-s1">x</span><span class="pl-kos">,</span> <span class="pl-c1">__proto__</span>: <span class="pl-s1">y</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>
<p dir="auto">presets - latest</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No error</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Error: <code class="notranslate">Redefinition of __proto__ property</code></p>
<h3 dir="auto">Possible Solution</h3>
<h3 dir="auto">Context</h3>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td></td>
</tr>
<tr>
<td>node</td>
<td></td>
</tr>
<tr>
<td>npm</td>
<td></td>
</tr>
<tr>
<td>Operating System</td>
<td></td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Any plan about DOMParser? right now I've to switch back to Node.js and using <code class="notranslate">jsdom</code>.</p>
<p dir="auto">I've seen DOM feature request in the Issues column and someone said might release on v1.0?</p> | <p dir="auto">It would be pretty awesome if I could use Deno for parsing, transforming, and serializing XML without a third-party module, just like I can in the browser:</p>
<ul dir="auto">
<li><a href="https://gistpreview.github.io/?a27f7e83972e7af2aa0edbb242ae8ef7" rel="nofollow">https://gistpreview.github.io/?a27f7e83972e7af2aa0edbb242ae8ef7</a></li>
<li><a href="https://gist.github.com/MarkTiedemann/a27f7e83972e7af2aa0edbb242ae8ef7">https://gist.github.com/MarkTiedemann/a27f7e83972e7af2aa0edbb242ae8ef7</a></li>
</ul> | 1 |
<p dir="auto">This might just be <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="341348846" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/28126" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/28126/hovercard" href="https://github.com/JuliaLang/julia/issues/28126">#28126</a>, but it looks like a separate problem. On 1.0.2:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> using BenchmarkTools
julia> v = fill(2.0, 50000);
julia> v2 = vcat(v, missing);
julia> v3 = vcat(missing, v);
julia> @btime $v .* 3.0;
33.105 μs (2 allocations: 390.70 KiB)
julia> @btime $v2 .* 3.0;
1.610 ms (99498 allocations: 2.33 MiB)
julia> @btime $v3 .* 3.0;
3.867 ms (7 allocations: 439.77 KiB)"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-k">using</span> BenchmarkTools
julia<span class="pl-k">></span> v <span class="pl-k">=</span> <span class="pl-c1">fill</span>(<span class="pl-c1">2.0</span>, <span class="pl-c1">50000</span>);
julia<span class="pl-k">></span> v2 <span class="pl-k">=</span> <span class="pl-c1">vcat</span>(v, <span class="pl-c1">missing</span>);
julia<span class="pl-k">></span> v3 <span class="pl-k">=</span> <span class="pl-c1">vcat</span>(<span class="pl-c1">missing</span>, v);
julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span>v <span class="pl-k">.*</span> <span class="pl-c1">3.0</span>;
<span class="pl-c1">33.105</span> μs (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">390.70</span> KiB)
julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span>v2 <span class="pl-k">.*</span> <span class="pl-c1">3.0</span>;
<span class="pl-c1">1.610</span> ms (<span class="pl-c1">99498</span> allocations<span class="pl-k">:</span> <span class="pl-c1">2.33</span> MiB)
julia<span class="pl-k">></span> <span class="pl-c1">@btime</span> <span class="pl-k">$</span>v3 <span class="pl-k">.*</span> <span class="pl-c1">3.0</span>;
<span class="pl-c1">3.867</span> ms (<span class="pl-c1">7</span> allocations<span class="pl-k">:</span> <span class="pl-c1">439.77</span> KiB)</pre></div>
<p dir="auto">Apart from the 40X performance difference, two things stand out:</p>
<ul dir="auto">
<li>99498 allocations for <code class="notranslate">v2</code>. Why?</li>
<li>Why is <code class="notranslate">v3</code> slower than <code class="notranslate">v2</code>, in spite of allocating much less?</li>
</ul> | <p dir="auto">I have been trying to get into using <code class="notranslate">missing</code> and fast <code class="notranslate">Union</code> types in my worflow and seem to be coming up with some issues. It's most easily highlighted by:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> @code_warntype [1, 2] + [3.0, missing]
Body::Array
44 1 ── %1 = (Base.getfield)(Bs, 1, true)::Array{Union{Missing, Float64},1} │╻╷╷ iterate
└─── goto #7 if not true │
2 ┄─ %3 = φ (#1 => %1, #6 => %12)::Array{Union{Missing, Float64},1} │
│ %4 = φ (#1 => 2, #6 => %13)::Int64 │
45 │ invoke Base.promote_shape(_2::Array{Int64,1}, %3::Array{Union{Missing, Float64},1}) │
│ %6 = (Base.slt_int)(1, %4)::Bool ││╻ <
└─── goto #4 if not %6 ││
3 ── goto #5 ││
4 ── %9 = (Base.getfield)(Bs, %4, true)::Array{Union{Missing, Float64},1} ││╻ getindex
│ %10 = (Base.add_int)(%4, 1)::Int64 ││╻ +
└─── goto #5 ││
5 ┄─ %12 = φ (#4 => %9)::Array{Union{Missing, Float64},1} │
│ %13 = φ (#4 => %10)::Int64 │
│ %14 = φ (#3 => true, #4 => false)::Bool │
│ %15 = (Base.not_int)(%14)::Bool │
└─── goto #7 if not %15 │
6 ── goto #2 │
47 7 ── %18 = (getfield)(Bs, 1)::Array{Union{Missing, Float64},1} │
│ %19 = (Core.tuple)(A, %18)::Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}} ││╻ broadcasted
│ %20 = (Base.arraysize)(A, 1)::Int64 │││╻╷╷╷╷ instantiate
│ %21 = (Base.slt_int)(%20, 0)::Bool ││││╻╷╷╷ combine_axes
│ %22 = (Base.ifelse)(%21, 0, %20)::Int64 │││││┃│││││ broadcast_axes
│ %23 = %new(Base.OneTo{Int64}, %22)::Base.OneTo{Int64} ││││││┃│││ axes
│ %24 = (Base.arraysize)(%18, 1)::Int64 ││││││╻╷╷ broadcast_axes
│ %25 = (Base.slt_int)(%24, 0)::Bool │││││││╻╷╷╷ axes
│ %26 = (Base.ifelse)(%25, 0, %24)::Int64 ││││││││┃│││ map
│ %27 = %new(Base.OneTo{Int64}, %26)::Base.OneTo{Int64} │││││││││┃│ Type
│ %28 = (%26 === %22)::Bool ││││││╻╷╷╷╷ _bcs
│ %29 = (Base.and_int)(true, %28)::Bool │││││││╻ _bcs1
└─── goto #9 if not %29 ││││││││┃ _bcsm
8 ── goto #10 │││││││││
9 ── %32 = (%22 === 1)::Bool │││││││││╻ ==
└─── goto #10 │││││││││
10 ┄ %34 = φ (#8 => %29, #9 => %32)::Bool ││││││││
└─── goto #12 if not %34 ││││││││
11 ─ goto #18 ││││││││
12 ─ %37 = (%22 === %26)::Bool │││││││││╻╷ ==
│ %38 = (Base.and_int)(true, %37)::Bool ││││││││││╻ &
└─── goto #14 if not %38 │││││││││
13 ─ goto #15 │││││││││
14 ─ %41 = (%26 === 1)::Bool │││││││││╻ ==
└─── goto #15 │││││││││
15 ┄ %43 = φ (#13 => %38, #14 => %41)::Bool ││││││││
└─── goto #17 if not %43 ││││││││
16 ─ goto #18 ││││││││
17 ─ %46 = %new(Base.DimensionMismatch, "arrays could not be broadcast to a common size")::DimensionMismatch ││││││││╻ Type
│ (Base.Broadcast.throw)(%46) ││││││││
└─── $(Expr(:unreachable)) ││││││││
18 ┄ %49 = φ (#11 => %27, #16 => %23)::Base.OneTo{Int64} │││││││
│ %50 = (Core.tuple)(%49)::Tuple{Base.OneTo{Int64}} │││││││
└─── goto #19 │││││││
19 ─ goto #20 ││││││
20 ─ goto #21 │││││
21 ─ %54 = %new(Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}}, +, %19, %50)::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}}
└─── goto #22 ││││
22 ─ %56 = invoke Base.Broadcast.copy(%54::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}})::Array
└─── goto #23 │││
23 ─ goto #24 ││
24 ─ return %56 "><pre class="notranslate"><code class="notranslate">julia> @code_warntype [1, 2] + [3.0, missing]
Body::Array
44 1 ── %1 = (Base.getfield)(Bs, 1, true)::Array{Union{Missing, Float64},1} │╻╷╷ iterate
└─── goto #7 if not true │
2 ┄─ %3 = φ (#1 => %1, #6 => %12)::Array{Union{Missing, Float64},1} │
│ %4 = φ (#1 => 2, #6 => %13)::Int64 │
45 │ invoke Base.promote_shape(_2::Array{Int64,1}, %3::Array{Union{Missing, Float64},1}) │
│ %6 = (Base.slt_int)(1, %4)::Bool ││╻ <
└─── goto #4 if not %6 ││
3 ── goto #5 ││
4 ── %9 = (Base.getfield)(Bs, %4, true)::Array{Union{Missing, Float64},1} ││╻ getindex
│ %10 = (Base.add_int)(%4, 1)::Int64 ││╻ +
└─── goto #5 ││
5 ┄─ %12 = φ (#4 => %9)::Array{Union{Missing, Float64},1} │
│ %13 = φ (#4 => %10)::Int64 │
│ %14 = φ (#3 => true, #4 => false)::Bool │
│ %15 = (Base.not_int)(%14)::Bool │
└─── goto #7 if not %15 │
6 ── goto #2 │
47 7 ── %18 = (getfield)(Bs, 1)::Array{Union{Missing, Float64},1} │
│ %19 = (Core.tuple)(A, %18)::Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}} ││╻ broadcasted
│ %20 = (Base.arraysize)(A, 1)::Int64 │││╻╷╷╷╷ instantiate
│ %21 = (Base.slt_int)(%20, 0)::Bool ││││╻╷╷╷ combine_axes
│ %22 = (Base.ifelse)(%21, 0, %20)::Int64 │││││┃│││││ broadcast_axes
│ %23 = %new(Base.OneTo{Int64}, %22)::Base.OneTo{Int64} ││││││┃│││ axes
│ %24 = (Base.arraysize)(%18, 1)::Int64 ││││││╻╷╷ broadcast_axes
│ %25 = (Base.slt_int)(%24, 0)::Bool │││││││╻╷╷╷ axes
│ %26 = (Base.ifelse)(%25, 0, %24)::Int64 ││││││││┃│││ map
│ %27 = %new(Base.OneTo{Int64}, %26)::Base.OneTo{Int64} │││││││││┃│ Type
│ %28 = (%26 === %22)::Bool ││││││╻╷╷╷╷ _bcs
│ %29 = (Base.and_int)(true, %28)::Bool │││││││╻ _bcs1
└─── goto #9 if not %29 ││││││││┃ _bcsm
8 ── goto #10 │││││││││
9 ── %32 = (%22 === 1)::Bool │││││││││╻ ==
└─── goto #10 │││││││││
10 ┄ %34 = φ (#8 => %29, #9 => %32)::Bool ││││││││
└─── goto #12 if not %34 ││││││││
11 ─ goto #18 ││││││││
12 ─ %37 = (%22 === %26)::Bool │││││││││╻╷ ==
│ %38 = (Base.and_int)(true, %37)::Bool ││││││││││╻ &
└─── goto #14 if not %38 │││││││││
13 ─ goto #15 │││││││││
14 ─ %41 = (%26 === 1)::Bool │││││││││╻ ==
└─── goto #15 │││││││││
15 ┄ %43 = φ (#13 => %38, #14 => %41)::Bool ││││││││
└─── goto #17 if not %43 ││││││││
16 ─ goto #18 ││││││││
17 ─ %46 = %new(Base.DimensionMismatch, "arrays could not be broadcast to a common size")::DimensionMismatch ││││││││╻ Type
│ (Base.Broadcast.throw)(%46) ││││││││
└─── $(Expr(:unreachable)) ││││││││
18 ┄ %49 = φ (#11 => %27, #16 => %23)::Base.OneTo{Int64} │││││││
│ %50 = (Core.tuple)(%49)::Tuple{Base.OneTo{Int64}} │││││││
└─── goto #19 │││││││
19 ─ goto #20 ││││││
20 ─ goto #21 │││││
21 ─ %54 = %new(Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}}, +, %19, %50)::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}}
└─── goto #22 ││││
22 ─ %56 = invoke Base.Broadcast.copy(%54::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(+),Tuple{Array{Int64,1},Array{Union{Missing, Float64},1}}})::Array
└─── goto #23 │││
23 ─ goto #24 ││
24 ─ return %56
</code></pre></div>
<p dir="auto">As you can see, the resultant output is (correctly but imprecisely) inferred to be <code class="notranslate">Array</code> (not even <code class="notranslate">Vector</code>?).</p>
<p dir="auto">I find this example interesting for two reasons</p>
<ol dir="auto">
<li>Performance (resulting from imprecise inference)</li>
<li>Predictable interface provided by output container</li>
</ol>
<p dir="auto">Regarding performance, I find it quite usual to combine combinations of "functional" operations like <code class="notranslate">+</code>, <code class="notranslate">map</code>, etc, together with hand-written loops in the same scope. In fact, predictably good performance over loops, recursion, higher-order programming, etc is kind of one of our main selling points. In the above, performance will be pessimised if I loop over the output since neither the container type (even the array dimensionality is lost, somehow!) nor the element type is well known. I'm guessing but I'd predict that <code class="notranslate">Vector{Union{Missing, Float64}}</code> would be fastest for subsequent iteration, but it's possible that if inference found something like <code class="notranslate">Vector{<:Union{Missing, Float64}}</code> then this would also be quite fast (I'm not sure, really).</p>
<p dir="auto">Regarding the second, more semantic issue of what the output <em>actually</em> becomes at run time, I'm a bit confused about what I'm meant to assume I can <em>do</em> with the output container. For these input <em>types</em>, we can get</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> Int[] + Union{Float64, Missing}[]
0-element Array{Union{Missing, Float64},1}
julia> Int[1] + Union{Float64, Missing}[3.0]
1-element Array{Float64,1}:
4.0
julia> Int[2] + Union{Float64, Missing}[missing]
1-element Array{Missing,1}:
missing
julia> Int[1, 2] + Union{Float64, Missing}[3.0, missing]
2-element Array{Union{Missing, Float64},1}:
4.0
missing"><pre class="notranslate">julia<span class="pl-k">></span> Int[] <span class="pl-k">+</span> Union{Float64, Missing}[]
<span class="pl-c1">0</span><span class="pl-k">-</span>element Array{Union{Missing, Float64},<span class="pl-c1">1</span>}
julia<span class="pl-k">></span> Int[<span class="pl-c1">1</span>] <span class="pl-k">+</span> Union{Float64, Missing}[<span class="pl-c1">3.0</span>]
<span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Float64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">4.0</span>
julia<span class="pl-k">></span> Int[<span class="pl-c1">2</span>] <span class="pl-k">+</span> Union{Float64, Missing}[<span class="pl-c1">missing</span>]
<span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Missing,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">missing</span>
julia<span class="pl-k">></span> Int[<span class="pl-c1">1</span>, <span class="pl-c1">2</span>] <span class="pl-k">+</span> Union{Float64, Missing}[<span class="pl-c1">3.0</span>, <span class="pl-c1">missing</span>]
<span class="pl-c1">2</span><span class="pl-k">-</span>element Array{Union{Missing, Float64},<span class="pl-c1">1</span>}<span class="pl-k">:</span>
<span class="pl-c1">4.0</span>
<span class="pl-c1">missing</span></pre></div>
<p dir="auto">As a programmer, this scares me somewhat because I might get subtly different program behavior (or program correctness) depending on my input data. My concerm is that I might perform tests with mixtures of <code class="notranslate">Missing</code> and <code class="notranslate">Float64</code> input values but be caught out in rare cases in production when all (or none) of the inputs are <code class="notranslate">missing</code>.</p>
<p dir="auto">In this hypothetical scenario, my (tested, production) code might look something like</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="vec3 = vec1 + vec2
for i in keys(vec3)
if isless(vec3[i], 0) # vec3 can't have any negative elements
vec3[i] = missing
end
end
return vec3"><pre class="notranslate">vec3 <span class="pl-k">=</span> vec1 <span class="pl-k">+</span> vec2
<span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">keys</span>(vec3)
<span class="pl-k">if</span> <span class="pl-c1">isless</span>(vec3[i], <span class="pl-c1">0</span>) <span class="pl-c"><span class="pl-c">#</span> vec3 can't have any negative elements</span>
vec3[i] <span class="pl-k">=</span> <span class="pl-c1">missing</span>
<span class="pl-k">end</span>
<span class="pl-k">end</span>
<span class="pl-k">return</span> vec3</pre></div>
<p dir="auto">But unfortunately this would sometimes fail, depending on my input data, which may vary in size and quality (and maybe 1 in 10,000 times are all non-<code class="notranslate">missing</code>).</p>
<p dir="auto">As a coder, I need to be able to predict the interface provided by the outputs of operation so I can write reliable code. Generally, I've noted that the output of <code class="notranslate">+</code>, <code class="notranslate">map</code>, <code class="notranslate">broadcast</code>, <code class="notranslate">filter</code> (for <code class="notranslate">Array</code> inputs) tend to be mutable <code class="notranslate">Array</code>s, and generally am unafraid to mutate them. Naively, I would track in my head the eltypes of <code class="notranslate">vec1</code> and <code class="notranslate">vec2</code> and assume I can populate <code class="notranslate">vec3</code> with anything consistent.</p>
<p dir="auto">I'm not sure what the best solution is, but from my perspective I find any potential (performance?) gains in returning the narrowest container that fits the run-time data questionable in value compared to understanding the semantic guarantees as a code author.</p> | 1 |
<p dir="auto">from mailing list</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hi,
I'm using pandas to read in a set of tab delimited files into DataFrames. Each file has only 3-5 columns and roughly 20,000 rows. The files have a column that I'd like to index by, but some of the entries are duplicates. I find that it takes roughly 5 seconds to read a set of three such files into memory, drop duplicates, and index using "read_table". I.e. to do:
dict_of_dfs = {}
for filename in three_filenames:
df = pandas.read_table(filename, sep="\t")
# drop duplicates: use "entry_id" field
df = df.drop_duplicates("entry_id")
df = df.set_index("entry_id")
dict_of_dfs[filename] = df
So to do the above loop body three times takes 5 seconds, which seems slow to me, unless I am missing something. I'm wondering if this is the expected performance for dataframes of this size, or if I'm misusing something. It seems like IO should not be a bottleneck with files that are this small (keep in mind the max number of entries is less than 30k).
Any advice on how to optimize this would be greatly appreciated! Thanks."><pre class="notranslate"><code class="notranslate">Hi,
I'm using pandas to read in a set of tab delimited files into DataFrames. Each file has only 3-5 columns and roughly 20,000 rows. The files have a column that I'd like to index by, but some of the entries are duplicates. I find that it takes roughly 5 seconds to read a set of three such files into memory, drop duplicates, and index using "read_table". I.e. to do:
dict_of_dfs = {}
for filename in three_filenames:
df = pandas.read_table(filename, sep="\t")
# drop duplicates: use "entry_id" field
df = df.drop_duplicates("entry_id")
df = df.set_index("entry_id")
dict_of_dfs[filename] = df
So to do the above loop body three times takes 5 seconds, which seems slow to me, unless I am missing something. I'm wondering if this is the expected performance for dataframes of this size, or if I'm misusing something. It seems like IO should not be a bottleneck with files that are this small (keep in mind the max number of entries is less than 30k).
Any advice on how to optimize this would be greatly appreciated! Thanks.
</code></pre></div> | <h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="o = pd.Series(['test', np.nan, np.nan])
print 'Original has dupes: ', o.duplicated().any()
# Save and reload via msgpack
o.to_msgpack('/tmp/test.msgpack')
r = pd.read_msgpack('/tmp/test.msgpack')
print 'Reloaded has dupes: ', r.duplicated().any()
pd.testing.assert_series_equal(o, r)
print o.duplicated()
print r.duplicated()"><pre class="notranslate"><span class="pl-s1">o</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>([<span class="pl-s">'test'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>])
<span class="pl-k">print</span> <span class="pl-s">'Original has dupes: '</span>, <span class="pl-s1">o</span>.<span class="pl-en">duplicated</span>().<span class="pl-en">any</span>()
<span class="pl-c"># Save and reload via msgpack</span>
<span class="pl-s1">o</span>.<span class="pl-en">to_msgpack</span>(<span class="pl-s">'/tmp/test.msgpack'</span>)
<span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">read_msgpack</span>(<span class="pl-s">'/tmp/test.msgpack'</span>)
<span class="pl-k">print</span> <span class="pl-s">'Reloaded has dupes: '</span>, <span class="pl-s1">r</span>.<span class="pl-en">duplicated</span>().<span class="pl-en">any</span>()
<span class="pl-s1">pd</span>.<span class="pl-s1">testing</span>.<span class="pl-en">assert_series_equal</span>(<span class="pl-s1">o</span>, <span class="pl-s1">r</span>)
<span class="pl-k">print</span> <span class="pl-s1">o</span>.<span class="pl-en">duplicated</span>()
<span class="pl-k">print</span> <span class="pl-s1">r</span>.<span class="pl-en">duplicated</span>()</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Current output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Original has dupes: True
Reloaded has dupes: False
0 False
1 False
2 True
dtype: bool
0 False
1 False
2 False
dtype: bool"><pre class="notranslate"><code class="notranslate">Original has dupes: True
Reloaded has dupes: False
0 False
1 False
2 True
dtype: bool
0 False
1 False
2 False
dtype: bool
</code></pre></div>
<p dir="auto">The series correctly has duplicates before sending to messagepack. Afterwards, the duplicated NaNs are not considered duplicates for some reason.</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: 2.7.6.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 4.9.0-6-amd64<br>
machine: x86_64<br>
processor:<br>
byteorder: little<br>
LC_ALL: en_US.UTF-8<br>
LANG: en_US.UTF-8<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: None<br>
setuptools: None<br>
Cython: None<br>
numpy: 1.13.3<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 2.0.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.0<br>
pytz: 2018.5<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: 2.5<br>
feather: None<br>
matplotlib: 1.5.2<br>
openpyxl: None<br>
xlrd: 0.9.3<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: 3.4.4<br>
bs4: None<br>
html5lib: 1.0b8<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: 0.2.0</p>
</details> | 0 |
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1054495" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/1029" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/1029/hovercard" href="https://github.com/elastic/elasticsearch/issues/1029">#1029</a>.</p>
<p dir="auto">It would be useful if we can get total number of unique terms for a particular facet.<br>
One use case is that we store "id" to a field. If we get number of unique terms on the field, we know how many duplicates are included in result set.</p> | <p dir="auto">Hi all,</p>
<p dir="auto">I'd like to ask for 2 features for the terms facet that sound not too difficult to implement to me:</p>
<ul dir="auto">
<li>Adding a count / total field to the result of a terms facet, that gives the number of different terms the facet returns. For the moment I ask for maxint results to be sure I have the correct number...</li>
<li>Adding something equivalent to the from / size of the query DSL. It would really help me to be able to say that I want results from 1000, with a size of 50, instead of saying I want the 1050 firsts and then have to use only the last 50 client-side.</li>
</ul>
<p dir="auto">Please tell me if this is not clear.</p>
<p dir="auto">Thanks for your great work, we really enjoy ElasticSearch here at Mozilla!</p>
<p dir="auto">Adrian</p> | 1 |
<p dir="auto">Please make sure that the boxes below are checked before you submit your issue.<br>
If your issue is an <strong>implementation question</strong>, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">on the Keras Slack channel</a> instead of opening a GitHub issue.</p>
<p dir="auto">Thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check that you are up-to-date with the master branch of Keras. You can update with:<br>
<code class="notranslate">pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps</code></p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Check that your version of TensorFlow is up-to-date. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul> | <p dir="auto">Please make sure that the boxes below are checked before you submit your issue.<br>
If your issue is an <strong>implementation question</strong>, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">on the Keras Slack channel</a> instead of opening a GitHub issue.</p>
<p dir="auto">Thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Check that you are up-to-date with the master branch of Keras. You can update with:<br>
<code class="notranslate">pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps</code></p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Check that your version of TensorFlow is up-to-date. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p>
</li>
<li class="task-list-item">
<p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p>
</li>
</ul> | 1 |
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/561992/66013061-ae651200-e504-11e9-836b-f97797964504.png"><img width="827" alt="スクリーンショット 2019-10-02 11 03 44" src="https://user-images.githubusercontent.com/561992/66013061-ae651200-e504-11e9-836b-f97797964504.png" style="max-width: 100%;"></a></p> | <h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0
Any other software? wsl + emacs"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0
Any other software? wsl + emacs
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Open emacs within wsl in Windows Terminal.</li>
<li>Type either of the following:
<ul dir="auto">
<li>M-> (alt + greater than) to move to the end of the file</li>
<li>M-< (alt + less than) to move to the beginning of the file</li>
</ul>
</li>
<li>Verify the key emacs is seeing, by typing C-h k (Ctrl+h, k) for describe key - then type either of the above key combinations.</li>
</ol>
<h1 dir="auto">Expected behavior</h1>
<p dir="auto">M-> moves to the end of the file.<br>
M-< moves to the beginning of the file.<br>
C-h k M-> displays M-> as the command run.<br>
C-h k M-< displays M-< as the command run.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">M-> does not move to the end of the file.<br>
M-< does not move to the beginning of the file.<br>
C-h k M-> displays M-. as the command run.<br>
C-h k M-< displays M-, as the command run.</p> | 0 |
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
Consider this template:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<form [formGroup]="form">
<input type="text" formControlName="control"/>
<input type="text" formControlName="control"/>
..."><pre class="notranslate"><code class="notranslate"><form [formGroup]="form">
<input type="text" formControlName="control"/>
<input type="text" formControlName="control"/>
...
</code></pre></div>
<p dir="auto">I have 2 inputs bound to the same FormControl.<br>
I'm not using <code class="notranslate">ngModel</code> input of <code class="notranslate">formControlName</code> directive.</p>
<p dir="auto">When I enter something in one control, another control is not updated and debugging shows that<br>
<code class="notranslate">viewModel</code> property of the second <code class="notranslate">FormControlName</code> is never updated.</p>
<p dir="auto">I suppose this happens because <code class="notranslate">viewModel</code> is updated only when <code class="notranslate">ngModel</code> is changed<br>
<a href="https://github.com/angular/angular/blob/master/modules/%40angular/forms/src/directives/reactive_directives/form_control_directive.ts#L98">https://github.com/angular/angular/blob/master/modules/%40angular/forms/src/directives/reactive_directives/form_control_directive.ts#L98</a><br>
and not when <code class="notranslate">control.valueChanges</code> fires.</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
Expected both inputs to always have the same value.</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
<a href="http://plnkr.co/edit/g7P37ipoQXc9Pe0hDgOy" rel="nofollow">http://plnkr.co/edit/g7P37ipoQXc9Pe0hDgOy</a></p> | <p dir="auto">Hey guys,</p>
<p dir="auto">I just updated to angular/compiler 2.2.4 and my ngc is no longer creating my application ngFactory files in the specified outGen folder. The last working version of angular/compiler on my stack was 2.1.2. I'm currently on node 6.9.1 and angular 2.2.4. You can check out my stack <a href="https://github.com/projectSHAI/GOAT-stack">here</a> and follow the instructions below to reproduce the process</p>
<p dir="auto">Thanks in advance!<br>
JT</p>
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">initial angular/compiler compilation; app.module.ngFactory file not being created</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">app.module.ngFactory file would be created along with component factories</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<ul dir="auto">
<li>clone <a href="https://github.com/projectSHAI/GOAT-stack">https://github.com/projectSHAI/GOAT-stack</a></li>
<li>run commands
<ul dir="auto">
<li><code class="notranslate">npm install</code></li>
<li><code class="notranslate">gulp prod</code></li>
</ul>
</li>
<li>ngc-aot folder should have node_module factories and app factories
<ul dir="auto">
<li>app factories missing!!</li>
</ul>
</li>
</ul>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">cannot compile AoT</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">MEAN stack</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 2.2.4</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> [all]</p>
<ul dir="auto">
<li>(not a dom issue)</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [TypeScript 2.1.1]</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = 6.9.1</p>
</li>
</ul> | 0 |
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="76178424" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3159" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/3159/hovercard" href="https://github.com/microsoft/TypeScript/pull/3159">#3159</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="97865484" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/4068" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/4068/hovercard" href="https://github.com/microsoft/TypeScript/pull/4068">#4068</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="65547883" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2568" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2568/hovercard" href="https://github.com/microsoft/TypeScript/issues/2568">#2568</a>, <a href="https://github.com/Microsoft/TypeScript/compare/declarations...declarations-moduleOut">this branch</a>, <a href="https://github.com/SitePen/dts-generator">and this tool</a>.</p>
<h1 dir="auto">Goals</h1>
<ul dir="auto">
<li>Bundle <em>declarations</em> for TS projects to allow a library to be consumed with a single TS file, despite being many modules internally. Because of complicated internal module dependencies which would rather not be exposed to the consumer, this should flatten the exported module types as best as it can. (Ideally, completely.)</li>
</ul>
<h1 dir="auto">Proposal</h1>
<p dir="auto">When all of <code class="notranslate">--module</code>, <code class="notranslate">--out</code>, and <code class="notranslate">--declarations</code> are specified, the TS compiler should emit a single amalgamated <code class="notranslate">.d.ts</code> (alongside its single output js file). This <code class="notranslate">.d.ts</code> should be flattened compared to a concatenated <code class="notranslate">.d.ts</code> file. It should report collisions caused by scoping issues and import aliasing when flattening declarations into a single <code class="notranslate">declare module</code>. It should respect access modifiers when generating the DTS (only exporting things explicitly exported and types marked as public).</p>
<p dir="auto">For example, given the following set of sources:<br>
<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="{
"compilerOptions": {
"module": "commonjs",
"declarations": true,
"out": "mylib.js"
}
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>commonjs<span class="pl-pds">"</span></span>,
<span class="pl-ent">"declarations"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"out"</span>: <span class="pl-s"><span class="pl-pds">"</span>mylib.js<span class="pl-pds">"</span></span>
}
}</pre></div>
<p dir="auto"><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 {}"><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></pre></div>
<p dir="auto">should create the <code class="notranslate">.d.ts</code>:<br>
<code class="notranslate">mylib.d.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare module "mylib" {
export interface Foo {}
export class Bar {
constructor()
do(): Foo
}
export class Baz {}
}"><pre class="notranslate"><span class="pl-k">declare</span> module <span class="pl-s">"mylib"</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>
<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-c1">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c1">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">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-kos">}</span></pre></div>
<p dir="auto">rather than:<br>
<code class="notranslate">mylib.d.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare module "mylib/a" {
export * from "mylib/b";
export * from "mylib/c";
}
declare module "mylib/b" {
export interface Foo {}
export class Bar {
constructor()
do(): Foo
}
}
declare module "mylib/c" {
export class Baz {}
}
declare module "mylib" {
export * from "mylib/a";
}"><pre class="notranslate"><span class="pl-k">declare</span> module <span class="pl-s">"mylib/a"</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">"mylib/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">"mylib/c"</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">declare</span> module <span class="pl-s">"mylib/b"</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>
<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-c1">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-c1">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-kos">}</span>
<span class="pl-k">declare</span> module <span class="pl-s">"mylib/c"</span> <span class="pl-kos">{</span>
<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-kos">}</span>
<span class="pl-k">declare</span> module <span class="pl-s">"mylib"</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">"mylib/a"</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">and should report a semantic error when the following is done:<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 {Bar as Foo} 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-kos">{</span><span class="pl-smi">Bar</span> <span class="pl-k">as</span> <span class="pl-smi">Foo</span><span class="pl-kos">}</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">as there will be multiple members named <code class="notranslate">Foo</code> (an interface and a class), since <code class="notranslate">b.ts</code> has exported interface <code class="notranslate">Foo</code>.</p>
<p dir="auto">We should also have a semantic error when the following is changed from the original:<br>
If we change <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">it should be an error in <code class="notranslate">a.ts</code> (since it's blanket exporting <code class="notranslate">b</code> and <code class="notranslate">c</code>), and the error should suggest to alias either <code class="notranslate">c.ts</code>'s <code class="notranslate">Foo</code> or <code class="notranslate">b.ts</code>'s <code class="notranslate">Foo</code> (or both) when reexporting them in <code class="notranslate">a</code>.</p>
<p dir="auto">Internally, when flattening this aliasing becomes important - we need to track usages of the two original <code class="notranslate">Foo</code>'s across the generated <code class="notranslate">.d.ts</code> and rename it to the alias created when it is reexported.</p>
<p dir="auto">Unfortunately, to maintain ES6 compatability, while we can warn about this behavior with classes (since it's possible that a developer is unaware they're overriding a prior export), we still need to support it (or do we? The spec leads me to believe that attempting to export multiple members with the same name - even via <code class="notranslate">export *</code> - is an early syntax error). So it would be nice to have a compiler flag to mark the same kind of thing with classes (or namespaces) as an error, but also do the following by default:</p>
<p dir="auto">We can do automatic name collision resolution, but that can result in unpredictable (or convention-based) public member names... but it must be done, I suppose. We could ignore reexported types since it's appropriate to do so in ES6 (following <code class="notranslate">export *</code> declarations can override previously defined members? maybe? system works this way at present - but that may just be system relying on transpiler implementers to maintain ES6 semantics), then we would need to create "shadowed" types at the appropriate level in the <code class="notranslate">.d.ts</code> - types whose original public access are overridden by later exports but whose types are still required to describe public function argument or return types. Naming these "shadowed" types could be difficult, but given that they only exist for type information and not for access information, a common (re)naming convention could be a desirable solution. Something akin to <code class="notranslate"><typename>_n</code> when <code class="notranslate">n</code> is the shadowed type number for that type, and renaming the shadowed type name to something else (<code class="notranslate"><typename>__n</code> and so on so long as the name still exists) if that collides with another exported type. Classes used in this way are rewritten to interfaces in the <code class="notranslate">.d.ts</code>, since a constructor function likely isn't accessible for a shadowed class (at least not at its generated exported type name).</p>
<p dir="auto">Any feedback? There's a few alternatives to what I've suggested here, which is possibly the most conservative approach in terms of ability to error early but supporting ES6 semantics best. It's possible to silently ignore <code class="notranslate">interface</code> name collisions and rename those automatically as well, but since they're TS constructs and not ES6, I think it's okay to force more discipline in their usage.</p>
<p dir="auto">Something I've been considering is also rewriting <code class="notranslate">namespace</code>s as <code class="notranslate">interface</code>s in the generated <code class="notranslate">.d.ts</code> in this way to further flatten/unify the types, but this... might? not strictly be needed. I haven't come up with a strong case for it.</p> | <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class C {
constructor(options?: number) {
var options = (options || 0);
// !!! error TS2687: All declarations of 'options' must have identical modifiers.
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">C</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">options</span>?: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">options</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">options</span> <span class="pl-c1">||</span> <span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// !!! error TS2687: All declarations of 'options' must have identical modifiers.</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 0 |
<p dir="auto">Deno panics when running <code class="notranslate">deno run --v8-flags=--disallow-code-generation-from-strings index.ts</code></p>
<p dir="auto">index.ts:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log("Hello World!");"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Hello World!"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Platform: windows x86_64
Version: 1.29.2
Args: ["deno", "run", "--v8-flags=--disallow-code-generation-from-strings", "TestFlags.ts"]
thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context
at new Function (<anonymous>)
at genAsyncOp (deno:core/01_core.js:176:14)
at Object.initializeAsyncOps (deno:core/01_core.js:220:19)
at Object.bootstrapMainRuntime [as mainRuntime] (deno:runtime/js/99_main.js:398:10)
at [deno:runtime\worker.rs:327:24]:1:11', runtime\worker.rs:328:8"><pre class="notranslate"><code class="notranslate">Platform: windows x86_64
Version: 1.29.2
Args: ["deno", "run", "--v8-flags=--disallow-code-generation-from-strings", "TestFlags.ts"]
thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context
at new Function (<anonymous>)
at genAsyncOp (deno:core/01_core.js:176:14)
at Object.initializeAsyncOps (deno:core/01_core.js:220:19)
at Object.bootstrapMainRuntime [as mainRuntime] (deno:runtime/js/99_main.js:398:10)
at [deno:runtime\worker.rs:327:24]:1:11', runtime\worker.rs:328:8
</code></pre></div> | <p dir="auto">Me and at least one other using Netlify edge functions are seeing</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context"><pre class="notranslate"><code class="notranslate">thread 'main' panicked at 'Failed to execute bootstrap script: EvalError: Code generation from strings disallowed for this context
</code></pre></div>
<p dir="auto">I tried downgrading to <code class="notranslate">1.27.0</code> and the panic went away.<br>
More info <a href="https://answers.netlify.com/t/nextjs-netlify-cli-deno-panic-due-to-next-dev-edge-function/78563" rel="nofollow">here</a></p> | 1 |
<p dir="auto">Currently (pending <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17611345" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/8287" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/8287/hovercard" href="https://github.com/rust-lang/rust/pull/8287">#8287</a>), libextra will have the following encodings</p>
<ul dir="auto">
<li>json</li>
<li>ebml</li>
<li>base64</li>
<li>hex</li>
</ul>
<p dir="auto">And in theory we should add these in the future:</p>
<ul dir="auto">
<li>xml</li>
<li>base32</li>
<li>ASN.1</li>
</ul>
<p dir="auto">(or at least those are the ones I could think of off the top of my head). Right now they're all placed directly inside the <code class="notranslate">libextra</code> folder, but they would probably benefit from a better organization scheme.</p>
<p dir="auto">Currently all of the "encodings" can generally fall into two categories. One is "bytes to strings and back" and the other is a "generic serialization format".</p>
<p dir="auto">Right now I believe that the "generic serialization format" is captured nicely via the <code class="notranslate">serialize::{Encoder, Decoder}</code> traits, and it unifies json/ebml. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/omasanori/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/omasanori">@omasanori</a> has brought up concerns about the naming scheme, and my proposal below might alleviate these concerns.</p>
<p dir="auto">Otherwise, the "bytes to strings and back" type of encoding isn't very well unified at this point. There should be a trait (in possibly a new <code class="notranslate">extra::encoding</code> module) which unifies base64/base32/hex and whatever else we come across. In my opinion, the trait should look like:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="trait Text {
fn encode(&[u8]) -> ~str;
fn decode(&str) -> ~[u8];
}"><pre class="notranslate"><span class="pl-k">trait</span> <span class="pl-smi">Text</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">encode</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span><span class="pl-kos">)</span> -> ~<span class="pl-smi">str</span><span class="pl-kos">;</span>
<span class="pl-k">fn</span> <span class="pl-en">decode</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">str</span><span class="pl-kos">)</span> -> ~<span class="pl-kos">[</span><span class="pl-smi">u8</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">This makes it clear what the "encode" procedure is and what the "decode" procedure is. Additionally, it's explicitly clear that bytes live on <em>one</em> side, and strings live on the other, there's no intermingling between the two of them.</p>
<p dir="auto">Finally, I think we should move everything around into:</p>
<ul dir="auto">
<li><code class="notranslate">extra::encoding::base64</code></li>
<li><code class="notranslate">extra::encoding::base32</code></li>
<li><code class="notranslate">extra::encoding::hex</code></li>
<li><code class="notranslate">extra::encoding::json</code></li>
<li><code class="notranslate">extra::encoding::ebml</code></li>
</ul>
<p dir="auto">And then <code class="notranslate">encoding/mod.rs</code> would define the traits</p>
<ul dir="auto">
<li><code class="notranslate">Text</code> (is the name too short? if you reference it by <code class="notranslate">encoding::Text</code> I think it's clear but that's not always guaranteed)</li>
<li><code class="notranslate">Serializer</code> (<code class="notranslate">serialize::Encoder</code> today)</li>
<li><code class="notranslate">Deserializer</code> (<code class="notranslate">serialize::Decoder</code> today)</li>
</ul>
<p dir="auto">What do others think about this? If this looks good, I'd be more than happy to reorganize everything!</p> | <p dir="auto">So, I have the following</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mod tokenizer {
#[test]
fn test_tokenize_one() {
//Numbers
let string = ~"1";
let string = ~"321";
//Strings
let string = ~"'This is a string'";
//Operators
let string = ~"⍒";
let string = ~"÷";
//Comments
let string = ~"⍝";
let string = ~"⍝ lol";
//Function definition
let string = ~"∇Function";
//Close function
let string = ~"∇";
//Endlines
let string = ~"\n";
//Variables
let string = ~"⍙var";
let string = ~"∆var";
let string = ~"var";
}
}"><pre class="notranslate"><code class="notranslate">mod tokenizer {
#[test]
fn test_tokenize_one() {
//Numbers
let string = ~"1";
let string = ~"321";
//Strings
let string = ~"'This is a string'";
//Operators
let string = ~"⍒";
let string = ~"÷";
//Comments
let string = ~"⍝";
let string = ~"⍝ lol";
//Function definition
let string = ~"∇Function";
//Close function
let string = ~"∇";
//Endlines
let string = ~"\n";
//Variables
let string = ~"⍙var";
let string = ~"∆var";
let string = ~"var";
}
}
</code></pre></div>
<p dir="auto">And for some reason, on both my OSX build of Incoming, and my on my Ubuntu build of it, I get an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rust: task failed at 'Assertion bpos == mbc.pos || bpos.to_uint() >= mbc.pos.to_uint() + mbc.bytes failed', /home/tony/Projects/rust/src/libsyntax/codemap.rs:500"><pre class="notranslate"><code class="notranslate">rust: task failed at 'Assertion bpos == mbc.pos || bpos.to_uint() >= mbc.pos.to_uint() + mbc.bytes failed', /home/tony/Projects/rust/src/libsyntax/codemap.rs:500
</code></pre></div>
<p dir="auto">When I start using the variables (such as sticking Print statements after each definition of it) it compiles fine. Taking out the weird APL symbols that my interpreter is going to be testing also fixes it.</p>
<p dir="auto">Is there an issue with having too many unused instances of a variable? Or with trouble with (super obscure) Unicode glyphs?</p> | 0 |
<p dir="auto">The documentation (components) states that the style for small pagination is 'pagination-sm' when in fact it is 'pagination-small'. Also, 'pagination-lg' is actually 'pagination-large' in bootstrap.css.</p> | <p dir="auto">To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.</p> | 1 |
<p dir="auto">When using the DecisionTreeClassifier() sample_weight parameter, and weighting examples by class lable such as 2:1 for class A versus class B, the <strong>nvalues</strong> in the leaves of the tree produced by tree.export_graphviz() shows a duplicate count for the number of examples for the weighted class.</p>
<p dir="auto">This is misleading because the sum of each classes <strong>nvalues</strong> should equal the total number of examples in the parent node. It seems that there is a bug where the feature weighting factor is not removed when exporting the decision tree.</p>
<p dir="auto">Here is the classifier with weighting:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="clf = tree.DecisionTreeClassifier(
criterion='gini', splitter='best', max_leaf_nodes=10,
min_samples_split=10, min_samples_leaf=2, max_features=None,
random_state=None).fit(X, y, sample_weight=df.LABEL.map({'A':2, 'B':1})) "><pre class="notranslate"><span class="pl-s1">clf</span> <span class="pl-c1">=</span> <span class="pl-s1">tree</span>.<span class="pl-v">DecisionTreeClassifier</span>(
<span class="pl-s1">criterion</span><span class="pl-c1">=</span><span class="pl-s">'gini'</span>, <span class="pl-s1">splitter</span><span class="pl-c1">=</span><span class="pl-s">'best'</span>, <span class="pl-s1">max_leaf_nodes</span><span class="pl-c1">=</span><span class="pl-c1">10</span>,
<span class="pl-s1">min_samples_split</span><span class="pl-c1">=</span><span class="pl-c1">10</span>, <span class="pl-s1">min_samples_leaf</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">max_features</span><span class="pl-c1">=</span><span class="pl-c1">None</span>,
<span class="pl-s1">random_state</span><span class="pl-c1">=</span><span class="pl-c1">None</span>).<span class="pl-en">fit</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-s1">sample_weight</span><span class="pl-c1">=</span><span class="pl-s1">df</span>.<span class="pl-v">LABEL</span>.<span class="pl-en">map</span>({<span class="pl-s">'A'</span>:<span class="pl-c1">2</span>, <span class="pl-s">'B'</span>:<span class="pl-c1">1</span>})) </pre></div>
<p dir="auto">Here is the produced tree.dot file with the duplicate values shown in <strong>bold</strong>:</p>
<p dir="auto">digraph Tree {<br>
0 [label="X[106] <= 0.0203\ngini = 0.0731494237327\nsamples = 119377", shape="box"] ;<br>
1 [label="X[34] <= 1266.6650\ngini = 0.0661567536396\nsamples = 118307", shape="box"] ;<br>
0 -> 1 ;<br>
3 [label="gini = 0.0578\nsamples = 111941\nvalue = [ <strong>210926</strong>. 6478.]", shape="box"] ;<br>
1 -> 3 ;<br>
4 [label="gini = 0.2103\nsamples = 6366\nvalue = [ <strong>10016</strong>. 1358.]", shape="box"] ;<br>
1 -> 4 ;<br>
2 [label="X[83] <= 6728.4551\ngini = 0.386307949063\nsamples = 1070", shape="box"] ;<br>
0 -> 2 ;<br>
5 [label="gini = 0.4994\nsamples = 364\nvalue = [ <strong>254</strong>. 237.]", shape="box"] ;<br>
2 -> 5 ;<br>
6 [label="gini = 0.1669\nsamples = 706\nvalue = [ <strong>68</strong>. 672.]", shape="box"] ;<br>
2 -> 6 ;<br>
}</p>
<p dir="auto">Here is what the tree looks like with duplicate leaf example counts for the weighted class:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2701562/4742046/e052576a-5a1b-11e4-8855-f017ea75facc.png"><img src="https://cloud.githubusercontent.com/assets/2701562/4742046/e052576a-5a1b-11e4-8855-f017ea75facc.png" alt="img" style="max-width: 100%;"></a></p> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jmetzen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jmetzen">@jmetzen</a> thank you for contributing the new Gaussian Process module, it is really helpful! I wondered if it is possible to specify the input dimension(s) each kernel should be applied to? For example, if my input is 3-dimensional and I would like a kernel setup like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kernel = rational quadratic kernel on input dimension 2
* RBF kernel on input dimension 3
+ periodic kernel on input dimensions 1 and 2"><pre class="notranslate"><code class="notranslate">kernel = rational quadratic kernel on input dimension 2
* RBF kernel on input dimension 3
+ periodic kernel on input dimensions 1 and 2
</code></pre></div>
<p dir="auto">Could this be achieved with the current state of the API?</p> | 0 |
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<ul dir="auto">
<li>modules/web_infrastructure/apache2_module.py</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.0.0
config file = None
configured module search path = [u'/Users/*****/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Python/2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0.0
config file = None
configured module search path = [u'/Users/*****/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Python/2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Empty</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When enabling php5 on a 14.04 system an exception is thrown.</p>
<p dir="auto">I believe the issue has to do with the variable not being checked for Noneness first:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" for search, reexpr in re_workarounds:
if search in name:
rematch = re.search(reexpr, name)
return rematch.group(1) + '_module'"><pre class="notranslate"> <span class="pl-k">for</span> <span class="pl-s1">search</span>, <span class="pl-s1">reexpr</span> <span class="pl-c1">in</span> <span class="pl-s1">re_workarounds</span>:
<span class="pl-k">if</span> <span class="pl-s1">search</span> <span class="pl-c1">in</span> <span class="pl-s1">name</span>:
<span class="pl-s1">rematch</span> <span class="pl-c1">=</span> <span class="pl-s1">re</span>.<span class="pl-en">search</span>(<span class="pl-s1">reexpr</span>, <span class="pl-s1">name</span>)
<span class="pl-k">return</span> <span class="pl-s1">rematch</span>.<span class="pl-en">group</span>(<span class="pl-c1">1</span>) <span class="pl-c1">+</span> <span class="pl-s">'_module'</span></pre></div>
<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="apache_php_install_modules:
- php5
- libapache2-mod-php5
apache_php_enable_module: php5.0
- name: Install php modules
package:
name: "{{ item }}"
state: present
with_items: "{{ apache_php_install_modules }}"
tags:
php
scgi
- name: Enable apache modules
apache2_module:
name: "{{ item }}"
state: present
with_items:
- scgi
- "{{ apache_php_enable_module }}"
notify:
- Restart apache
tags:
php
scgi"><pre class="notranslate"><span class="pl-ent">apache_php_install_modules</span>:
- <span class="pl-s">php5</span>
- <span class="pl-s">libapache2-mod-php5</span>
<span class="pl-ent">apache_php_enable_module</span>: <span class="pl-s">php5.0</span>
- <span class="pl-ent">name</span>: <span class="pl-s">Install php modules</span>
<span class="pl-ent">package</span>:
<span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item }}<span class="pl-pds">"</span></span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
<span class="pl-ent">with_items</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ apache_php_install_modules }}<span class="pl-pds">"</span></span>
<span class="pl-ent">tags</span>:
<span class="pl-s">php</span>
<span class="pl-s">scgi</span>
- <span class="pl-ent">name</span>: <span class="pl-s">Enable apache modules</span>
<span class="pl-ent">apache2_module</span>:
<span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ item }}<span class="pl-pds">"</span></span>
<span class="pl-ent">state</span>: <span class="pl-s">present</span>
<span class="pl-ent">with_items</span>:
- <span class="pl-s">scgi</span>
- <span class="pl-s"><span class="pl-pds">"</span>{{ apache_php_enable_module }}<span class="pl-pds">"</span></span>
<span class="pl-ent">notify</span>:
- <span class="pl-s">Restart apache</span>
<span class="pl-ent">tags</span>:
<span class="pl-s">php</span>
<span class="pl-s">scgi</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">either "ok" or "changed"</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Exception is thrown</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using module file /home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/ansible/modules/web_infrastructure/apache2_module.py
<localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497 `" && echo ansible-tmp-1506660428.72-709978674497="` echo /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497 `" ) && sleep 0'
<localhost> PUT /tmp/tmpiUGMfp TO /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/ /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rghrccwwnwgddngdcsfajyicavcmatch; /usr/bin/python /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py; rm -rf "/home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/" > /dev/null 2>&1'"'"' && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 238, in <module>
main()
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 233, in main
_set_state(module, module.params['state'])
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 184, in _set_state
if _module_is_enabled(module) != want_enabled:
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 141, in _module_is_enabled
searchstring = ' ' + create_apache_identifier(name)
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 170, in create_apache_identifier
return rematch.group(1) + '_module'
AttributeError: 'NoneType' object has no attribute 'group'
failed: [localhost] (item=php5) => {
"changed": false,
"failed": true,
"item": "php5",
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 238, in <module>\n main()\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 233, in main\n _set_state(module, module.params['state'])\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 184, in _set_state\n if _module_is_enabled(module) != want_enabled:\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 141, in _module_is_enabled\n searchstring = ' ' + create_apache_identifier(name)\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 170, in create_apache_identifier\n return rematch.group(1) + '_module'\nAttributeError: 'NoneType' object has no attribute 'group'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}"><pre class="notranslate"><code class="notranslate">Using module file /home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/ansible/modules/web_infrastructure/apache2_module.py
<localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497 `" && echo ansible-tmp-1506660428.72-709978674497="` echo /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497 `" ) && sleep 0'
<localhost> PUT /tmp/tmpiUGMfp TO /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/ /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-rghrccwwnwgddngdcsfajyicavcmatch; /usr/bin/python /home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/apache2_module.py; rm -rf "/home/travis/.ansible/tmp/ansible-tmp-1506660428.72-709978674497/" > /dev/null 2>&1'"'"' && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 238, in <module>
main()
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 233, in main
_set_state(module, module.params['state'])
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 184, in _set_state
if _module_is_enabled(module) != want_enabled:
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 141, in _module_is_enabled
searchstring = ' ' + create_apache_identifier(name)
File "/tmp/ansible_2VMVXu/ansible_module_apache2_module.py", line 170, in create_apache_identifier
return rematch.group(1) + '_module'
AttributeError: 'NoneType' object has no attribute 'group'
failed: [localhost] (item=php5) => {
"changed": false,
"failed": true,
"item": "php5",
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 238, in <module>\n main()\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 233, in main\n _set_state(module, module.params['state'])\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 184, in _set_state\n if _module_is_enabled(module) != want_enabled:\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 141, in _module_is_enabled\n searchstring = ' ' + create_apache_identifier(name)\n File \"/tmp/ansible_2VMVXu/ansible_module_apache2_module.py\", line 170, in create_apache_identifier\n return rematch.group(1) + '_module'\nAttributeError: 'NoneType' object has no attribute 'group'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}
</code></pre></div> | <h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">apache2_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.4.0.0
config file = /home/ps/.ansible.cfg
configured module search path = [u'/home/ps/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]"><pre class="notranslate"><code class="notranslate">ansible 2.4.0.0
config file = /home/ps/.ansible.cfg
configured module search path = [u'/home/ps/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<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="apache_modules:
- php5"><pre class="notranslate"><span class="pl-ent">apache_modules</span>:
- <span class="pl-s">php5</span></pre></div>
<h5 dir="auto">EXPECTED RESULTS</h5>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/web_infrastructure/apache2_module.py
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' 1.2.3.4 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952 `" && echo ansible-tmp-1506328589.49-122064381956952="` echo $HOME/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952 `" ) && sleep 0'"'"''
<1.2.3.4> (0, 'ansible-tmp-1506328589.49-122064381956952=/home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952\n', '')
<1.2.3.4> PUT /tmp/tmpP42OZP TO /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py
<1.2.3.4> SSH: EXEC sftp -b - -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' '[1.2.3.4]'
<1.2.3.4> (0, 'sftp> put /tmp/tmpP42OZP /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py\n', '')
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' 1.2.3.4 '/bin/sh -c '"'"'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/ /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py && sleep 0'"'"''
<1.2.3.4> (0, '', '')
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' -tt 1.2.3.4 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=gbfxlqwavpoyetsyizstcudrknzonvlx] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-gbfxlqwavpoyetsyizstcudrknzonvlx; /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<1.2.3.4> (0, '\r\nTraceback (most recent call last):\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 238, in <module>\r\n main()\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 233, in main\r\n _set_state(module, module.params[\'state\'])\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 184, in _set_state\r\n if _module_is_enabled(module) != want_enabled:\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 141, in _module_is_enabled\r\n searchstring = \' \' + create_apache_identifier(name)\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 170, in create_apache_identifier\r\n return rematch.group(1) + \'_module\'\r\nAttributeError: \'NoneType\' object has no attribute \'group\'\r\n', 'Shared connection to 1.2.3.4 closed.\r\n')
failed: [test-host] (item=php5) => {
"changed": false,
"failed": true,
"item": "php5",
"module_stderr": "Shared connection to 1.2.3.4 closed.\r\n",
"module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 238, in <module>\r\n main()\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 233, in main\r\n _set_state(module, module.params['state'])\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 184, in _set_state\r\n if _module_is_enabled(module) != want_enabled:\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 141, in _module_is_enabled\r\n searchstring = ' ' + create_apache_identifier(name)\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 170, in create_apache_identifier\r\n return rematch.group(1) + '_module'\r\nAttributeError: 'NoneType' object has no attribute 'group'\r\n",
"msg": "MODULE FAILURE",
"rc": 0
}"><pre class="notranslate"><code class="notranslate">Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/web_infrastructure/apache2_module.py
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' 1.2.3.4 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952 `" && echo ansible-tmp-1506328589.49-122064381956952="` echo $HOME/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952 `" ) && sleep 0'"'"''
<1.2.3.4> (0, 'ansible-tmp-1506328589.49-122064381956952=/home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952\n', '')
<1.2.3.4> PUT /tmp/tmpP42OZP TO /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py
<1.2.3.4> SSH: EXEC sftp -b - -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' '[1.2.3.4]'
<1.2.3.4> (0, 'sftp> put /tmp/tmpP42OZP /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py\n', '')
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' 1.2.3.4 '/bin/sh -c '"'"'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/ /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py && sleep 0'"'"''
<1.2.3.4> (0, '', '')
<1.2.3.4> ESTABLISH SSH CONNECTION FOR USER: ansible
<1.2.3.4> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=60 -o 'ControlPath=~/.ssh/ansible-ssh-%h-%p-%r' -tt 1.2.3.4 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=gbfxlqwavpoyetsyizstcudrknzonvlx] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-gbfxlqwavpoyetsyizstcudrknzonvlx; /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/apache2_module.py; rm -rf "/home/ansible/.ansible/tmp/ansible-tmp-1506328589.49-122064381956952/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<1.2.3.4> (0, '\r\nTraceback (most recent call last):\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 238, in <module>\r\n main()\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 233, in main\r\n _set_state(module, module.params[\'state\'])\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 184, in _set_state\r\n if _module_is_enabled(module) != want_enabled:\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 141, in _module_is_enabled\r\n searchstring = \' \' + create_apache_identifier(name)\r\n File "/tmp/ansible_m43APd/ansible_module_apache2_module.py", line 170, in create_apache_identifier\r\n return rematch.group(1) + \'_module\'\r\nAttributeError: \'NoneType\' object has no attribute \'group\'\r\n', 'Shared connection to 1.2.3.4 closed.\r\n')
failed: [test-host] (item=php5) => {
"changed": false,
"failed": true,
"item": "php5",
"module_stderr": "Shared connection to 1.2.3.4 closed.\r\n",
"module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 238, in <module>\r\n main()\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 233, in main\r\n _set_state(module, module.params['state'])\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 184, in _set_state\r\n if _module_is_enabled(module) != want_enabled:\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 141, in _module_is_enabled\r\n searchstring = ' ' + create_apache_identifier(name)\r\n File \"/tmp/ansible_m43APd/ansible_module_apache2_module.py\", line 170, in create_apache_identifier\r\n return rematch.group(1) + '_module'\r\nAttributeError: 'NoneType' object has no attribute 'group'\r\n",
"msg": "MODULE FAILURE",
"rc": 0
}
</code></pre></div>
<p dir="auto">Most probably this part of code is the issue.<br>
ansible 2.3.2</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""""
Work around for php modules; php7.x are always listed as php7_module
"""
php_module = re.search(r'^(php\d)\.', name)
if php_module:
name = php_module.group(1)"><pre class="notranslate"><code class="notranslate">"""
Work around for php modules; php7.x are always listed as php7_module
"""
php_module = re.search(r'^(php\d)\.', name)
if php_module:
name = php_module.group(1)
</code></pre></div>
<p dir="auto">ansible 2.4.0</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# re expressions to extract subparts of names
re_workarounds = [
('php', r'^(php\d)\.'),
]
for a2enmod_spelling, module_name in text_workarounds:
if a2enmod_spelling in name:
return module_name
for search, reexpr in re_workarounds:
if search in name:
rematch = re.search(reexpr, name)
return rematch.group(1) + '_module'
return name + '_module'"><pre class="notranslate"><code class="notranslate"># re expressions to extract subparts of names
re_workarounds = [
('php', r'^(php\d)\.'),
]
for a2enmod_spelling, module_name in text_workarounds:
if a2enmod_spelling in name:
return module_name
for search, reexpr in re_workarounds:
if search in name:
rematch = re.search(reexpr, name)
return rematch.group(1) + '_module'
return name + '_module'
</code></pre></div> | 1 |
<p dir="auto">For example</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="> touch empty
> kubectl rolling-update rcname -f empty
panic: runtime error: index out of range
goroutine 1 [running]:
panic(0x19dca80, 0xc82000e0d0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/kubectl/cmd.RunRollingUpdate(0xc8204c6200, 0x7fda65fb6198, 0xc820090008, 0xc820324800, 0xc8200a4690, 0x1, 0x5, 0xc82029f380, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:220 +0x46ee
k8s.io/kubernetes/pkg/kubectl/cmd.NewCmdRollingUpdate.func1(0xc820324800, 0xc8200a4690, 0x1, 0x5)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:86 +0x7d
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc820324800, 0xc8200a4640, 0x5, 0x5, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:565 +0x85a
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc8200d2000, 0xc820324800, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:651 +0x55c
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc8200d2000, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:610 +0x2d
k8s.io/kubernetes/cmd/kubectl/app.Run(0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/app/kubectl.go:32 +0xf0
main.main()
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/kubectl.go:28 +0x28"><pre class="notranslate"><code class="notranslate">> touch empty
> kubectl rolling-update rcname -f empty
panic: runtime error: index out of range
goroutine 1 [running]:
panic(0x19dca80, 0xc82000e0d0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/kubectl/cmd.RunRollingUpdate(0xc8204c6200, 0x7fda65fb6198, 0xc820090008, 0xc820324800, 0xc8200a4690, 0x1, 0x5, 0xc82029f380, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:220 +0x46ee
k8s.io/kubernetes/pkg/kubectl/cmd.NewCmdRollingUpdate.func1(0xc820324800, 0xc8200a4690, 0x1, 0x5)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/rollingupdate.go:86 +0x7d
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc820324800, 0xc8200a4640, 0x5, 0x5, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:565 +0x85a
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc8200d2000, 0xc820324800, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:651 +0x55c
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc8200d2000, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:610 +0x2d
k8s.io/kubernetes/cmd/kubectl/app.Run(0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/app/kubectl.go:32 +0xf0
main.main()
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/kubectl.go:28 +0x28
</code></pre></div> | <p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33587/kubernetes-pull-test-unit-integration/47348/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/33587/kubernetes-pull-test-unit-integration/47348/</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: interface conversion: interface is nil, not *v1.Secret
/usr/local/go/src/runtime/panic.go:481 +0x3ff
/usr/local/go/src/testing/testing.go:467 +0x22a
/usr/local/go/src/runtime/panic.go:443 +0x521
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:139 +0x70
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:104 +0x194f
/usr/local/go/src/testing/testing.go:473 +0xdd
/usr/local/go/src/testing/testing.go:582 +0xae3"><pre class="notranslate"><code class="notranslate">panic: interface conversion: interface is nil, not *v1.Secret
/usr/local/go/src/runtime/panic.go:481 +0x3ff
/usr/local/go/src/testing/testing.go:467 +0x22a
/usr/local/go/src/runtime/panic.go:443 +0x521
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:139 +0x70
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go:104 +0x194f
/usr/local/go/src/testing/testing.go:473 +0xdd
/usr/local/go/src/testing/testing.go:582 +0xae3
</code></pre></div>
<p dir="auto">@kubernetes/sig-cluster-federation</p> | 0 |
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.16</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/vn7jz1l1kl" rel="nofollow">https://codesandbox.io/s/vn7jz1l1kl</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Click the button that says "refresh"</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">Nothing should happen</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">[Vue warn]: Duplicate presence of slot "default" found in the same render tree - this will likely cause render errors.</p>
<hr>
<p dir="auto">I have a component <code class="notranslate">B</code> which accepts a scopedSlot, and a component <code class="notranslate">A</code> which accepts a slot. <code class="notranslate">A</code> is passing in it's slot into the scopedSlot of <code class="notranslate">B</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<template slot-scope="scope">
<slot></slot>
</template>"><pre class="notranslate"><code class="notranslate"><template slot-scope="scope">
<slot></slot>
</template>
</code></pre></div>
<p dir="auto">When the component <code class="notranslate">B</code> gets rerendered, I see this warning in the console. <code class="notranslate">B</code> passes a method to the scoped slot which will cause it to rerender when called.</p> | <h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Let me start by saying I love Vue. It is an awesome framework you guys have created, I enjoy using it, and it is at the very top of Frameworks of choice.</p>
<p dir="auto">But from day one there has been one small area where I found Vue lacking, this is in the Custom Directives department.</p>
<p dir="auto">I wasn't around for Vue 1, but from what I can gather a decision was made to "underpower" Custom Directives in favor of Components. And I agree, when you are developing applications Components is most likely all you need.</p>
<p dir="auto">The problem starts when you want to create plugins, especially UI plugins. I have created UI plugins in other Frameworks, specifically a Bootstrap native implementation, I have several features that are implemented with Custom Directives, I like how clean they are that way. But when I tried to achieve the same thing with Vue, well I got frustrated very quickly.</p>
<p dir="auto">Problem Number 1: We don't have a Vue instance. I wish we could create Custom Directives the Same way we create Custom Components. so we have an actual Vue Instance and we can use this. Right now you have to manually extract the directive bindings and store them in the in the element itself. It is not clean since I have to pass the el object around to have access to those properties. It is doable but not very clean.</p>
<p dir="auto">Problem Number 2: The update hook function it is not being called consistently. For instance, I have this: v-myDirective={foo: bar}; when bar changes the update method is not called, only when something in the DOM changes then update is called. This is super frustrating because many times you want to control the state of your directive based off a property value, but you have no consistent way to know if its value has changed. This is a real problem because there are things that cannot be done without a consistent way to know if a binded property has changed. I wish I could have a Vue instance and have watch methods to react to changes accordingly.</p>
<p dir="auto">I LOVE Vue, it is an awesome framework, I will continue to enjoy using it and to recommend it. But if this is improved I would have absolutely no reason to ever use any other framework.</p>
<p dir="auto">Thanks for the hard work and love that goes into Vue.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">The API will basically be the same one we have for Custom Components. The example is silly, but I would love to be able to do something like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Vue.directive('myDirective', {
data: {
el: null
},
props: ['foo', 'name'],
bind (el, binding, vnode, oldVnode) {
this.el = el
//Bind
},
inserted (el, binding, vnode, oldVnode) {
//Inserted
},
unbind (el, binding, vnode, oldVnode) {
//Unbind
},
computed: {
name () { return `My name is ${this.name}`}
},
watch: {
name (value) { this.nameUpdated(value)}
},
methods: {
nameUpdated (value) {
this.$emit('nameUpdated', value)
}
}
})"><pre class="notranslate"><code class="notranslate">Vue.directive('myDirective', {
data: {
el: null
},
props: ['foo', 'name'],
bind (el, binding, vnode, oldVnode) {
this.el = el
//Bind
},
inserted (el, binding, vnode, oldVnode) {
//Inserted
},
unbind (el, binding, vnode, oldVnode) {
//Unbind
},
computed: {
name () { return `My name is ${this.name}`}
},
watch: {
name (value) { this.nameUpdated(value)}
},
methods: {
nameUpdated (value) {
this.$emit('nameUpdated', value)
}
}
})
</code></pre></div> | 0 |
<p dir="auto"><strong>TypeScript Version: 1.8.10</strong></p>
<p dir="auto"><strong>Code</strong><br>
This is the file in the libary</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// File ../../lib/test.ts
/**
* Created by ThomasP on 29.04.2016.
*/
export function test(): number {
return Model.getNum();
}
export class Model {
static getNum(): number {
return 1;
}
}"><pre class="notranslate"><span class="pl-c">// File ../../lib/test.ts</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Created by ThomasP on 29.04.2016.</span>
<span class="pl-c"> */</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-smi">Model</span><span class="pl-kos">.</span><span class="pl-en">getNum</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-smi">Model</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-en">getNum</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-c1">1</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 test spec for the libary file</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// File: test.Spec.ts
import {test} from "../../lib/test";
/**
* Created by ThomasP on 29.04.2016.
*/
describe( 'test', function () {
it( 'should be able to get Model', function () {
expect( test() ).toBe( 1 );
});
});"><pre class="notranslate"><span class="pl-c">// File: test.Spec.ts</span>
<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-k">from</span> <span class="pl-s">"../../lib/test"</span><span class="pl-kos">;</span>
<span class="pl-c">/**</span>
<span class="pl-c"> * Created by ThomasP on 29.04.2016.</span>
<span class="pl-c"> */</span>
<span class="pl-en">describe</span><span class="pl-kos">(</span> <span class="pl-s">'test'</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-en">it</span><span class="pl-kos">(</span> <span class="pl-s">'should be able to get Model'</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-en">expect</span><span class="pl-kos">(</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toBe</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The actual compile target is es6 and the module system is system, see below</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"compilerOptions": {
"target": "es6",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules"
]
}"><pre class="notranslate">{
<span class="pl-ent">"compilerOptions"</span>: {
<span class="pl-ent">"target"</span>: <span class="pl-s"><span class="pl-pds">"</span>es6<span class="pl-pds">"</span></span>,
<span class="pl-ent">"module"</span>: <span class="pl-s"><span class="pl-pds">"</span>system<span class="pl-pds">"</span></span>,
<span class="pl-ent">"moduleResolution"</span>: <span class="pl-s"><span class="pl-pds">"</span>node<span class="pl-pds">"</span></span>,
<span class="pl-ent">"sourceMap"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"emitDecoratorMetadata"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"experimentalDecorators"</span>: <span class="pl-c1">true</span>,
<span class="pl-ent">"removeComments"</span>: <span class="pl-c1">false</span>,
<span class="pl-ent">"noImplicitAny"</span>: <span class="pl-c1">false</span>
},
<span class="pl-ent">"exclude"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>node_modules<span class="pl-pds">"</span></span>
]
}</pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
The test should work and the method test should be able to call the static method on the class Model<br>
<strong>Actual behavior:</strong><br>
The class Model is not reachable for the method test. The compiled target looks like this. Model will be defined but is undefined. Creating the class Model in the local execute function will <strong>not</strong> set Model to the variable defined in the context.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
* Created by ThomasP on 29.04.2016.
*/
System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var Model;
function test() {
return Model.getNum();
}
exports_1("test", test);
return {
setters:[],
execute: function() {
class Model {
static getNum() {
return 1;
}
}
exports_1("Model", Model);
}
}
});
//# sourceMappingURL=test.js.map"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * Created by ThomasP on 29.04.2016.</span>
<span class="pl-c"> */</span>
<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-s1">context_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">__moduleName</span> <span class="pl-c1">=</span> <span class="pl-s1">context_1</span> <span class="pl-c1">&&</span> <span class="pl-s1">context_1</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Model</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">test</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">Model</span><span class="pl-kos">.</span><span class="pl-en">getNum</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">"test"</span><span class="pl-kos">,</span> <span class="pl-s1">test</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-k">class</span> <span class="pl-v">Model</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-en">getNum</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">1</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">"Model"</span><span class="pl-kos">,</span> <span class="pl-v">Model</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">//# sourceMappingURL=test.js.map</span></pre></div>
<p dir="auto"><strong>Solution:</strong><br>
I think all defined classes must be set to the variables, which are defined in the upper context. Than the module will work as expected. I changed he output like above and now it will work fine. Another possible solution is to define a class not in the execute function, should be also work as expected.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/**
* Created by ThomasP on 29.04.2016.
*/
System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var Model;
function test() {
return Model.getNum();
}
exports_1("test", test);
return {
setters:[],
execute: function() {
Model = class Model {
static getNum() {
return 1;
}
}
exports_1("Model", Model);
}
}
});
//# sourceMappingURL=test.js.map"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c"> * Created by ThomasP on 29.04.2016.</span>
<span class="pl-c"> */</span>
<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-s1">context_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s">"use strict"</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">__moduleName</span> <span class="pl-c1">=</span> <span class="pl-s1">context_1</span> <span class="pl-c1">&&</span> <span class="pl-s1">context_1</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Model</span><span class="pl-kos">;</span>
<span class="pl-k">function</span> <span class="pl-en">test</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">Model</span><span class="pl-kos">.</span><span class="pl-en">getNum</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">"test"</span><span class="pl-kos">,</span> <span class="pl-s1">test</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-v">Model</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-v">Model</span> <span class="pl-kos">{</span>
<span class="pl-k">static</span> <span class="pl-en">getNum</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">1</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">"Model"</span><span class="pl-kos">,</span> <span class="pl-v">Model</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">//# sourceMappingURL=test.js.map</span></pre></div> | <p dir="auto">We have a large TypeScript project using different git repositories to separate work domains inside the project. We tend to create separate repositories for self-contained modules and use those modules in other repositories using git submodules. This helps tremendously to reduce clutter and distribute work.</p>
<p dir="auto">In our case some modules are used in many other repositories and those repositories are in turn used in other repositories. This sometimes leads to duplicate sources in projects using submodules which themselves depend on a common submodule. Assume the following example to clarify this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Project git
|-- A (git submodule)
| |-- a.ts
| |-- C (git submodule)
| |-- c.ts
|-- B (git submodule)
| |-- b.ts
| |-- C (git submodule)
| |-- c.ts
|-- app.ts
Submodule A git
|-- a.ts
|-- C (git submodule)
|-- c.ts
Submodule B git
|-- b.ts
|-- C (git submodule)
|-- c.ts
Submodule C git
|-- c.ts"><pre class="notranslate"><code class="notranslate">Project git
|-- A (git submodule)
| |-- a.ts
| |-- C (git submodule)
| |-- c.ts
|-- B (git submodule)
| |-- b.ts
| |-- C (git submodule)
| |-- c.ts
|-- app.ts
Submodule A git
|-- a.ts
|-- C (git submodule)
|-- c.ts
Submodule B git
|-- b.ts
|-- C (git submodule)
|-- c.ts
Submodule C git
|-- c.ts
</code></pre></div>
<p dir="auto">In this case submodule C is a self-contained repository used as submodule in repositories A and B which in turn are used as submodules in our main project git. This results in duplicate sources for <code class="notranslate">c.ts</code> in the main project which can sometimes lead to compiler errors along the lines of <code class="notranslate">Types have separate declarations bla bla</code>. See <a href="https://github.com/Microsoft/TypeScript/issues/5039#issuecomment-161264023" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/5039/hovercard">#5039</a> for an example (this feature request is a spin-off from the discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109143324" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/5039" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/5039/hovercard" href="https://github.com/microsoft/TypeScript/issues/5039">#5039</a> which proposes path mappings).</p>
<p dir="auto">This is because the TypeScript compiler treats the duplicate implementations of submodule C as separate implementations. Would it not be nice if the compiler detects those duplicate sources (by generating some sort of hash for each compiled source) and automatically maps subsequent sources to the first source already compiled? It would greatly improve the use of git submodules in TypeScript projects and prevents the formation of separate type declarations.</p> | 0 |
<p dir="auto">Date filter is not working on iPhone version of chrome (49.0.2623.73) and safari, it's working on desktop chrome (48.0.2564.116)<br>
<code class="notranslate">Last</code> swipe:{{last | date:'dd MM yyyy'}} Expiry:{{expiry | date:'dd MM yyyy'}}</p> | <p dir="auto"><em><strong>Note:</strong> This is a duplication of a <a href="http://stackoverflow.com/posts/38848089/edit" rel="nofollow">stackoverflow question</a> i asked a few weeks ago without any answer.<br>
I don't know if it's related to a bug or if it's the desired behavior.<br>
As i did not find answer on stackoverflow, i thought it's was the only place left to find one.</em></p>
<hr>
<p dir="auto">I'm writing a <strong>custom validator</strong> for a <strong>custom form component</strong>.<br>
Right now, i can inject dependencies in my custom validator such as services...</p>
<p dir="auto">But i need to have access from within the validator to informations stored in the Component...<br>
So i'm trying to inject the component in the Validator class, but this does not work..</p>
<p dir="auto">Maybe i'm missing something with DI ?</p>
<p dir="auto"><strong>Look at this plunker <a href="https://plnkr.co/edit/77muDxHCw7haGjTXWBcw?p=preview" rel="nofollow">here</a></strong></p>
<p dir="auto">When you open it, everything should work fine.<br>
Uncomment everything in the validator constructor, like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="constructor( private test: TestService, private component: CustomFormControlComponent ) {
test.serviceMethod();
component.componentMethod();
}"><pre class="notranslate"><code class="notranslate">constructor( private test: TestService, private component: CustomFormControlComponent ) {
test.serviceMethod();
component.componentMethod();
}
</code></pre></div>
<p dir="auto">And check the log output to see that DI failed to resolve the second parameter ...</p>
<p dir="auto">Any idea why ?</p>
<p dir="auto">Thanks a lot !</p> | 0 |
<p dir="auto">Impossible to do parallel numpy computations using python subprocesses,<br>
because just simple import numpy requires ~1Gb paging file</p>
<p dir="auto">I have 32Gb ram and 4Gb paging file<br>
this code causes an error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import multiprocessing
import time
def proc():
import numpy
time.sleep(1000)
if __name__ == '__main__':
for i in range(50):
multiprocessing.Process(target=proc).start()
time.sleep(1000)"><pre class="notranslate"><code class="notranslate">import multiprocessing
import time
def proc():
import numpy
time.sleep(1000)
if __name__ == '__main__':
for i in range(50):
multiprocessing.Process(target=proc).start()
time.sleep(1000)
</code></pre></div>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File "D:\DevelopPPP\projects\DeepFaceLive\_internal\python\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import core
File "D:\DevelopPPP\projects\DeepFaceLive\_internal\python\lib\site-packages\numpy\core\__init__.py", line 72, in <module>
from . import numeric
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 764, in get_code
File "<frozen importlib._bootstrap_external>", line 833, in get_data
MemoryError"><pre class="notranslate"><code class="notranslate"> File "D:\DevelopPPP\projects\DeepFaceLive\_internal\python\lib\site-packages\numpy\__init__.py", line 140, in <module>
from . import core
File "D:\DevelopPPP\projects\DeepFaceLive\_internal\python\lib\site-packages\numpy\core\__init__.py", line 72, in <module>
from . import numeric
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 764, in get_code
File "<frozen importlib._bootstrap_external>", line 833, in get_data
MemoryError
</code></pre></div>
<p dir="auto">OS : Windows 10 64-bit</p>
<h3 dir="auto">NumPy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.19.5 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]"><pre class="notranslate"><code class="notranslate">1.19.5 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]
</code></pre></div> | <h3 dir="auto">Background</h3>
<p dir="auto">We run our compile runs with daemontools to lock virtual memory usage to around 1GB per process (important when running very very parallel builds). During update from 1.19.4 -> 1.19.5 our nightlies trip over code that uses numpy.</p>
<p dir="auto">Fine with numpy==1.19.4 (1GB):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="softlimit -a $(expr 1024 \* 1024 \* 1024) make"><pre class="notranslate"><code class="notranslate">softlimit -a $(expr 1024 \* 1024 \* 1024) make
</code></pre></div>
<p dir="auto">Needed to build with numpy==1.19.5 (1.7GB):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="softlimit -a $(expr 1740 \* 1024 \* 1024) make"><pre class="notranslate"><code class="notranslate">softlimit -a $(expr 1740 \* 1024 \* 1024) make
</code></pre></div>
<p dir="auto">I've whittled it down to the smallest possible reproduction which is simply importing <code class="notranslate">numpy</code> version 1.19.5 with 1GB virtual memory limit. See "Reproducing code example"</p>
<p dir="auto">To examine further I ratcheted the limit up/down with 1.19.4 and 1.9.5 to find the point at which <code class="notranslate">import</code> succeeds.</p>
<table role="table">
<thead>
<tr>
<th>version</th>
<th>approx minimum import limit</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.19.4</td>
<td><code class="notranslate">softlimit -a 400000000 python3</code></td>
</tr>
<tr>
<td>1.19.5</td>
<td><code class="notranslate">softlimit -a 1200000000 python3</code></td>
</tr>
<tr>
<td>1.20.0rc2</td>
<td><code class="notranslate">softlimit -a 1200000000 python3</code></td>
</tr>
<tr>
<td>1.19.3</td>
<td><code class="notranslate">softlimit -a 1200000000 python3</code></td>
</tr>
<tr>
<td>1.19.2</td>
<td><code class="notranslate">softlimit -a 400000000 python3</code></td>
</tr>
</tbody>
</table>
<p dir="auto">Note this is with nothing but <code class="notranslate">import numpy</code>. The overhead difference ~800MB matches the limit changes we needed to get builds running.</p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">You can reproduce this just with loading of the module for version 1.19.5 on ubuntu:20.04 with daemontools. See below for Dockerfile to set up clean 20.04 to reproduce.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np"><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></pre></div>
<p dir="auto">Invoked with <code class="notranslate">softlimit -a 1073741824 python3</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@88e4e56b16a1:~# pip3 install numpy==1.19.5
Collecting numpy==1.19.5
Downloading numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)
|████████████████████████████████| 14.9 MB 10.7 MB/s
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.19.4
Uninstalling numpy-1.19.4:
Successfully uninstalled numpy-1.19.4
Successfully installed numpy-1.19.5
root@88e4e56b16a1:~# softlimit -a 1073741824 python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 143, in <module>
from . import lib
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/__init__.py", line 40, in <module>
from .arraypad import *
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/arraypad.py", line 533, in <module>
def pad(array, pad_width, mode='constant', **kwargs):
File "/usr/local/lib/python3.8/dist-packages/numpy/core/overrides.py", line 180, in decorator
source_object = compile(
MemoryError
>>> "><pre class="notranslate"><code class="notranslate">root@88e4e56b16a1:~# pip3 install numpy==1.19.5
Collecting numpy==1.19.5
Downloading numpy-1.19.5-cp38-cp38-manylinux2010_x86_64.whl (14.9 MB)
|████████████████████████████████| 14.9 MB 10.7 MB/s
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.19.4
Uninstalling numpy-1.19.4:
Successfully uninstalled numpy-1.19.4
Successfully installed numpy-1.19.5
root@88e4e56b16a1:~# softlimit -a 1073741824 python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 143, in <module>
from . import lib
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/__init__.py", line 40, in <module>
from .arraypad import *
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/arraypad.py", line 533, in <module>
def pad(array, pad_width, mode='constant', **kwargs):
File "/usr/local/lib/python3.8/dist-packages/numpy/core/overrides.py", line 180, in decorator
source_object = compile(
MemoryError
>>>
</code></pre></div>
<p dir="auto">But ok with 1.19.4:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@88e4e56b16a1:~# pip3 install numpy==1.19.4
Collecting numpy==1.19.4
Using cached numpy-1.19.4-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Successfully uninstalled numpy-1.19.5
Successfully installed numpy-1.19.4
root@88e4e56b16a1:~# softlimit -a 1073741824 python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
"><pre class="notranslate"><code class="notranslate">root@88e4e56b16a1:~# pip3 install numpy==1.19.4
Collecting numpy==1.19.4
Using cached numpy-1.19.4-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Successfully uninstalled numpy-1.19.5
Successfully installed numpy-1.19.4
root@88e4e56b16a1:~# softlimit -a 1073741824 python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
</code></pre></div>
<p dir="auto">Dockerfile for reproducing - vanilla 20.04 + python3 + pip + softlimit</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cat Dockerfile
from ubuntu:20.04
RUN apt-get update && apt-get install -y \
python3 python3-pip \
daemontools \
&& apt-get clean"><pre class="notranslate"><code class="notranslate">cat Dockerfile
from ubuntu:20.04
RUN apt-get update && apt-get install -y \
python3 python3-pip \
daemontools \
&& apt-get clean
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="docker build -t numpylimit .
docker run --rm -it numpylimit /bin/bash"><pre class="notranslate"><code class="notranslate">docker build -t numpylimit .
docker run --rm -it numpylimit /bin/bash
</code></pre></div>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=">>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 143, in <module>
from . import lib
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/__init__.py", line 40, in <module>
from .arraypad import *
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/arraypad.py", line 533, in <module>
def pad(array, pad_width, mode='constant', **kwargs):
File "/usr/local/lib/python3.8/dist-packages/numpy/core/overrides.py", line 180, in decorator
source_object = compile(
MemoryError"><pre class="notranslate"><code class="notranslate">>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 143, in <module>
from . import lib
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/__init__.py", line 40, in <module>
from .arraypad import *
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/arraypad.py", line 533, in <module>
def pad(array, pad_width, mode='constant', **kwargs):
File "/usr/local/lib/python3.8/dist-packages/numpy/core/overrides.py", line 180, in decorator
source_object = compile(
MemoryError
</code></pre></div>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.19.5</p>
<p dir="auto">Let me know if there is any more information I can give you.</p> | 1 |
<p dir="auto">According to the docs: <a href="https://github.com/atom/atom-shell/blob/master/docs/api/screen.md">https://github.com/atom/atom-shell/blob/master/docs/api/screen.md</a> you can access the primary display but they don't mention anything about managing other screens.</p>
<p dir="auto">Basically I want to load two BrowserWindows and tell them to appear on the different screens (when a user has more than one screen available).</p>
<p dir="auto">In Adobe AIR I did something like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var largestScreen = null;
if(air.Screen.screens.length > 1) {
for( index = 0; index < air.Screen.screens.length; ++index) {
var currentScreen = air.Screen.screens[index];
if( largestScreen == null ){
largestScreen = currentScreen;
}
else{
//Defining largest screen as biggest total area.
var currentArea = currentScreen.bounds.width * currentScreen.bounds.height;
var largestArea = largestScreen.bounds.width * largestScreen.bounds.height;
if(currentArea > largestArea) {
largestScreen = currentScreen;
}
}
}
} else {
// Show error that you need a projector screen
alert('You need more than one screen to run this application.');
}"><pre class="notranslate"><code class="notranslate">var largestScreen = null;
if(air.Screen.screens.length > 1) {
for( index = 0; index < air.Screen.screens.length; ++index) {
var currentScreen = air.Screen.screens[index];
if( largestScreen == null ){
largestScreen = currentScreen;
}
else{
//Defining largest screen as biggest total area.
var currentArea = currentScreen.bounds.width * currentScreen.bounds.height;
var largestArea = largestScreen.bounds.width * largestScreen.bounds.height;
if(currentArea > largestArea) {
largestScreen = currentScreen;
}
}
}
} else {
// Show error that you need a projector screen
alert('You need more than one screen to run this application.');
}
</code></pre></div>
<p dir="auto">And then I could target a window bounds for the windows.</p>
<p dir="auto">Is it possible to achieve something similar in atom-shell?</p> | <p dir="auto">It's more and more common to find desktops with two or even three screens. Make Atom Shell be able to detect such cases and allow the developer to show the app in a certain screen.</p> | 1 |
<p dir="auto">const printButton = document.getElementById('printButton');<br>
printButton.addEventListener('click',(event) => {<br>
const webview = document.querySelector('#printWebview')<br>
alert(webview)<br>
//webview.send('webview-print-render')<br>
webview.print({ silent: true, printBackground: true, deviceName: 'XP-80C' },<br>
(data) => {<br>
console.log("webview success", data);<br>
}<br>
)<br>
})</p>
<p dir="auto">无论我 silent 是 true 还是 false 都会弹出打印机列表。是BUG吗?还是我哪里有问题?</p> | <p dir="auto">Just an idea. Looking at how powerful is Electron JS I came to this idea. Being daily using apps like Spotify, Github Desktop, etc. it's been noticed by everyone that they all use separate amounts of RAM on their own since each one run's it's own runtime.</p>
<p dir="auto">Now why don't we create a common runtime default that act's as master runtime engine so that it can be used by all apps that depend on Electron JS. Like WebViews + Node.JS instance that are connected to a master Electron JS runtime.</p>
<p dir="auto">Some efforts on just implementing native webviews have been made previously <a href="https://github.com/pojala/electrino">https://github.com/pojala/electrino</a> & <a href="https://github.com/jscherer92/Quark">https://github.com/jscherer92/Quark</a> (these are the things I found may be more)</p>
<p dir="auto">So even can use MacOS's WebView / Windows's ChakraCore + the common NodeJS runtime I earlier mentioned ... are their any thing similar to <a href="https://github.com/nodejs/node-chakracore">https://github.com/nodejs/node-chakracore</a> ???</p> | 0 |
<p dir="auto">If you have multiple classes in the same module namespace but defined in different files (or even just different <code class="notranslate">module</code> blocks) TypeScript's <code class="notranslate">tsc</code> will wrap every one of them into its own nest of IIFEs; one for each level of namespace nesting.</p>
<p dir="auto">For deep namespace hierarchies this produces large amounts of code that increases code size and hurts parsing / loading performance.</p>
<p dir="auto">To solve this problem, we use a post processing tool (<a href="https://github.com/tschneidereit/typescript-module-merger">https://github.com/tschneidereit/typescript-module-merger</a>) to merge subsequent modules that appear in the same namespace. This is not a sound optimization but works well in practice. Such a feature should be part of the TypeScript compiler, perhaps under a compiler flag.</p> | <p dir="auto">We have a typescript application and a use a file per class. There are lots of benefits to this the major one being source control conflict reduction.</p>
<p dir="auto">We compile our app using the --out compiler flag but I think there is room for some serious optimization of the compilers output for modules.</p>
<p dir="auto">Currently if you have two classes defined in separate files the compile generates the following JavaScript.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var Example;
(function (Example) {
(function (Nested) {
(function (Issue) {
var bar = (function () {
function bar() {
}
return bar;
})();
Issue.bar = bar;
})(Nested.Issue || (Nested.Issue = {}));
var Issue = Nested.Issue;
})(Example.Nested || (Example.Nested = {}));
var Nested = Example.Nested;
})(Example || (Example = {}));
var Example;
(function (Example) {
(function (Nested) {
(function (Issue) {
var foo = (function () {
function foo() {
}
return foo;
})();
Issue.foo = foo;
})(Nested.Issue || (Nested.Issue = {}));
var Issue = Nested.Issue;
})(Example.Nested || (Example.Nested = {}));
var Nested = Example.Nested;
})(Example || (Example = {}));"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">Example</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-v">Example</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-v">Nested</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-v">Issue</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">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-s1">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">return</span> <span class="pl-s1">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-v">Issue</span><span class="pl-kos">.</span><span class="pl-c1">bar</span> <span class="pl-c1">=</span> <span class="pl-s1">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-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Issue</span> <span class="pl-c1">=</span> <span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Nested</span> <span class="pl-c1">=</span> <span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Example</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-v">Example</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-v">Nested</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-v">Issue</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-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-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-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-kos">;</span>
<span class="pl-v">Issue</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</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-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Issue</span> <span class="pl-c1">=</span> <span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Nested</span> <span class="pl-c1">=</span> <span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I suggest a compiler flag that composes all classes/ functions etc under a single module declaration? So the output code would be like the example below. This would dramatically reduce the size of the JavaScript the compiler outputs. I estimate that our app which currently compiles to around 15,000 lines of probably be only be 2000 lines if this were available.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var Example;
(function (Example) {
(function (Nested) {
(function (Issue) {
var bar = (function () {
function bar() {
}
return bar;
})();
Issue.bar = bar;
var foo = (function () {
function foo() {
}
return foo;
})();
Issue.foo = foo;
})(Nested.Issue || (Nested.Issue = {}));
var Issue = Nested.Issue;
})(Example.Nested || (Example.Nested = {}));
var Nested = Example.Nested;
})(Example || (Example = {}));"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-v">Example</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-v">Example</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-v">Nested</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-v">Issue</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">var</span> <span class="pl-s1">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-s1">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">return</span> <span class="pl-s1">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-v">Issue</span><span class="pl-kos">.</span><span class="pl-c1">bar</span> <span class="pl-c1">=</span> <span class="pl-s1">bar</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-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-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-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-kos">;</span>
<span class="pl-v">Issue</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</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-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Issue</span> <span class="pl-c1">=</span> <span class="pl-v">Nested</span><span class="pl-kos">.</span><span class="pl-c1">Issue</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-v">Nested</span> <span class="pl-c1">=</span> <span class="pl-v">Example</span><span class="pl-kos">.</span><span class="pl-c1">Nested</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-v">Example</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> | 1 |
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-style-text-inputs-as-form-controls" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-style-text-inputs-as-form-controls</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<ol dir="auto">
<li>The cursor will not go all the way down to the bottom of the blackboard.</li>
<li>The arrow keys on the keyboard are trying to operate the instruction scroll and the cursor on blackboard at the same time.</li>
</ol> | <p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-create-a-set-of-checkboxes" rel="nofollow">http://freecodecamp.com/challenges/waypoint-create-a-set-of-checkboxes</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">Issue: adding a new line at the bottom of the text editor does not scroll the editor to make the new line visible</p>
<p dir="auto">reproduce: move the cursor to the bottom line of the text editor. press enter to add a new line. the cursor will now be on that new line but will not be visible without scrolling the text editor window to see it</p> | 1 |
<h3 dir="auto">Bug summary</h3>
<p dir="auto">When plotting a surface and scatter points with <code class="notranslate">Axes3D</code>, either <em>none</em> of the scatter points are occluded by the surface or <em>all</em> of them are occluded. Whether or not they are occluded appears to depend upon a numerical threshold. (Speculation: perhaps the occlusion of a single point?)</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# On two separate plots, plot a surface and five lines via scatter3D.
# The five lines are vertically offset by a constant.
# The two separate plots differ by an imperceptible difference in offset.
# - The rendered difference is significant.
# - Neither is correct.
import numpy as np
import matplotlib.pyplot as plt
def surface(x, y):
return np.sin(x) + 0.5 * y * np.cos(x)
def plot_surface_and_lines(vertical_line_offset):
x, y = np.meshgrid(
np.linspace(-5, 5, 100),
np.linspace(-5, 5, 100),
)
fig = plt.figure(dpi=150)
ax = fig.add_subplot(projection='3d')
ax.set(
xlabel='x',
ylabel='y',
zlim=(-3, 3),
title=f'z offset = {vertical_line_offset}',
)
ax.plot_surface(x, y, surface(x, y))
a, b = np.meshgrid(np.linspace(-5, 5, 5), np.linspace(-5, 5, 100))
ax.scatter3D(a, b, surface(a, b) + vertical_line_offset, color='red')
plt.show()
plot_surface_and_lines(0.253)
plot_surface_and_lines(0.254)"><pre class="notranslate"><span class="pl-c"># On two separate plots, plot a surface and five lines via scatter3D. </span>
<span class="pl-c"># The five lines are vertically offset by a constant. </span>
<span class="pl-c"># The two separate plots differ by an imperceptible difference in offset.</span>
<span class="pl-c"># - The rendered difference is significant.</span>
<span class="pl-c"># - Neither is correct.</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-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">def</span> <span class="pl-en">surface</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>):
<span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-s1">x</span>) <span class="pl-c1">+</span> <span class="pl-c1">0.5</span> <span class="pl-c1">*</span> <span class="pl-s1">y</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">cos</span>(<span class="pl-s1">x</span>)
<span class="pl-k">def</span> <span class="pl-en">plot_surface_and_lines</span>(<span class="pl-s1">vertical_line_offset</span>):
<span class="pl-s1">x</span>, <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(
<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">5</span>, <span class="pl-c1">5</span>, <span class="pl-c1">100</span>),
<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">5</span>, <span class="pl-c1">5</span>, <span class="pl-c1">100</span>),
)
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">150</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-s1">projection</span><span class="pl-c1">=</span><span class="pl-s">'3d'</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set</span>(
<span class="pl-s1">xlabel</span><span class="pl-c1">=</span><span class="pl-s">'x'</span>,
<span class="pl-s1">ylabel</span><span class="pl-c1">=</span><span class="pl-s">'y'</span>,
<span class="pl-s1">zlim</span><span class="pl-c1">=</span>(<span class="pl-c1">-</span><span class="pl-c1">3</span>, <span class="pl-c1">3</span>),
<span class="pl-s1">title</span><span class="pl-c1">=</span><span class="pl-s">f'z offset = <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">vertical_line_offset</span><span class="pl-kos">}</span></span>'</span>,
)
<span class="pl-s1">ax</span>.<span class="pl-en">plot_surface</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>, <span class="pl-en">surface</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>))
<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(<span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">5</span>, <span class="pl-c1">5</span>, <span class="pl-c1">5</span>), <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">5</span>, <span class="pl-c1">5</span>, <span class="pl-c1">100</span>))
<span class="pl-s1">ax</span>.<span class="pl-en">scatter3D</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span>, <span class="pl-en">surface</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span>) <span class="pl-c1">+</span> <span class="pl-s1">vertical_line_offset</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'red'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()
<span class="pl-en">plot_surface_and_lines</span>(<span class="pl-c1">0.253</span>)
<span class="pl-en">plot_surface_and_lines</span>(<span class="pl-c1">0.254</span>)</pre></div>
<h3 dir="auto">Actual outcome</h3>
<kbd>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1323521/177592539-65cdee1c-28aa-4d31-9783-be1b1b2e7fb5.png"><img src="https://user-images.githubusercontent.com/1323521/177592539-65cdee1c-28aa-4d31-9783-be1b1b2e7fb5.png" style="max-width: 100%;"></a>
</kbd>
<kbd>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1323521/177592638-58cc892a-b208-431a-a777-2467319f6b52.png"><img src="https://user-images.githubusercontent.com/1323521/177592638-58cc892a-b208-431a-a777-2467319f6b52.png" style="max-width: 100%;"></a>
</kbd>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">Both plots should look like this, with occlusion determined point-by-point.</p>
<p dir="auto">(This was manually composited with an image editing tool, AFAICT this cannot be generated by matplotlib until the bug is fixed.)</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1323521/177594193-100e0cb8-fcaf-42dd-8488-dad982db8fd0.png"><img src="https://user-images.githubusercontent.com/1323521/177594193-100e0cb8-fcaf-42dd-8488-dad982db8fd0.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Additional information</h3>
<p dir="auto">This global occlusion occurs with many combinations of plots, not exclusively <code class="notranslate">.plot_surface</code> and <code class="notranslate">.scatter3D</code>. The occluder or the occluded can be generated by any of</p>
<ul dir="auto">
<li><code class="notranslate">.plot_trisurf</code></li>
<li><code class="notranslate">.plot_surface</code></li>
<li><code class="notranslate">.scatter3D</code></li>
<li><code class="notranslate">.plot_wireframe</code><br>
and possibly others. I did not test to find the numerical edge of occlusion/non-occlusion with the other combinations.</li>
</ul>
<p dir="auto">Perhaps this is related to other github issues related to depth testing or the underlying z-buffer.</p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Ubuntu 18.04.5 LTS, kernel 5.4.188+</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.2.2</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">module://ipykernel.pylab.backend_inline</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">3.7.13</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto">5.3.1 (via google colab release 2022/6/10)</p>
<h3 dir="auto">Installation</h3>
<p dir="auto"><em>No response</em></p> | <h3 dir="auto">Bug summary</h3>
<p dir="auto">wspace parameter does not work using <code class="notranslate">fig.subfigures()</code> <strong>without constrained layout</strong>.</p>
<h3 dir="auto">Code for reproduction</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fig = plt.figure(figsize=(20, 14))
subfigs = fig.subfigures(1, 4, wspace=0.5, width_ratios=[0.5, 1, 1, 1])
axs0= subfigs[0].subplots(nrows = 12, ncols = 1, sharex = True)
axs1 = subfigs[1].subplots(nrows = 12, ncols = 1, sharex = True)
subfigs[1].suptitle('\n A subfigure')
axs2 = subfigs[2].subplots(nrows = 12, ncols = 1, sharex = True)
subfigs[2].suptitle('\n A subfigure')
axs3 = subfigs[3].subplots(nrows = 12, ncols = 1, sharex = True)
subfigs[3].suptitle('\n A subfigure')"><pre class="notranslate"><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">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">20</span>, <span class="pl-c1">14</span>))
<span class="pl-s1">subfigs</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">subfigures</span>(<span class="pl-c1">1</span>, <span class="pl-c1">4</span>, <span class="pl-s1">wspace</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">width_ratios</span><span class="pl-c1">=</span>[<span class="pl-c1">0.5</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>])
<span class="pl-s1">axs0</span><span class="pl-c1">=</span> <span class="pl-s1">subfigs</span>[<span class="pl-c1">0</span>].<span class="pl-en">subplots</span>(<span class="pl-s1">nrows</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span>, <span class="pl-s1">ncols</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>, <span class="pl-s1">sharex</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>)
<span class="pl-s1">axs1</span> <span class="pl-c1">=</span> <span class="pl-s1">subfigs</span>[<span class="pl-c1">1</span>].<span class="pl-en">subplots</span>(<span class="pl-s1">nrows</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span>, <span class="pl-s1">ncols</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>, <span class="pl-s1">sharex</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>)
<span class="pl-s1">subfigs</span>[<span class="pl-c1">1</span>].<span class="pl-en">suptitle</span>(<span class="pl-s">'<span class="pl-cce">\n</span> A subfigure'</span>)
<span class="pl-s1">axs2</span> <span class="pl-c1">=</span> <span class="pl-s1">subfigs</span>[<span class="pl-c1">2</span>].<span class="pl-en">subplots</span>(<span class="pl-s1">nrows</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span>, <span class="pl-s1">ncols</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>, <span class="pl-s1">sharex</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>)
<span class="pl-s1">subfigs</span>[<span class="pl-c1">2</span>].<span class="pl-en">suptitle</span>(<span class="pl-s">'<span class="pl-cce">\n</span> A subfigure'</span>)
<span class="pl-s1">axs3</span> <span class="pl-c1">=</span> <span class="pl-s1">subfigs</span>[<span class="pl-c1">3</span>].<span class="pl-en">subplots</span>(<span class="pl-s1">nrows</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span>, <span class="pl-s1">ncols</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>, <span class="pl-s1">sharex</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>)
<span class="pl-s1">subfigs</span>[<span class="pl-c1">3</span>].<span class="pl-en">suptitle</span>(<span class="pl-s">'<span class="pl-cce">\n</span> A subfigure'</span>)</pre></div>
<h3 dir="auto">Actual outcome</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/64196642/226391637-ccb126ff-c20e-4fbd-8fda-f6e599942c75.png"><img src="https://user-images.githubusercontent.com/64196642/226391637-ccb126ff-c20e-4fbd-8fda-f6e599942c75.png" alt="image" style="max-width: 100%;"></a><br>
This is the output. It is the same regardless of the wspace parameter given.</p>
<h3 dir="auto">Expected outcome</h3>
<p dir="auto">I would expect more space between each subfigure, since we used wspace = 0.5<br>
If I change this parameter, nothing changes.</p>
<h3 dir="auto">Additional information</h3>
<p dir="auto">Maybe the bug is happening because the wspace is modifying the space between subplots, and not between subfigures ?</p>
<h3 dir="auto">Operating system</h3>
<p dir="auto">Ubuntu</p>
<h3 dir="auto">Matplotlib Version</h3>
<p dir="auto">3.6.2</p>
<h3 dir="auto">Matplotlib Backend</h3>
<p dir="auto">Qt5Agg</p>
<h3 dir="auto">Python version</h3>
<p dir="auto">3.10.9</p>
<h3 dir="auto">Jupyter version</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Installation</h3>
<p dir="auto">conda</p> | 0 |
<p dir="auto">"VIEW SAMPLES" shows 0 rows when it should show rows</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">it should show some samples from the table</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">it shows zero rows</p>
<h4 dir="auto">Screenshots</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/487433/102028816-ccf9a680-3d60-11eb-879d-e6723ac2f7dc.png"><img width="1124" alt="Screen Shot 2020-12-13 at 4 24 42 PM" src="https://user-images.githubusercontent.com/487433/102028816-ccf9a680-3d60-11eb-879d-e6723ac2f7dc.png" style="max-width: 100%;"></a></p>
<h4 dir="auto">How to reproduce the bug</h4>
<ol dir="auto">
<li>open the example chart titled "Boys"</li>
<li>click "VIEW SAMPLES" in the south/data pane</li>
</ol>
<h3 dir="auto">Environment</h3>
<p dir="auto">latest <code class="notranslate">master</code> <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/apache/superset/commit/3e22668f8dddf91edf0f9a13a23ecc69fffeb7b6/hovercard" href="https://github.com/apache/superset/commit/3e22668f8dddf91edf0f9a13a23ecc69fffeb7b6"><tt>3e22668</tt></a></p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/67837651/101453197-cd6aeb00-38e3-11eb-919e-d818e2826eb6.gif"><img src="https://user-images.githubusercontent.com/67837651/101453197-cd6aeb00-38e3-11eb-919e-d818e2826eb6.gif" alt="ezgif-7-65388df35972" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">this is not a regression introduced by any recent PRs.<br>
see gif, View Samples tab should show sample data of the underlying dataset in any data visualizations</p> | 1 |
<p dir="auto"><strong>Elasticsearch version</strong>: 2.3.5 (using <a href="https://hub.docker.com/_/elasticsearch/" rel="nofollow">https://hub.docker.com/_/elasticsearch/</a>)</p>
<p dir="auto"><strong>Plugins installed</strong>: head, license, cloud-aws, marvel-agent (marvel is disabled on tribe and master-only nodes)</p>
<p dir="auto"><strong>JVM version</strong>: <a href="https://hub.docker.com/_/elasticsearch/" rel="nofollow">https://hub.docker.com/_/elasticsearch/</a></p>
<p dir="auto"><strong>OS version</strong>: <a href="https://hub.docker.com/_/elasticsearch/" rel="nofollow">https://hub.docker.com/_/elasticsearch/</a></p>
<p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br>
Configure tribe for all possible remote clusters, but only some may be available at a single time. This configuration uses service discovery and DNS because the IPs will be dynamic. If a cluster is not yet up or DNS fails to resolve a remote entry, elasticsearch exits. If i configure only the DNS cluster entries that are up at the time of startup, then it appears to work as intended.</p>
<p dir="auto">My assumption is that it would continue retrying at a backoff interval and serving requests for the clusters it can successfully connect to. I'm not sure if this behavior would also affect an extended WAN outage, but would prefer a similar robust behavior.</p>
<p dir="auto"><strong>Steps to reproduce</strong>:</p>
<ol dir="auto">
<li>Configure tribe nodes with DNS with at least one being unknown host at startup:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "-Des.node.master=false",
"-Des.marvel.enabled=false",
"-Des.tribe.dc1.cluster.name=dc1-elasticsearch",
"-Des.tribe.dc1.discovery.zen.ping.unicast.hosts=master-elasticsearch-dc1",
"-Des.tribe.dc2.cluster.name=dc2-elasticsearch",
"-Des.tribe.dc2.discovery.zen.ping.unicast.hosts=master-elasticsearch-dc2","><pre lang=""-Des.node.data=false"," class="notranslate"><code class="notranslate"> "-Des.node.master=false",
"-Des.marvel.enabled=false",
"-Des.tribe.dc1.cluster.name=dc1-elasticsearch",
"-Des.tribe.dc1.discovery.zen.ping.unicast.hosts=master-elasticsearch-dc1",
"-Des.tribe.dc2.cluster.name=dc2-elasticsearch",
"-Des.tribe.dc2.discovery.zen.ping.unicast.hosts=master-elasticsearch-dc2",
</code></pre></div>
<ol dir="auto">
<li>elasticsearch will exit with exception below.</li>
</ol>
<p dir="auto"><strong>Provide logs (if relevant)</strong>:<br>
Exception in thread "main" java.lang.IllegalArgumentException: Failed to resolve address for [master-elasticsearch-dc2]<br>
Likely root cause: java.net.UnknownHostException: master-elasticsearch-dc2: unknown error<br>
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)<br>
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)<br>
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)<br>
at java.net.InetAddress.getAllByName0(InetAddress.java:1276)<br>
at java.net.InetAddress.getAllByName(InetAddress.java:1192)<br>
at java.net.InetAddress.getAllByName(InetAddress.java:1126)<br>
at org.elasticsearch.transport.netty.NettyTransport.parse(NettyTransport.java:733)<br>
at org.elasticsearch.transport.netty.NettyTransport.addressesFromString(NettyTransport.java:685)<br>
at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:424)<br>
at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.(UnicastZenPing.java:160)<br>
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)<br>
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<br>
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)<br>
at <<>><br>
at org.elasticsearch.node.Node.(Node.java:213)<br>
at org.elasticsearch.tribe.TribeClientNode.(TribeClientNode.java:35)<br>
at org.elasticsearch.tribe.TribeService.(TribeService.java:146)<br>
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)<br>
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<br>
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)<br>
at <<>><br>
at org.elasticsearch.node.Node.(Node.java:213)<br>
at org.elasticsearch.node.Node.(Node.java:140)<br>
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)<br>
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)<br>
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)<br>
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)</p> | <p dir="auto">Hi folks,</p>
<p dir="auto">there seems to be a regression from <strong>1.7.3</strong> to <strong>2.0.0</strong> regarding the <code class="notranslate">gateway.recover_after_time</code> setting.</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="docker run --name="elasticsearch" -p 9200:9200 -p 9300:9300 -e "SERVICE_ID=$hostname" -e "SERVICE_NAME=elasticsearch" elasticsearch:2.0.0 -Des.index.number_of_shards=3 -Des.index.number_of_replicas=2 -Des.gateway.recover_after_nodes=2 -Des.gateway.expected_nodes=3 -Des.gateway.recover_after_time=5m -Des.discovery.zen.ping.multicast.enabled=false -Des.discovery.zen.ping.unicast.hosts="01.elasticsearch,02.elasticsearch,03.elasticsearch" -Des.cluster.name="logging-test" -Des.network.publish_host="${PUBLIC_IP}""><pre class="notranslate">docker run --name=<span class="pl-s"><span class="pl-pds">"</span>elasticsearch<span class="pl-pds">"</span></span> -p 9200:9200 -p 9300:9300 -e <span class="pl-s"><span class="pl-pds">"</span>SERVICE_ID=<span class="pl-smi">$hostname</span><span class="pl-pds">"</span></span> -e <span class="pl-s"><span class="pl-pds">"</span>SERVICE_NAME=elasticsearch<span class="pl-pds">"</span></span> elasticsearch:2.0.0 -Des.index.number_of_shards=3 -Des.index.number_of_replicas=2 -Des.gateway.recover_after_nodes=2 -Des.gateway.expected_nodes=3 -Des.gateway.recover_after_time=5m -Des.discovery.zen.ping.multicast.enabled=false -Des.discovery.zen.ping.unicast.hosts=<span class="pl-s"><span class="pl-pds">"</span>01.elasticsearch,02.elasticsearch,03.elasticsearch<span class="pl-pds">"</span></span> -Des.cluster.name=<span class="pl-s"><span class="pl-pds">"</span>logging-test<span class="pl-pds">"</span></span> -Des.network.publish_host=<span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">${PUBLIC_IP}</span><span class="pl-pds">"</span></span></pre></div>
<p dir="auto">I run Elasticsearch on three nodes (Docker hosts). The DNS names are not immediatly available. In <strong>1.7.3</strong> the cluster stabilizes after a couple of minutes. In <strong>2.0.0</strong> the container crashes directly.</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Exception in thread "main" java.lang.IllegalArgumentException: Failed to resolve address for [02.elasticsearch]
Likely root cause: java.net.UnknownHostException: 02.elasticsearch: unknown error
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at org.elasticsearch.transport.netty.NettyTransport.parse(NettyTransport.java:668)
at org.elasticsearch.transport.netty.NettyTransport.addressesFromString(NettyTransport.java:620)
at org.elasticsearch.transport.TransportService.addressesFromString(TransportService.java:398)
at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.<init>(UnicastZenPing.java:141)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at <<<guice>>>
at org.elasticsearch.node.Node.<init>(Node.java:198)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)"><pre class="notranslate"><span class="pl-smi">Exception</span> <span class="pl-s1">in</span> <span class="pl-s1">thread</span> <span class="pl-s">"main"</span> <span class="pl-smi">java</span>.<span class="pl-smi">lang</span>.<span class="pl-smi">IllegalArgumentException</span>: <span class="pl-s1">Failed</span> <span class="pl-s1">to</span> <span class="pl-s1">resolve</span> <span class="pl-smi">address</span> <span class="pl-s1">for</span> [<span class="pl-c1">02.</span><span class="pl-s1">elasticsearch</span>]
<span class="pl-smi">Likely</span> <span class="pl-s1">root</span> <span class="pl-s1">cause</span>: <span class="pl-smi">java</span>.<span class="pl-smi">net</span>.<span class="pl-smi">UnknownHostException</span>: <span class="pl-c1">02.</span><span class="pl-s1">elasticsearch</span>: <span class="pl-smi">unknown</span> <span class="pl-s1">error</span>
<span class="pl-smi">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">Inet6AddressImpl</span>.<span class="pl-s1">lookupAllHostAddr</span>(<span class="pl-smi">Native</span> <span class="pl-s1">Method</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">InetAddress$2</span>.<span class="pl-en">lookupAllHostAddr</span>(<span class="pl-smi">InetAddress</span>.<span class="pl-smi">java</span>:<span class="pl-c1">928</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">InetAddress</span>.<span class="pl-en">getAddressesFromNameService</span>(<span class="pl-smi">InetAddress</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1323</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">InetAddress</span>.<span class="pl-en">getAllByName0</span>(<span class="pl-smi">InetAddress</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1276</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">InetAddress</span>.<span class="pl-en">getAllByName</span>(<span class="pl-smi">InetAddress</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1192</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">net</span>.<span class="pl-s1">InetAddress</span>.<span class="pl-en">getAllByName</span>(<span class="pl-smi">InetAddress</span>.<span class="pl-smi">java</span>:<span class="pl-c1">1126</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">transport</span>.<span class="pl-s1">netty</span>.<span class="pl-s1">NettyTransport</span>.<span class="pl-en">parse</span>(<span class="pl-smi">NettyTransport</span>.<span class="pl-smi">java</span>:<span class="pl-c1">668</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">transport</span>.<span class="pl-s1">netty</span>.<span class="pl-s1">NettyTransport</span>.<span class="pl-en">addressesFromString</span>(<span class="pl-smi">NettyTransport</span>.<span class="pl-smi">java</span>:<span class="pl-c1">620</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">transport</span>.<span class="pl-s1">TransportService</span>.<span class="pl-en">addressesFromString</span>(<span class="pl-smi">TransportService</span>.<span class="pl-smi">java</span>:<span class="pl-c1">398</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">discovery</span>.<span class="pl-s1">zen</span>.<span class="pl-s1">ping</span>.<span class="pl-s1">unicast</span>.<span class="pl-s1">UnicastZenPing</span>.<<span class="pl-smi">init</span>>(<span class="pl-smi">UnicastZenPing</span>.<span class="pl-smi">java</span>:<span class="pl-c1">141</span>)
<span class="pl-smi">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">NativeConstructorAccessorImpl</span>.<span class="pl-en">newInstance0</span>(<span class="pl-smi">Native</span> <span class="pl-s1">Method</span>)
<span class="pl-s1">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">NativeConstructorAccessorImpl</span>.<span class="pl-en">newInstance</span>(<span class="pl-smi">NativeConstructorAccessorImpl</span>.<span class="pl-smi">java</span>:<span class="pl-c1">62</span>)
<span class="pl-s1">at</span> <span class="pl-s1">sun</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">DelegatingConstructorAccessorImpl</span>.<span class="pl-en">newInstance</span>(<span class="pl-smi">DelegatingConstructorAccessorImpl</span>.<span class="pl-smi">java</span>:<span class="pl-c1">45</span>)
<span class="pl-s1">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">Constructor</span>.<span class="pl-en">newInstance</span>(<span class="pl-smi">Constructor</span>.<span class="pl-smi">java</span>:<span class="pl-c1">422</span>)
<span class="pl-s1">at</span> <<<<span class="pl-s1">guice</span>>>>
<span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">node</span>.<span class="pl-s1">Node</span>.<<span class="pl-smi">init</span>>(<span class="pl-smi">Node</span>.<span class="pl-smi">java</span>:<span class="pl-c1">198</span>)
<span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">node</span>.<span class="pl-s1">NodeBuilder</span>.<span class="pl-en">build</span>(<span class="pl-smi">NodeBuilder</span>.<span class="pl-smi">java</span>:<span class="pl-c1">145</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">bootstrap</span>.<span class="pl-s1">Bootstrap</span>.<span class="pl-en">setup</span>(<span class="pl-smi">Bootstrap</span>.<span class="pl-smi">java</span>:<span class="pl-c1">170</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">bootstrap</span>.<span class="pl-s1">Bootstrap</span>.<span class="pl-en">init</span>(<span class="pl-smi">Bootstrap</span>.<span class="pl-smi">java</span>:<span class="pl-c1">270</span>)
<span class="pl-s1">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">elasticsearch</span>.<span class="pl-s1">bootstrap</span>.<span class="pl-s1">Elasticsearch</span>.<span class="pl-en">main</span>(<span class="pl-smi">Elasticsearch</span>.<span class="pl-smi">java</span>:<span class="pl-c1">35</span>)</pre></div> | 1 |
<p dir="auto">Since TypeScript is a superset of JavaScript it should be possible to compile ES6 code without errors.</p>
<p dir="auto">This valid ES6 snippets throws the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error:(3, 14) TS2339: Property 'weight' does not exist on type 'Car'."><pre class="notranslate"><code class="notranslate">Error:(3, 14) TS2339: Property 'weight' does not exist on type 'Car'.
</code></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Car {
constructor(weight) {
this.weight = weight;
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Car</span> <span class="pl-kos">{</span>
<span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">weight</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">weight</span> <span class="pl-c1">=</span> <span class="pl-s1">weight</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Is this a bug or a 'feature'?</p> | <p dir="auto">The following snippet is valid ES6, but does not compile due to the undeclared property <code class="notranslate">thing</code>. Since TypeScript is aiming to be a superset of ES6, how will this situation be approached?</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Thing {
constructor() {
this.thing = 12;
}
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Thing</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">this</span><span class="pl-kos">.</span><span class="pl-c1">thing</span> <span class="pl-c1">=</span> <span class="pl-c1">12</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div> | 1 |
<p dir="auto">If the node doesn't exist in the cache we can't deference it</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="W0612 13:30:58.798999 17771 reflector.go:334] k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go:393: watch of *api.Node ended with: too old resource version: 2009 (2014)
panic: interface conversion: interface {} is nil, not *api.Node [recovered]
panic: interface conversion: interface {} is nil, not *api.Node
goroutine 158712 [running]:
panic(0x243e060, 0xc84b625700)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc83c6a4f30)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x243e060, 0xc84b625700)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1dec540, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222
k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc84c2506e0, 0xc84ab17740, 0xc84c0c0c60, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77
k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc84c2506e0, 0xc84ab17740, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a
k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc84ab17740, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f
k8s.io/kubernetes/test/integration.waitForReflection(0xc83c6a4f30, 0x7ff9e4625d80, 0xc84ab51860, 0x2a3a440, 0x19, 0x2dfbf88, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83c6a4f30, 0xc8464a8f00, 0x7ff9e4625d80, 0xc84ab51860, 0xc84aa5eb00)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83c6a4f30, 0xc84aa5eb00, 0x7ff9e4625d80, 0xc84ab51860)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9
k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83c6a4f30)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e
testing.tRunner(0xc83c6a4f30, 0x3b68ea0)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892
FAIL k8s.io/kubernetes/test/integration 250.517s"><pre class="notranslate"><code class="notranslate">W0612 13:30:58.798999 17771 reflector.go:334] k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go:393: watch of *api.Node ended with: too old resource version: 2009 (2014)
panic: interface conversion: interface {} is nil, not *api.Node [recovered]
panic: interface conversion: interface {} is nil, not *api.Node
goroutine 158712 [running]:
panic(0x243e060, 0xc84b625700)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc83c6a4f30)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x243e060, 0xc84b625700)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1dec540, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222
k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc84c2506e0, 0xc84ab17740, 0xc84c0c0c60, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77
k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc84c2506e0, 0xc84ab17740, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a
k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc84ab17740, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f
k8s.io/kubernetes/test/integration.waitForReflection(0xc83c6a4f30, 0x7ff9e4625d80, 0xc84ab51860, 0x2a3a440, 0x19, 0x2dfbf88, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83c6a4f30, 0xc8464a8f00, 0x7ff9e4625d80, 0xc84ab51860, 0xc84aa5eb00)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83c6a4f30, 0xc84aa5eb00, 0x7ff9e4625d80, 0xc84ab51860)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9
k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83c6a4f30)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e
testing.tRunner(0xc83c6a4f30, 0x3b68ea0)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892
FAIL k8s.io/kubernetes/test/integration 250.517s
</code></pre></div> | <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="panic: interface conversion: interface {} is nil, not *api.Node [recovered]
panic: interface conversion: interface {} is nil, not *api.Node
goroutine 42845 [running]:
panic(0x24413e0, 0xc8383133c0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc83bebbc20)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x24413e0, 0xc8383133c0)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1deefa0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222
k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc837aa12a0, 0xc838313300, 0xc838175320, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77
k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc837aa12a0, 0xc838313300, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a
k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc838313300, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f
k8s.io/kubernetes/test/integration.waitForReflection(0xc83bebbc20, 0x7f210f5a71e8, 0xc837c740a0, 0x2a3dce0, 0x19, 0x2e00598, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83bebbc20, 0xc831b12500, 0x7f210f5a71e8, 0xc837c740a0, 0xc838c9ae80)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83bebbc20, 0xc838c9ae80, 0x7f210f5a71e8, 0xc837c740a0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9
k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83bebbc20)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e
testing.tRunner(0xc83bebbc20, 0x3b6ee50)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892"><pre class="notranslate"><code class="notranslate">panic: interface conversion: interface {} is nil, not *api.Node [recovered]
panic: interface conversion: interface {} is nil, not *api.Node
goroutine 42845 [running]:
panic(0x24413e0, 0xc8383133c0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc83bebbc20)
/usr/local/go/src/testing/testing.go:467 +0x192
panic(0x24413e0, 0xc8383133c0)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/test/integration.waitForReflection.func1(0x1deefa0, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:112 +0x222
k8s.io/kubernetes/pkg/util/wait.WaitFor(0xc837aa12a0, 0xc838313300, 0xc838175320, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:210 +0x77
k8s.io/kubernetes/pkg/util/wait.pollInternal(0xc837aa12a0, 0xc838313300, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:170 +0x8a
k8s.io/kubernetes/pkg/util/wait.Poll(0x5f5e100, 0x6fc23ac00, 0xc838313300, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:164 +0x4f
k8s.io/kubernetes/test/integration.waitForReflection(0xc83bebbc20, 0x7f210f5a71e8, 0xc837c740a0, 0x2a3dce0, 0x19, 0x2e00598, 0x0, 0x0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:108 +0x172
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes.func1(0xc83bebbc20, 0xc831b12500, 0x7f210f5a71e8, 0xc837c740a0, 0xc838c9ae80)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:178 +0x249
k8s.io/kubernetes/test/integration.DoTestUnschedulableNodes(0xc83bebbc20, 0xc838c9ae80, 0x7f210f5a71e8, 0xc837c740a0)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:242 +0xaf9
k8s.io/kubernetes/test/integration.TestUnschedulableNodes(0xc83bebbc20)
/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/scheduler_test.go:84 +0x73e
testing.tRunner(0xc83bebbc20, 0x3b6ee50)
/usr/local/go/src/testing/testing.go:473 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:582 +0x892
</code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/davidopp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/davidopp">@davidopp</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mml/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mml">@mml</a></p> | 1 |
<p dir="auto">Given its role in ternary expressions (and perhaps in more upcoming syntactic constructs?), isn't letting <code class="notranslate">?</code> be used as a variable name allowing too much room for potential confusion?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> ? = true
true
julia> ??!?:?
false
julia> !??!?:!??!?:?
true
julia> !???:!?:?
false:true
julia> (x->(?->?(?))(?->x(x->?(?)(x))))(x->(?->(?==0?1:(?*x(?-1))))).(?:?<<?<<?)
4-element Array{Int64,1}:
1
2
6
24"><pre class="notranslate"><code class="notranslate">julia> ? = true
true
julia> ??!?:?
false
julia> !??!?:!??!?:?
true
julia> !???:!?:?
false:true
julia> (x->(?->?(?))(?->x(x->?(?)(x))))(x->(?->(?==0?1:(?*x(?-1))))).(?:?<<?<<?)
4-element Array{Int64,1}:
1
2
6
24
</code></pre></div>
<p dir="auto">(also isn't it amazing that these even parse?) Anyway, I suppose, unless one really wants to use <code class="notranslate">?</code> as a function or macro name, that this possibility could be deprecated?</p> | <p dir="auto">I have a composite type which has a single Dict property that I thought would be interesting to access with an overloaded ? operator</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type J9Type
propDict::Dict
end
function ?(obj::J9Type,field::Union(Symbol,String))
return get(obj.propDict,field,Nothing())
end
A = J9Type([:p1=>1,:p2=>2,:p3=>7])"><pre class="notranslate"><code class="notranslate">type J9Type
propDict::Dict
end
function ?(obj::J9Type,field::Union(Symbol,String))
return get(obj.propDict,field,Nothing())
end
A = J9Type([:p1=>1,:p2=>2,:p3=>7])
</code></pre></div>
<p dir="auto">I found that I could only use my overloaded <code class="notranslate">?</code> operator if I mention it before hand, even with a comment. Otherwise it says that <code class="notranslate">?</code> is not a generic function.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#?
?(A,:p1)"><pre class="notranslate"><code class="notranslate">#?
?(A,:p1)
</code></pre></div> | 1 |
<p dir="auto">We've been adding a bunch of sync file system ops (aka handlers) recently - for example <code class="notranslate">deno.statSync</code>. We want to have async thread pool versions of these ops but we would like to do it without fully duplicating all of the existing code.</p>
<p dir="auto">This will require a relatively invasive refactoring of how we structure handlers.rs, so that we're mapping messages to Rust futures instead of to functions. Then we should leverage <a href="https://tokio-rs.github.io/tokio/tokio_fs" rel="nofollow">https://tokio-rs.github.io/tokio/tokio_fs</a></p>
<p dir="auto">This is more of an umbrella issue - it will likely take several smaller refactors to get there.</p> | <p dir="auto"><g-emoji class="g-emoji" alias="wave" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44b.png">👋</g-emoji> trying to build the latest release, but run into some build issue. The error log is as below:</p>
<details>
<summary>build failure</summary>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="==> cargo install -vv --locked --root /usr/local/Cellar/deno/1.5.4 --path .
Installing deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)
Updating crates.io index
Downloading crates ...
Downloaded ansi_term v0.11.0
Downloaded alloc-stdlib v0.2.1
Downloaded anyhow v1.0.32
Downloaded anymap v0.12.1
Downloaded arrayvec v0.5.1
Downloaded build_const v0.2.1
Downloaded httparse v1.3.4
Downloaded ident_case v1.0.1
Downloaded jsonc-parser v0.14.0
Downloaded lazy_static v1.4.0
Downloaded radix_fmt v1.0.0
Downloaded quote v1.0.7
Downloaded rand_core v0.5.1
Downloaded proc-macro2 v0.4.30
Downloaded phf v0.8.0
Downloaded swc_atoms v0.2.5
Downloaded swc_ecma_ast v0.35.0
Downloaded swc_ecma_dep_graph v0.9.0
Downloaded swc_ecma_codegen_macros v0.5.0
Downloaded swc_ecma_parser_macros v0.4.1
Downloaded swc_ecma_parser v0.43.1
Downloaded thiserror v1.0.20
Downloaded tokio-tungstenite v0.11.0
Downloaded tungstenite v0.11.1
Downloaded tracing v0.1.19
Downloaded swc_ecma_codegen v0.41.1
Downloaded utf8parse v0.2.0
Downloaded twoway v0.1.8
Downloaded termcolor v1.1.0
Downloaded rand_xorshift v0.1.1
Downloaded remove_dir_all v0.5.3
Downloaded unicode-xid v0.1.0
Downloaded unicode-xid v0.2.1
Downloaded unicode-bidi v0.3.4
Downloaded walkdir v2.3.1
Downloaded rand_isaac v0.1.1
Downloaded version_check v0.9.2
Downloaded which v4.0.2
Downloaded futures v0.3.8
Downloaded tracing-core v0.1.16
Downloaded thiserror-impl v1.0.20
Downloaded sys-info v0.7.0
Downloaded semver v0.9.0
Downloaded serde_derive v1.0.117
Downloaded unicode-width v0.1.8
Downloaded want v0.3.0
Downloaded vec_map v0.8.2
Downloaded url v2.1.1
Downloaded ast_node v0.7.0
Downloaded strsim v0.9.3
Downloaded brotli-decompressor v2.3.1
Downloaded unicode-segmentation v1.6.0
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/40_write_file.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/41_prompt.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/90_deno_ns.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/99_main.js
[deno 1.5.4] Snapshot size: 248015
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/CLI_SNAPSHOT.bin
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/00_typescript.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/99_main_compiler.js
[deno 1.5.4] Snapshot size: 3778336
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/COMPILER_SNAPSHOT.bin
Running `CARGO=/usr/local/Cellar/rust/1.47.0/bin/cargo CARGO_BIN_NAME=deno CARGO_CRATE_NAME=deno CARGO_MANIFEST_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli CARGO_PKG_AUTHORS='the Deno authors' CARGO_PKG_DESCRIPTION='Provides the deno executable' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=deno CARGO_PKG_REPOSITORY='https://github.com/denoland/deno' CARGO_PKG_VERSION=1.5.4 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' DENO_FETCH_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts DENO_WEB_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts DYLD_FALLBACK_LIBRARY_PATH='/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps:/usr/local/Cellar/rust/1.47.0/lib:/private/tmp/deno-20201123-87041-1pvuv3v/deno/.brew_home/lib:/usr/local/lib:/usr/lib' GIT_COMMIT_HASH=UNKNOWN OUT_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out PROFILE=release TARGET=x86_64-apple-darwin TS_VERSION=4.0.5 rustc --crate-name deno --edition=2018 cli/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=z -C lto -C codegen-units=1 -C metadata=165ba8ab1ba1d38d --out-dir /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps -L dependency=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps --extern atty=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libatty-20b66de07789d749.rlib --extern base64=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbase64-ae4a39f942b63d83.rlib --extern byteorder=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbyteorder-a02c326dacd510de.rlib --extern bytes=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbytes-cdb77ed40c3f20da.rlib --extern clap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libclap-b68f524a56e40375.rlib --extern deno_core=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_core-c8ffd184beebca4e.rlib --extern deno_crypto=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_crypto-8893240ebb97195b.rlib --extern deno_doc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_doc-befd20d2a45638e6.rlib --extern deno_fetch=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_fetch-8c5082cd83625c5f.rlib --extern deno_lint=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_lint-85d01310a14b6714.rlib --extern deno_web=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_web-9f658289b1c80dd9.rlib --extern dissimilar=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdissimilar-d697b9c0bd9b4fe6.rlib --extern dlopen=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdlopen-aa0ac04e6c9e5fc0.rlib --extern dprint_plugin_typescript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdprint_plugin_typescript-57e2ae62bb59e569.rlib --extern encoding_rs=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libencoding_rs-7c26bc9b7cd278c1.rlib --extern env_logger=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libenv_logger-b23256893e067e90.rlib --extern filetime=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libfiletime-07d1cba529ccab3e.rlib --extern http=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libhttp-94b731f7df1fabd6.rlib --extern indexmap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libindexmap-c5dda75742f97961.rlib --extern jsonc_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libjsonc_parser-64f536e0111f9be7.rlib --extern lazy_static=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblazy_static-7d55e14227559b10.rlib --extern libc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblibc-3c8d6c61c371644a.rlib --extern log=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblog-d4d4834fe7f105a4.rlib --extern nix=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnix-d53870a050fb4514.rlib --extern notify=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnotify-7a23aa918afb3a6e.rlib --extern regex=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libregex-ca50c1844ad9f396.rlib --extern ring=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libring-f8ffb0801317b4b0.rlib --extern rustyline=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline-9b33c0e5f5bbe657.rlib --extern rustyline_derive=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline_derive-0776e1c7d36d685a.dylib --extern semver_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsemver_parser-a2420ecdcf5147a9.rlib --extern serde=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libserde-ffb52ad7e93267e2.rlib --extern shell_escape=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libshell_escape-93357b23638193a0.rlib --extern sourcemap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsourcemap-1ac99f1875db4fc2.rlib --extern swc_bundler=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_bundler-0230797263c39558.rlib --extern swc_common=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_common-069db6614df3ab7e.rlib --extern swc_ecmascript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_ecmascript-e99e2e396ede5280.rlib --extern sys_info=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsys_info-b031f4217ef84e8c.rlib --extern tempfile=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtempfile-cbb9f08abbd96265.rlib --extern termcolor=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtermcolor-e4c5c7ac99092628.rlib --extern tokio=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio-e9c54cd463732ba5.rlib --extern tokio_rustls=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_rustls-23d2e4f4dac8aeb6.rlib --extern tokio_tungstenite=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_tungstenite-494c43b10abe55b2.rlib --extern uuid=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libuuid-5897cbdfc25ef384.rlib --extern walkdir=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwalkdir-aeabd126e18d3657.rlib --extern warp=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwarp-c913e1c74cf69809.rlib --extern webpki=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki-81a4428069577e7c.rlib --extern webpki_roots=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki_roots-681040ca67c32fef.rlib -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/gn_out/obj/ -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/ring-2255df34cb1dfae4/out -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/sys-info-503200fc000ab196/out`
Finished release [optimized] target(s) in 70m 11s
Installing /usr/local/Cellar/deno/1.5.4/bin/deno
Installed package `deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)` (executable `deno`)
warning: be sure to add `/usr/local/Cellar/deno/1.5.4/bin` to your PATH to be able to run the installed binaries"><pre class="notranslate"><code class="notranslate">==> cargo install -vv --locked --root /usr/local/Cellar/deno/1.5.4 --path .
Installing deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)
Updating crates.io index
Downloading crates ...
Downloaded ansi_term v0.11.0
Downloaded alloc-stdlib v0.2.1
Downloaded anyhow v1.0.32
Downloaded anymap v0.12.1
Downloaded arrayvec v0.5.1
Downloaded build_const v0.2.1
Downloaded httparse v1.3.4
Downloaded ident_case v1.0.1
Downloaded jsonc-parser v0.14.0
Downloaded lazy_static v1.4.0
Downloaded radix_fmt v1.0.0
Downloaded quote v1.0.7
Downloaded rand_core v0.5.1
Downloaded proc-macro2 v0.4.30
Downloaded phf v0.8.0
Downloaded swc_atoms v0.2.5
Downloaded swc_ecma_ast v0.35.0
Downloaded swc_ecma_dep_graph v0.9.0
Downloaded swc_ecma_codegen_macros v0.5.0
Downloaded swc_ecma_parser_macros v0.4.1
Downloaded swc_ecma_parser v0.43.1
Downloaded thiserror v1.0.20
Downloaded tokio-tungstenite v0.11.0
Downloaded tungstenite v0.11.1
Downloaded tracing v0.1.19
Downloaded swc_ecma_codegen v0.41.1
Downloaded utf8parse v0.2.0
Downloaded twoway v0.1.8
Downloaded termcolor v1.1.0
Downloaded rand_xorshift v0.1.1
Downloaded remove_dir_all v0.5.3
Downloaded unicode-xid v0.1.0
Downloaded unicode-xid v0.2.1
Downloaded unicode-bidi v0.3.4
Downloaded walkdir v2.3.1
Downloaded rand_isaac v0.1.1
Downloaded version_check v0.9.2
Downloaded which v4.0.2
Downloaded futures v0.3.8
Downloaded tracing-core v0.1.16
Downloaded thiserror-impl v1.0.20
Downloaded sys-info v0.7.0
Downloaded semver v0.9.0
Downloaded serde_derive v1.0.117
Downloaded unicode-width v0.1.8
Downloaded want v0.3.0
Downloaded vec_map v0.8.2
Downloaded url v2.1.1
Downloaded ast_node v0.7.0
Downloaded strsim v0.9.3
Downloaded brotli-decompressor v2.3.1
Downloaded unicode-segmentation v1.6.0
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/40_write_file.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/41_prompt.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/90_deno_ns.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/rt/99_main.js
[deno 1.5.4] Snapshot size: 248015
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/CLI_SNAPSHOT.bin
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/00_typescript.js
[deno 1.5.4] cargo:rerun-if-changed=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli/tsc/99_main_compiler.js
[deno 1.5.4] Snapshot size: 3778336
[deno 1.5.4] Snapshot written to: /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out/COMPILER_SNAPSHOT.bin
Running `CARGO=/usr/local/Cellar/rust/1.47.0/bin/cargo CARGO_BIN_NAME=deno CARGO_CRATE_NAME=deno CARGO_MANIFEST_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli CARGO_PKG_AUTHORS='the Deno authors' CARGO_PKG_DESCRIPTION='Provides the deno executable' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=deno CARGO_PKG_REPOSITORY='https://github.com/denoland/deno' CARGO_PKG_VERSION=1.5.4 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' DENO_FETCH_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/fetch/lib.deno_fetch.d.ts DENO_WEB_LIB_PATH=/private/tmp/deno-20201123-87041-1pvuv3v/deno/op_crates/web/lib.deno_web.d.ts DYLD_FALLBACK_LIBRARY_PATH='/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps:/usr/local/Cellar/rust/1.47.0/lib:/private/tmp/deno-20201123-87041-1pvuv3v/deno/.brew_home/lib:/usr/local/lib:/usr/lib' GIT_COMMIT_HASH=UNKNOWN OUT_DIR=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/deno-af2aaf340dbef92c/out PROFILE=release TARGET=x86_64-apple-darwin TS_VERSION=4.0.5 rustc --crate-name deno --edition=2018 cli/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=z -C lto -C codegen-units=1 -C metadata=165ba8ab1ba1d38d --out-dir /private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps -L dependency=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps --extern atty=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libatty-20b66de07789d749.rlib --extern base64=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbase64-ae4a39f942b63d83.rlib --extern byteorder=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbyteorder-a02c326dacd510de.rlib --extern bytes=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libbytes-cdb77ed40c3f20da.rlib --extern clap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libclap-b68f524a56e40375.rlib --extern deno_core=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_core-c8ffd184beebca4e.rlib --extern deno_crypto=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_crypto-8893240ebb97195b.rlib --extern deno_doc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_doc-befd20d2a45638e6.rlib --extern deno_fetch=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_fetch-8c5082cd83625c5f.rlib --extern deno_lint=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_lint-85d01310a14b6714.rlib --extern deno_web=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdeno_web-9f658289b1c80dd9.rlib --extern dissimilar=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdissimilar-d697b9c0bd9b4fe6.rlib --extern dlopen=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdlopen-aa0ac04e6c9e5fc0.rlib --extern dprint_plugin_typescript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libdprint_plugin_typescript-57e2ae62bb59e569.rlib --extern encoding_rs=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libencoding_rs-7c26bc9b7cd278c1.rlib --extern env_logger=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libenv_logger-b23256893e067e90.rlib --extern filetime=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libfiletime-07d1cba529ccab3e.rlib --extern http=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libhttp-94b731f7df1fabd6.rlib --extern indexmap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libindexmap-c5dda75742f97961.rlib --extern jsonc_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libjsonc_parser-64f536e0111f9be7.rlib --extern lazy_static=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblazy_static-7d55e14227559b10.rlib --extern libc=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblibc-3c8d6c61c371644a.rlib --extern log=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/liblog-d4d4834fe7f105a4.rlib --extern nix=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnix-d53870a050fb4514.rlib --extern notify=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libnotify-7a23aa918afb3a6e.rlib --extern regex=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libregex-ca50c1844ad9f396.rlib --extern ring=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libring-f8ffb0801317b4b0.rlib --extern rustyline=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline-9b33c0e5f5bbe657.rlib --extern rustyline_derive=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/librustyline_derive-0776e1c7d36d685a.dylib --extern semver_parser=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsemver_parser-a2420ecdcf5147a9.rlib --extern serde=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libserde-ffb52ad7e93267e2.rlib --extern shell_escape=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libshell_escape-93357b23638193a0.rlib --extern sourcemap=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsourcemap-1ac99f1875db4fc2.rlib --extern swc_bundler=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_bundler-0230797263c39558.rlib --extern swc_common=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_common-069db6614df3ab7e.rlib --extern swc_ecmascript=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libswc_ecmascript-e99e2e396ede5280.rlib --extern sys_info=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libsys_info-b031f4217ef84e8c.rlib --extern tempfile=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtempfile-cbb9f08abbd96265.rlib --extern termcolor=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtermcolor-e4c5c7ac99092628.rlib --extern tokio=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio-e9c54cd463732ba5.rlib --extern tokio_rustls=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_rustls-23d2e4f4dac8aeb6.rlib --extern tokio_tungstenite=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libtokio_tungstenite-494c43b10abe55b2.rlib --extern uuid=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libuuid-5897cbdfc25ef384.rlib --extern walkdir=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwalkdir-aeabd126e18d3657.rlib --extern warp=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwarp-c913e1c74cf69809.rlib --extern webpki=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki-81a4428069577e7c.rlib --extern webpki_roots=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/deps/libwebpki_roots-681040ca67c32fef.rlib -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/gn_out/obj/ -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/ring-2255df34cb1dfae4/out -L native=/private/tmp/deno-20201123-87041-1pvuv3v/deno/target/release/build/sys-info-503200fc000ab196/out`
Finished release [optimized] target(s) in 70m 11s
Installing /usr/local/Cellar/deno/1.5.4/bin/deno
Installed package `deno v1.5.4 (/private/tmp/deno-20201123-87041-1pvuv3v/deno/cli)` (executable `deno`)
warning: be sure to add `/usr/local/Cellar/deno/1.5.4/bin` to your PATH to be able to run the installed binaries
</code></pre></div>
</details>
<p dir="auto">Full build log is here, <a href="https://github.com/Homebrew/homebrew-core/runs/1443285079">https://github.com/Homebrew/homebrew-core/runs/1443285079</a><br>
relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="748958648" data-permission-text="Title is private" data-url="https://github.com/Homebrew/homebrew-core/issues/65517" data-hovercard-type="pull_request" data-hovercard-url="/Homebrew/homebrew-core/pull/65517/hovercard" href="https://github.com/Homebrew/homebrew-core/pull/65517">Homebrew/homebrew-core#65517</a></p> | 0 |
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">When using webpack and babel in compiled code I see a lot of duplicated code mostly because of inconsistent import paths, so some modules are imported more than once.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20562545/83895807-7f6a0480-a753-11ea-986a-1427cbe278b5.png"><img src="https://user-images.githubusercontent.com/20562545/83895807-7f6a0480-a753-11ea-986a-1427cbe278b5.png" alt="obraz" style="max-width: 100%;"></a><br>
For eg. <code class="notranslate">Matrix4</code> is imported twice and it takes a lot of space. I'll investigate it further, it may be mainly problem with loaders I took from examples. Because some of them import directly modules (how it should be done to minify output bundle) and some import the modules from <code class="notranslate">src/three.js</code> what causes importing everything.<br>
These are all three imports in my project:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/20562545/83897427-e1c40480-a755-11ea-8c7e-63a7c34fb3e4.png"><img src="https://user-images.githubusercontent.com/20562545/83897427-e1c40480-a755-11ea-8c7e-63a7c34fb3e4.png" alt="obraz" style="max-width: 100%;"></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" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r117</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" 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> | <p dir="auto">This is an interest query for a PR.</p>
<p dir="auto">Basic idea: The program specifies the data of interest and the renderer feeds it - no exceptions.</p>
<p dir="auto">Consequences: -1000 LOC or more, easier to maintain/extend renderer, no more obscure updating bugs in the (then no longer) hard to trace interna, more good stuff (I leave it an exercise to the attentive reader).</p>
<p dir="auto">Program inputs would specify a data source and a property name.</p>
<p dir="auto">Examples for data sources are:</p>
<ul dir="auto">
<li><code class="notranslate">material</code></li>
<li><code class="notranslate">object</code></li>
<li><code class="notranslate">camera</code></li>
<li><code class="notranslate">renderState</code> (I invented this one for all the free-floating stuff currently in local variables)</li>
</ul>
<p dir="auto">Typical properties for each of them:</p>
<ul dir="auto">
<li><code class="notranslate">map</code></li>
<li><code class="notranslate">receiveShadow</code></li>
<li><code class="notranslate">projectionMatrix</code></li>
<li><code class="notranslate">fog</code></li>
</ul>
<p dir="auto">These bindings exist right now - they are hard-coded in the renderer.</p>
<p dir="auto">Moving them into the program description, the renderer can process these bindings in a loop. More importantly, the data dependencies can be resolved on a by-case basis (there are eight, as detailed below), instead by hard-coded binding (there are dozens, and piling up with every new feature that is being added).</p>
<p dir="auto">There exist two fundamental kinds of inputs: Compile time inputs, currently implemented via <code class="notranslate">#define</code>s emitted into the GLSL source, and run time inputs; <code class="notranslate">uniform</code>s in case of GLSL (note that a software renderer may very well create and parametrize JavaScript functions by the same mechanism).</p>
<p dir="auto">A distinct case exists for every input type per data source = 8 cases. Some of them are currently not handled correctly, but I'm confident that I can make it happen.</p>
<p dir="auto">There is currently a large amount of redundant code that just pumps data through the renderer. So how about teaching the renderer how to pump data (in general, once and for all) and have it scale?! Since built-in materials have a fixed program, which then knows exactly what it wants from the material (and the other data sources), all built-in stuff can also be removed - it would live on in very much condensed form in the descriptions of the built-in programs.</p>
<p dir="auto">I have an implementation sketched out, but I wouldn't want to waste my time coding it down without sufficient interest in merging it. Please let me know what you think!</p> | 0 |
<p dir="auto">Pulling bug from original location in the google issue tracker: <a href="https://issuetracker.google.com/issues/72938960" rel="nofollow">https://issuetracker.google.com/issues/72938960</a></p>
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">When creating a new Flutter project in the opening screen of Android Studio, for example <code class="notranslate">my_flutter_app</code>, the following identifiers are generated (see attached image <code class="notranslate">android_studio_flutter_project.jpg</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.my_flutter_app.myFlutterApp; (ios/Runner.xcodeproj/project.pbxproj)
package com.mycompany.myflutterapp.myflutterapp; (MainActivity.java)
applicationId "com.mycompany.myflutterapp.myflutterapp" (app/build.gradle)
package="com.mycompany.myflutterapp.myflutterapp"> (AndroidManifest.xml)"><pre class="notranslate"><code class="notranslate">PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.my_flutter_app.myFlutterApp; (ios/Runner.xcodeproj/project.pbxproj)
package com.mycompany.myflutterapp.myflutterapp; (MainActivity.java)
applicationId "com.mycompany.myflutterapp.myflutterapp" (app/build.gradle)
package="com.mycompany.myflutterapp.myflutterapp"> (AndroidManifest.xml)
</code></pre></div>
<p dir="auto">In IntelliJ IDEA CE, however (see attached image <code class="notranslate">intellij_idea_ce_flutter_project.jpg</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.myFlutterApp; (ios/Runner.xcodeproj/project.pbxproj)
package com.mycompany.myflutterapp; (MainActivity.java)
applicationId "com.mycompany.myflutterapp" (app/build.gradle)
package="com.mycompany.myflutterapp"> (AndroidManifest.xml)"><pre class="notranslate"><code class="notranslate">PRODUCT_BUNDLE_IDENTIFIER = com.mycompany.myFlutterApp; (ios/Runner.xcodeproj/project.pbxproj)
package com.mycompany.myflutterapp; (MainActivity.java)
applicationId "com.mycompany.myflutterapp" (app/build.gradle)
package="com.mycompany.myflutterapp"> (AndroidManifest.xml)
</code></pre></div>
<p dir="auto">Also, <code class="notranslate">flutter create --org com.mycompany</code> works correctly.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Build: 3.0.1, AI-171.4443003, 201711091821, "><pre class="notranslate"><code class="notranslate">Build: 3.0.1, AI-171.4443003, 201711091821,
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="AI-171.4443003, JRE 1.8.0_152-release-915-b08x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.3 unknown, screens 1920x1080, 1920x1080, 1440x900; Retina "><pre class="notranslate"><code class="notranslate">AI-171.4443003, JRE 1.8.0_152-release-915-b08x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.3 unknown, screens 1920x1080, 1920x1080, 1440x900; Retina
</code></pre></div> | <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dnfield/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dnfield">@dnfield</a>, am having another issue with building apk release, but this time coming from fluttertoast,<br>
this is the result..Execution failed for task ':app:lintVitalRelease'.</p>
<p dir="auto">Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'.<br>
Could not resolve project :fluttertoast.<br>
Required by:<br>
project :app</p>
<blockquote>
<p dir="auto">java.lang.NullPointerException (no error message),<br>
most interesting thing is the app does run fully in emulator</p>
</blockquote> | 0 |
<p dir="auto">I found browserWindow support progressBar but it is show on taskbar. Any chance that electron can be able to support native progress bar like this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/174891/11357143/8c6a4208-929f-11e5-9bec-205d1f6d120d.png"><img width="457" alt="screen shot 2015-11-24 at 11 35 37 am" src="https://cloud.githubusercontent.com/assets/174891/11357143/8c6a4208-929f-11e5-9bec-205d1f6d120d.png" style="max-width: 100%;"></a></p>
<p dir="auto">In my understanding, the difficult thing might be: How to update the progress when we call showProgressBar? because it might block the process in executing the next block of the code.</p> | <p dir="auto">It would be great to have native modal progress dialogs, for example, this small screenshot I found on Google:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/174864/9176745/2a40085c-3f5b-11e5-9190-aea67eb8306f.png"><img src="https://cloud.githubusercontent.com/assets/174864/9176745/2a40085c-3f5b-11e5-9190-aea67eb8306f.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">My use case would be for copying a file and showing progress while blocking the <del>application</del> UI.</p> | 1 |
<p dir="auto">Everything was working fine until I did npm update, I see this problem.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'toLowerCase' of undefined
at ReactDOMServerRenderer.renderDOM (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2776:27)
at ReactDOMServerRenderer.render (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2755:23)
at ReactDOMServerRenderer.read (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2722:19)
at renderToStaticMarkup (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2991:25)
at _callee3$ (/Users/****/Projects/****/node_modules/next/dist/server/render.js:224:100)
at tryCatch (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:299:22)
at Generator.prototype.(anonymous function) [as next] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'toLowerCase' of undefined
at ReactDOMServerRenderer.renderDOM (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2776:27)
at ReactDOMServerRenderer.render (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2755:23)
at ReactDOMServerRenderer.read (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2722:19)
at renderToStaticMarkup (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2991:25)
at _callee3$ (/Users/****/Projects/****/node_modules/next/dist/server/render.js:224:100)
at tryCatch (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:299:22)
at Generator.prototype.(anonymous function) [as next] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
</code></pre></div>
<p dir="auto">the only change I see that could break is <code class="notranslate">"next": "^4.0.0-beta.1",</code> changing to <code class="notranslate">"next": "^4.0.0-beta.2"</code>. I reverted next back to <code class="notranslate">"next": "^4.0.0-beta.1",</code> but the isssue persists.</p>
<p dir="auto">I run Next using <code class="notranslate">node server.js</code> using <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-routes">next-routes</a>.</p>
<p dir="auto">Server side code is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// server.js
const next = require('next');
const routes = require('./lib/routes');
const { createServer } = require('http');
const dev = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || 3000;
const app = next({ dev });
const handler = routes.getRequestHandler(app);
app.prepare().then(() => {
createServer(handler).listen(port);
});"><pre class="notranslate"><code class="notranslate">// server.js
const next = require('next');
const routes = require('./lib/routes');
const { createServer } = require('http');
const dev = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || 3000;
const app = next({ dev });
const handler = routes.getRequestHandler(app);
app.prepare().then(() => {
createServer(handler).listen(port);
});
</code></pre></div>
<p dir="auto">The issue is referenced here as well. Not sure whether it is React 16 or NEXT.js<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="247994505" data-permission-text="Title is private" data-url="https://github.com/amcharts/amcharts3-react/issues/53" data-hovercard-type="issue" data-hovercard-url="/amcharts/amcharts3-react/issues/53/hovercard" href="https://github.com/amcharts/amcharts3-react/issues/53">amcharts/amcharts3-react#53</a></p>
<p dir="auto">Any idea what could be the issue?</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">Your Environment</h2>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.0.0.beta.2</td>
</tr>
<tr>
<td>node</td>
<td>v8.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 61.0.3163.100</td>
</tr>
<tr>
<td><a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-routes">next-routes</a></td>
<td>^1.0.40"</td>
</tr>
<tr>
<td>react</td>
<td>16</td>
</tr>
</tbody>
</table> | <p dir="auto">Looking at many SSG specific features being built into Nextjs (especially <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528348833" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/9524" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/9524/hovercard" href="https://github.com/vercel/next.js/issues/9524">#9524</a>) , here's what I think is the biggest issue in using Nextjs for SSG.</p>
<p dir="auto">The problem is that Nextjs entire documentation and manuals are written from the perspective of a server-side rendering framework. They are not geared around the usecase of someone wanting to either quickly get started..or someone who is working with a Nextjs SSG and wanted help on some SSG contextual aspect.</p>
<p dir="auto">For example, the entire section of "Prefetching Pages", "Custom server and routing", and many more is not relevant for a SSG usecase. In fact on the left side - there is no section for "static site generation". The documentation page of Nextjs lets people think that this is not a usecase that Nextjs supports.</p>
<p dir="auto">I dont believe there is any real way the two usecases can be merged in docs without massive cognitive overload for the user.</p>
<p dir="auto">The documentation subsites should be entirely different for SSG and SSR usecases. Its ok if section are duplicated (which can be included in both sites from "common docs").</p> | 0 |
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): kubeadm init hang</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>
<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>): 1.4.4</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: x86_64</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 16.04.1 LTS</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 4.4.0-21-generic</li>
<li><strong>Install tools</strong>: Installing Kubernetes on Linux with kubeadm</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
We installed k8s by using kubeadm a week ago without problem.<br>
Here is output form kubectl version:<br>
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.3", GitCommit:"4957b090e9a4f6a68b4a40375408fdc74a212260", GitTreeState:"clean", BuildDate:"2016-10-16T06:36:33Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}<br>
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:10:32Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}</p>
<p dir="auto">Yesterday kicked off another installation and "kubeadm init" hang when"waiting for the control plane to become ready".<br>
Here is the output from kubectl version:<br>
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}<br>
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">It seemed only difference is to have a higher version 1.4.4 now.</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
kubeadm init waiting less than 1 minute to resume the setup.</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
following the step described on "Installing Kubernetes on Linux with kubeadm"<br>
<a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/kubeadm/</a></p>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
Do you have another way to describe how to install/setup kubenetes other than kubeadm?</p>
<p dir="auto">Thanks</p>
<p dir="auto">WY</p> | <p dir="auto">In <code class="notranslate">pkg/kubelet/kubelet,go</code> in <code class="notranslate">getClusterDNS(...)</code>, it appends cluster DNS nameserver and search paths to the ones in the host resolv.conf.</p>
<p dir="auto">A user reported trying to add skydns nameserver address and kubernetes search paths to the host resolv.conf. Not what the instructions say to do, but a reasonable thing to do. Very reasonable if you want to be able to resolve service names while debugging from the root UTS namespace.</p>
<p dir="auto">This wasn't working for the user. One thing I think would go wrong here is that if the node has 1 or 2 search paths, and then the user added the 3 for kubernetes, that is 5. Then when kubelet adds 3 more (duplicate) entries, you get 8, which exceeds the limit of 6.</p>
<p dir="auto">Would it be better if the code filtered duplicate search entries?</p> | 0 |
<p dir="auto">In the docs example, click the button twice, click outside the popover, it doesn't close.</p>
<p dir="auto">Also doesn't close after the position is adjusted.</p> | <p dir="auto"><a href="http://www.material-ui.com/#/components/popover" rel="nofollow">http://www.material-ui.com/#/components/popover</a><br>
Click on button in the demo, and when popover animation is not complete click again.<br>
Now clicking out of popover has no effect</p> | 1 |
<h2 dir="auto">📝 Provide a description of the new feature</h2>
<p dir="auto">Perhaps this is already available, but I've not been able to find it.</p>
<p dir="auto">I love the new feature that allows me to hold <code class="notranslate">Shift</code> + <code class="notranslate">Ctrl</code> to snap a window to multiple zones, but what would make it perfect is if we didn't have to use the mouse. Is there a modifier key we can use while snapping windows with <code class="notranslate">Win</code> + <code class="notranslate">Arrow</code> that will allow us to expand the window to cover the next zone? Something like <code class="notranslate">Win</code> + <code class="notranslate">Shift</code> + <code class="notranslate">Arrow</code> would be fairly intuitive.</p>
<p dir="auto">A simple example:<br>
[A][B][ ]</p>
<p dir="auto">If I have a window <code class="notranslate">B</code> in the middle zone selected, and I press <code class="notranslate">Win</code> + <code class="notranslate">Shift</code> + <code class="notranslate">Right</code>, I would end up with this:<br>
[A][B][B]<br>
Where window <code class="notranslate">B</code> expands to fill the next zone.</p>
<hr>
<p dir="auto">If you'd like to see this feature implemented, add a <g-emoji class="g-emoji" alias="+1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png">👍</g-emoji> reaction to this post.</p> | <h1 dir="auto">Summary of the new feature/enhancement</h1>
<p dir="auto">using a hotkey + arrow combination for the direction, it should be possible to make a window grow or shrink</p>
<p dir="auto">When you want to grow a window that you have snapped to a smaller zone, and you want to make it temporarily larger, you have to manually make it longer or wider. It would be easier if you could use a key+arrow combo to grow the window with the zone the arrow points to.</p>
<p dir="auto">Of course, this should be restricted to zones that combine to rectangles.</p>
<p dir="auto">I don't know if this matches your vision of the product, but this is what I miss in the current version. Or maybe this functionality already exists and I have missed it.</p> | 1 |
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/react</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johnnyreilly/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johnnyreilly">@johnnyreilly</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bbenezech/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bbenezech">@bbenezech</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pzavolinsky/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pzavolinsky">@pzavolinsky</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/digiguru/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/digiguru">@digiguru</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ericanderson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ericanderson">@ericanderson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/morcerf/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/morcerf">@morcerf</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tkrotoff/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tkrotoff">@tkrotoff</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DovydasNavickas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DovydasNavickas">@DovydasNavickas</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/onigoetz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/onigoetz">@onigoetz</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/richseviora/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/richseviora">@richseviora</a></li>
</ul>
</li>
</ul>
<p dir="auto">React 16 components can have multiple root elements.</p>
<p dir="auto"><code class="notranslate">const Items = ({ items }: MyProps) => items.map(item => <div key={item.id}>{item.name}</div>)</code></p>
<p dir="auto">However, TypeScript will break with:<br>
<code class="notranslate">error TS2605: JSX element type 'Element[]' is not a constructor function for JSX elements. Property 'render' is missing in type 'Element[]'.</code></p> | <ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the <code class="notranslate">@types/xxxx</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have a question that is inappropriate for <a href="https://stackoverflow.com/" rel="nofollow">StackOverflow</a>. (Please ask any appropriate questions there).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gaspard/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gaspard">@gaspard</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vbfox/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vbfox">@vbfox</a></li>
</ul>
</li>
</ul>
<p dir="auto">As mentioned in <a href="https://facebook.github.io/react/docs/conditional-rendering.html#inline-if-with-logical--operator" rel="nofollow">React documentation</a>, a stateless component can return <code class="notranslate">false</code> for empty content. Currently <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L312-L313">StatelessComponent</a> is defined as:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface StatelessComponent<P = {}> {
(props: P & { children?: ReactNode }, context?: any): ReactElement<any> | null;"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">StatelessComponent</span><span class="pl-c1"><</span><span class="pl-smi">P</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-kos">(</span><span class="pl-s1">props</span>: <span class="pl-smi">P</span> <span class="pl-c1">&</span> <span class="pl-kos">{</span> <span class="pl-c1">children</span>?: <span class="pl-smi">ReactNode</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">context</span>?: <span class="pl-smi">any</span><span class="pl-kos">)</span>: <span class="pl-smi">ReactElement</span><span class="pl-kos"><</span><span class="pl-smi">any</span><span class="pl-kos">></span> <span class="pl-c1">|</span> <span class="pl-c1">null</span><span class="pl-kos">;</span><span class="pl-kos"></span></pre></div>
<p dir="auto">whereas <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L270-L280">Component</a> has</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Component<P, S> {
constructor(props?: P, context?: any);
// ...snip...
render(): JSX.Element | null | false;"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Component</span><span class="pl-c1"><</span><span class="pl-smi">P</span><span class="pl-kos">,</span> <span class="pl-smi">S</span><span class="pl-c1">></span> <span class="pl-kos">{</span>
<span class="pl-c1">constructor</span><span class="pl-kos">(</span><span class="pl-s1">props</span>?: <span class="pl-smi">P</span><span class="pl-kos">,</span> <span class="pl-s1">context</span>?: <span class="pl-smi">any</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// ...snip...</span>
<span class="pl-c1">render</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">JSX</span><span class="pl-kos">.</span><span class="pl-smi">Element</span> <span class="pl-c1">|</span> <span class="pl-c1">null</span> <span class="pl-c1">|</span> <span class="pl-c1">false</span><span class="pl-kos">;</span><span class="pl-kos"></span></pre></div>
<p dir="auto">Shouldn't these types be the same (including eliminating the ReactElement vs JSX.Element difference)? And to avoid future such issues (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="201343233" data-permission-text="Title is private" data-url="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14064" data-hovercard-type="issue" data-hovercard-url="/DefinitelyTyped/DefinitelyTyped/issues/14064/hovercard" href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14064">#14064</a>, this one) it should probably be a named type, e.g. RenderResult.</p>
<p dir="auto">A search for <code class="notranslate">| null</code> also comes up with <code class="notranslate">ComponentSpec.render</code> which probably should also have the same result type.</p> | 1 |
<p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/28599/kubernetes-pull-build-test-e2e-gce/58426/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/28599/kubernetes-pull-build-test-e2e-gce/58426/</a></p>
<p dir="auto">Failed: [k8s.io] [HPA] Horizontal pod autoscaling (scale resource: CPU) [k8s.io] ReplicationController light Should scale from 1 pod to 2 pods {Kubernetes e2e suite}</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:88
Expected error:
<*errors.errorString | 0xc820c80740>: {
s: "error while stopping RC: rc-light-ctrl: timed out waiting for \"rc-light-ctrl\" to be synced",
}
error while stopping RC: rc-light-ctrl: timed out waiting for "rc-light-ctrl" to be synced
not to have occurred
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/autoscaling_utils.go:307"><pre class="notranslate"><code class="notranslate">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:88
Expected error:
<*errors.errorString | 0xc820c80740>: {
s: "error while stopping RC: rc-light-ctrl: timed out waiting for \"rc-light-ctrl\" to be synced",
}
error while stopping RC: rc-light-ctrl: timed out waiting for "rc-light-ctrl" to be synced
not to have occurred
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/autoscaling_utils.go:307
</code></pre></div>
<p dir="auto">Happened on a presubmit run in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164315792" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28599" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/28599/hovercard" href="https://github.com/kubernetes/kubernetes/pull/28599">#28599</a>.</p>
<p dir="auto">Previous issues for this test: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="160462664" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27443" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27443/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27443">#27443</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161592369" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27835" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27835/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27835">#27835</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="165361685" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28900" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28900/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28900">#28900</a></p> | <p dir="auto">Actually there are 2 results in density test that seems conflict but NOT.</p>
<h3 dir="auto">1.throughput case</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1173940/11833686/36daafea-a400-11e5-8a5e-0b854e78c013.png"><img src="https://cloud.githubusercontent.com/assets/1173940/11833686/36daafea-a400-11e5-8a5e-0b854e78c013.png" alt="12_11_30" style="max-width: 100%;"></a></p>
<p dir="auto">when run the density test, this is the 1st test that shows count of different pod status. This pic indicate the throughput of apiserver+controller/schduler/kubelet. As the waiting curve drop down slowly and the pending curve is always 0. So that scheduler is the main bottleneck in the system when create a lot of pod at one time.</p>
<h3 dir="auto">2. one pod latency case</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Nov 27 19:10:28.552: INFO: 10% worst schedule latencies: [{density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-13 33.1.1.212 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-66 33.1.1.232 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-214 33.1.1.228 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-251 33.1.2.26 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-276 33.1.1.193 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-174 33.1.1.89 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-134 33.1.1.214 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-90 33.1.2.20 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-105 33.1.1.159 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-140 33.1.2.71 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-63 33.1.1.192 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-125 33.1.1.96 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-144 33.1.1.104 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-54 33.1.1.172 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-118 33.1.2.37 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-131 33.1.1.169 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-23 33.1.1.201 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-75 33.1.2.78 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-99 33.1.1.98 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-253 33.1.1.244 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-137 33.1.2.56 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-18 33.1.2.26 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-254 33.1.2.32 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-168 33.1.2.29 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-146 33.1.2.51 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-142 33.1.2.40 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-143 33.1.1.179 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-145 33.1.2.37 2s}]
Nov 27 19:10:28.553: INFO: perc50: 0, perc90: 1s, perc99: 2s
Nov 27 19:10:28.553: INFO: 10% worst run-after-schedule latencies: [{density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-20 33.1.2.65 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-269 33.1.2.39 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-250 33.1.1.126 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-206 33.1.1.85 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-66 33.1.1.232 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-151 33.1.1.120 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-217 33.1.1.187 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-46 33.1.1.227 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-143 33.1.1.179 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-11 33.1.1.165 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-182 33.1.1.120 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-157 33.1.1.133 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-5 33.1.1.177 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-3 33.1.1.143 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-31 33.1.1.149 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-95 33.1.1.124 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-69 33.1.1.189 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-131 33.1.1.169 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-220 33.1.1.142 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-184 33.1.1.168 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-74 33.1.1.112 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-1 33.1.1.154 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-247 33.1.1.165 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-178 33.1.1.139 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-93 33.1.1.159 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-127 33.1.1.160 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-164 33.1.1.182 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-2 33.1.1.196 5s}]
Nov 27 19:10:28.553: INFO: perc50: 2s, perc90: 3s, perc99: 5s"><pre class="notranslate"><code class="notranslate">Nov 27 19:10:28.552: INFO: 10% worst schedule latencies: [{density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-13 33.1.1.212 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-66 33.1.1.232 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-214 33.1.1.228 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-251 33.1.2.26 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-276 33.1.1.193 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-174 33.1.1.89 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-134 33.1.1.214 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-90 33.1.2.20 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-105 33.1.1.159 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-140 33.1.2.71 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-63 33.1.1.192 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-125 33.1.1.96 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-144 33.1.1.104 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-54 33.1.1.172 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-118 33.1.2.37 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-131 33.1.1.169 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-23 33.1.1.201 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-75 33.1.2.78 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-99 33.1.1.98 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-253 33.1.1.244 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-137 33.1.2.56 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-18 33.1.2.26 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-254 33.1.2.32 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-168 33.1.2.29 1s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-146 33.1.2.51 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-142 33.1.2.40 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-143 33.1.1.179 2s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-145 33.1.2.37 2s}]
Nov 27 19:10:28.553: INFO: perc50: 0, perc90: 1s, perc99: 2s
Nov 27 19:10:28.553: INFO: 10% worst run-after-schedule latencies: [{density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-20 33.1.2.65 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-269 33.1.2.39 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-250 33.1.1.126 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-206 33.1.1.85 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-66 33.1.1.232 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-151 33.1.1.120 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-217 33.1.1.187 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-46 33.1.1.227 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-143 33.1.1.179 3s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-11 33.1.1.165 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-182 33.1.1.120 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-157 33.1.1.133 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-5 33.1.1.177 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-3 33.1.1.143 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-31 33.1.1.149 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-95 33.1.1.124 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-69 33.1.1.189 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-131 33.1.1.169 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-220 33.1.1.142 4s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-184 33.1.1.168 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-74 33.1.1.112 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-1 33.1.1.154 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-247 33.1.1.165 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-178 33.1.1.139 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-93 33.1.1.159 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-127 33.1.1.160 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-164 33.1.1.182 5s} {density-latency-pod-3d494294-953a-11e5-a6ec-fa163e92f3f5-2 33.1.1.196 5s}]
Nov 27 19:10:28.553: INFO: perc50: 2s, perc90: 3s, perc99: 5s
</code></pre></div>
<p dir="auto">Again in the density test. this case create one pod a time and observe its latency, which shows that scheduler latency is 2s and run-after-scheduler is 5s. Is that means scheduler is faster than other component is the system?</p>
<h3 dir="auto">3. explanation</h3>
<p dir="auto">the conflict between two case is not a real conflict. scheduler is sequential across pod, but kubelet is naturally parallel.</p>
<p dir="auto">for scheduler,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="latency * throughput = 1"><pre class="notranslate"><code class="notranslate">latency * throughput = 1
</code></pre></div>
<p dir="auto">as scheduler has just one loop to process all pods</p>
<p dir="auto">but for kubelet</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="latency * throughput = n(count of nodes)"><pre class="notranslate"><code class="notranslate">latency * throughput = n(count of nodes)
</code></pre></div>
<p dir="auto">maybe the latency of kubelet is near or slow than scheduler, but there are many kubelets run in system. If <code class="notranslate">latency(scheduler) == latency(kubelet)</code>, and there are 500 nodes, the <code class="notranslate">throughput(kubelet) == 500 times of throughput(scheduler)</code>. this explains the different result of these 2 tests.</p>
<p dir="auto"><strong>When cluster scale, the throughput gap between scheduler and kubelet/apiserver will be bigger.</strong><br>
<strong>So it is necessary to make scheduler parallel across pod.</strong></p>
<h3 dir="auto">environment</h3>
<ul dir="auto">
<li>20 phycial machine 40 core, 380G, with openstack</li>
<li>k8s-master(1VM) 8 core, 16 G</li>
<li>k8s-node(500VM) 2 core, 4G</li>
<li>etcd(5VM) 4 core, 8G</li>
<li>ubuntu 14.04</li>
<li>Go 1.4.3</li>
<li>Etcd 2.2.2</li>
<li>K8s master head of 12.7</li>
</ul> | 0 |
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nathansobo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nathansobo">@nathansobo</a> the Markdown Preview Buffer is awesome...now that I know I can use it. However, it would be the most awesomest if I could resize it. By that I mean make the line between the two adjustable, so I could reduce the percentage of the screen it takes up. Even better would be to have the option to hide it behind my working tab, so I can just flip back and forth between the two. One "easy" change would be to make the background of the preview tab more yellow. The black/white contrast is pretty hard on the old peepers. ❤️</p>
<p dir="auto">Atom Version: 0.50.0<br>
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.50.0 Atom-Shell/0.9.1 Safari/537.36<br>
User: @foggybtmgirl<br>
Screenshot:<br>
<a target="_blank" rel="noopener noreferrer" href="https://github.com/atom/feedback-storage/raw/master/image-732b7f55-b881-6b68-a7b7-803a72c5f7b9.png"><img src="https://github.com/atom/feedback-storage/raw/master/image-732b7f55-b881-6b68-a7b7-803a72c5f7b9.png" alt="screenshot" style="max-width: 100%;"></a></p> | <p dir="auto">launchpad.net<br>
would you please release atom for ubuntu , as a launchpad ppa repository?</p> | 0 |
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">Write a <code class="notranslate">demo.py</code>:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from __future__ import print_function
import time
import numpy as np
import six
if six.PY3:
timer_func = time.process_time
else:
timer_func = time.clock
n = 1000
start = timer_func()
precise = 2
for i in range(n):
np.round(np.array(range(i)), precise)
end = timer_func()
print(end-start)
"><pre class="notranslate"><span class="pl-k">from</span> __future__ <span class="pl-k">import</span> <span class="pl-s1">print_function</span>
<span class="pl-k">import</span> <span class="pl-s1">time</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-k">import</span> <span class="pl-s1">six</span>
<span class="pl-k">if</span> <span class="pl-s1">six</span>.<span class="pl-v">PY3</span>:
<span class="pl-s1">timer_func</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-s1">process_time</span>
<span class="pl-k">else</span>:
<span class="pl-s1">timer_func</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-s1">clock</span>
<span class="pl-s1">n</span> <span class="pl-c1">=</span> <span class="pl-c1">1000</span>
<span class="pl-s1">start</span> <span class="pl-c1">=</span> <span class="pl-en">timer_func</span>()
<span class="pl-s1">precise</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span>
<span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-s1">n</span>):
<span class="pl-s1">np</span>.<span class="pl-en">round</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-en">range</span>(<span class="pl-s1">i</span>)), <span class="pl-s1">precise</span>)
<span class="pl-s1">end</span> <span class="pl-c1">=</span> <span class="pl-en">timer_func</span>()
<span class="pl-en">print</span>(<span class="pl-s1">end</span><span class="pl-c1">-</span><span class="pl-s1">start</span>)</pre></div>
<p dir="auto">Then run it like this:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Py2
python -m cProfile -o demo-py2.prof demo.py
# Py3
python -m cProfile -o demo-py3.prof demo.py"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Py2</span>
python -m cProfile -o demo-py2.prof demo.py
<span class="pl-c"><span class="pl-c">#</span> Py3</span>
python -m cProfile -o demo-py3.prof demo.py</pre></div>
<p dir="auto">And view the profiles with snakeviz <code class="notranslate">pip install snakeviz</code>:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Under Python2's virtual env:
snakeviz demo-py2.prof
# Under Python3's virtual env:
snakeviz demo-py2.prof"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Under Python2's virtual env:</span>
snakeviz demo-py2.prof
<span class="pl-c"><span class="pl-c">#</span> Under Python3's virtual env:</span>
snakeviz demo-py2.prof</pre></div>
<p dir="auto">Get web page:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13536789/63755276-e7e4a500-c8e8-11e9-9ca0-0411d3e986d1.png"><img src="https://user-images.githubusercontent.com/13536789/63755276-e7e4a500-c8e8-11e9-9ca0-0411d3e986d1.png" alt="NumPy-Python2" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13536789/63755281-ea46ff00-c8e8-11e9-9481-5a3575e39be7.png"><img src="https://user-images.githubusercontent.com/13536789/63755281-ea46ff00-c8e8-11e9-9481-5a3575e39be7.png" alt="NumPy-Python3" style="max-width: 100%;"></a></p>
<p dir="auto">And the purple part it time cost on loading packages.</p>
<h3 dir="auto">Error message:</h3>
<h3 dir="auto">Numpy/Python version information:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> import sys, numpy; print(numpy.__version__, sys.version)
1.16.4 2.7.16 (default, Apr 12 2019, 15:32:40)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.3)]"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-c1">1.16</span>.<span class="pl-c1">4</span> <span class="pl-c1">2.7</span>.<span class="pl-c1">16</span> (<span class="pl-s1">default</span>, <span class="pl-v">Apr</span> <span class="pl-c1">12</span> <span class="pl-c1">2019</span>, <span class="pl-c1">15</span>:<span class="pl-c1">32</span>:<span class="pl-c1">40</span>)
[<span class="pl-v">GCC</span> <span class="pl-c1">4.2</span><span class="pl-c1">.1</span> <span class="pl-v">Compatible</span> <span class="pl-v">Apple</span> <span class="pl-v">LLVM</span> <span class="pl-c1">10.0</span><span class="pl-c1">.1</span> (<span class="pl-s1">clang</span><span class="pl-c1">-</span><span class="pl-c1">1001.0</span>.<span class="pl-c1">46.3</span>)]</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=">>> import sys, numpy; print(numpy.__version__, sys.version)
1.16.4 3.7.4 (default, Jul 9 2019, 18:13:23)
[Clang 10.0.1 (clang-1001.0.46.4)]"><pre class="notranslate"><span class="pl-c1">>></span><span class="pl-c1">></span> <span class="pl-k">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version</span>)
<span class="pl-c1">1.16</span>.<span class="pl-c1">4</span> <span class="pl-c1">3.7</span>.<span class="pl-c1">4</span> (<span class="pl-s1">default</span>, <span class="pl-v">Jul</span> <span class="pl-c1">9</span> <span class="pl-c1">2019</span>, <span class="pl-c1">18</span>:<span class="pl-c1">13</span>:<span class="pl-c1">23</span>)
[<span class="pl-v">Clang</span> <span class="pl-c1">10.0</span><span class="pl-c1">.1</span> (<span class="pl-s1">clang</span><span class="pl-c1">-</span><span class="pl-c1">1001.0</span>.<span class="pl-c1">46.4</span>)]</pre></div> | <p dir="auto">I just ran the brand new <code class="notranslate">python -X importtime -c "import numpy"</code>. Turns out that <code class="notranslate">numpy.testing</code> takes rougly 29 % (23 ms) of the total import time (80 ms), most of which (62 %, 14 ms) is the <code class="notranslate">unittest</code> module (no <code class="notranslate">nose</code> in my environment). In view of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="312143807" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/10856" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/10856/hovercard" href="https://github.com/numpy/numpy/issues/10856">#10856</a>, this is only going to get worse -- <code class="notranslate">pytest</code> weighs in with about 35 ms on my machine.</p>
<p dir="auto">So there's an opportunity for an easy win in import time by making the import of <code class="notranslate">numpy.testing</code> lazy. That is, <em>if</em> such a change doesn't cause huge amounts of downstream breakage.<br>
Alternatively, the main culprits could be imported lazily, with a much smaller downstream impact (likely none).</p> | 1 |
<p dir="auto">Sometimes Atom is crashing at the startup.</p>
<h1 dir="auto">Basic information:</h1>
<ul dir="auto">
<li>Atom version: 0.194.0</li>
<li>OS: Ubuntu 15.04 x64</li>
<li>Desktop environment: Unity</li>
</ul>
<h1 dir="auto">Apport info:</h1>
<ul dir="auto">
<li>Title: Atom crashed with SIGSEGV in Hunspell::spell()</li>
<li>SegvAnalysis:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Segfault happened at: 0x7fb4e3da82de <_ZN8Hunspell5spellEPKcPiPPc.part.5+62>: mov 0xd4(%r12),%r8d
PC (0x7fb4e3da82de) ok
source "0xd4(%r12)" (0x000000d4) not located in a known VMA region (needed readable region)!
destination "%r8d" ok"><pre class="notranslate"><code class="notranslate"> Segfault happened at: 0x7fb4e3da82de <_ZN8Hunspell5spellEPKcPiPPc.part.5+62>: mov 0xd4(%r12),%r8d
PC (0x7fb4e3da82de) ok
source "0xd4(%r12)" (0x000000d4) not located in a known VMA region (needed readable region)!
destination "%r8d" ok
</code></pre></div>
<ul dir="auto">
<li>SegvReason: reading NULL VMA</li>
<li>Stacktrace:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" #0 0x00007fb4e3da82de in Hunspell::spell(char const*, int*, char**) [clone .part.5] () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#1 0x00007fb4e3da5f34 in spellchecker::HunspellSpellchecker::IsMisspelled(std::string const&) () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#2 0x00007fb4e3da5721 in (anonymous namespace)::Spellchecker::IsMisspelled(v8::FunctionCallbackInfo<v8::Value> const&) () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#3 0x00007fb4f28557e1 in ?? () from /usr/share/atom/libchromiumcontent.so
No symbol table info available.
#4 0x00007fb4f287ad4b in ?? () from /usr/share/atom/libchromiumcontent.so
No symbol table info available.
#5 0x00003b7478b071bb in ?? ()
[......]"><pre class="notranslate"><code class="notranslate"> #0 0x00007fb4e3da82de in Hunspell::spell(char const*, int*, char**) [clone .part.5] () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#1 0x00007fb4e3da5f34 in spellchecker::HunspellSpellchecker::IsMisspelled(std::string const&) () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#2 0x00007fb4e3da5721 in (anonymous namespace)::Spellchecker::IsMisspelled(v8::FunctionCallbackInfo<v8::Value> const&) () from /usr/share/atom/resources/app.asar.unpacked/node_modules/spell-check/node_modules/spellchecker/build/Release/spellchecker.node
No symbol table info available.
#3 0x00007fb4f28557e1 in ?? () from /usr/share/atom/libchromiumcontent.so
No symbol table info available.
#4 0x00007fb4f287ad4b in ?? () from /usr/share/atom/libchromiumcontent.so
No symbol table info available.
#5 0x00003b7478b071bb in ?? ()
[......]
</code></pre></div> | <p dir="auto">The biggest ones are selection and textmate snippets completing correctly (mentioned in bugs).</p>
<h3 dir="auto">selection</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> cmd + ctl + up/down moves line or selected lines up/down</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> how to map multiple selection like ctl + shft + up/down in sublime</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> how to select same word that is found over and over, cmd + d in sublime</li>
</ul>
<h3 dir="auto">bugs or expectations different</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <strong>critical</strong> "mod" completed to this <a href="http://cl.ly/MD2A" rel="nofollow">http://cl.ly/MD2A</a>, expected module … end, same thing with all the textmate snippets like "cla" for class ... end, and "do" for blocks</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> escape does not close the search area, you have to focus input and hit escape</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> cmd + w only works if focused in editor, expected active tab to close</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> cmd + ctl + f to move into and out of full screen support</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> tree view active, cmd + p, search "file", nothing shows for new file, creating file, add file, same with directory and move file/directory, have to type "add" which wasn't my first thought</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> type {}, then backspace open brace, closing brace hangs around, i would expect it to go away</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> some kind of more sane default window size, right now it is taller than wide, seems better to do wider than tall</li>
</ul>
<h3 dir="auto">getting things done</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> right click in tree view to create new file/dir, rename file/dir, move file/dir, etc. right click on dir creates file in dir</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> go to symbol (ctags) doesn't have space between method name and class name</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> select a file in tree view without mouse/arrowing, maybe fuzzy find? you can do a lot once file selected, would be nice to select without using mouse</li>
</ul>
<h3 dir="auto">moving around</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> cmd + left goes to beginning of line, skipping whitespace, would love if it went to start of actual code and then as you kept hitting it toggled between beginning of line and beginning of code in line</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> option + left/right in sublime hops past spaces and to beginning/end of next word, atom hops to word, then space, then word, which forces 2x as many actions to move by "word"</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> join next line with the current line (cmd + j in sublime)</li>
</ul>
<h3 dir="auto">editing</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> autocomplete with ctl + spacebar is slow, sublime autocompletes all the time automatically, at first it was annoying but now I find it hard to maneuver without it, at a minimum tab auto-completing would be fantastic</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> hold command and hit backspace continues to backspace, stops in atom</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> auto add a new line to end of file on save if not already there (add <code class="notranslate">"stripTrailingWhitespace":{"singleTrailingNewline": true}</code> to your config)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> column_family({}) never gets indention correct for the })</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> duplicate current line with single key combo and set cursor at same point in new line as it was in original line (cmd + shift + d in sublime)</li>
</ul>
<h3 dir="auto">projects</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> all state is saved, including dirtiness, but not to actual file, rather to some other place, even unsaved files are restored across restarts and project switches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> projects, switch projects (cmd + ctl + p in sublime), remembers tabs across project switches, restore window size per project</li>
</ul>
<h3 dir="auto">dreams</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> terminal up this dude SO BAD PLZ</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> hella fast start up, for things like using it as git commit editor</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> realtime pairing like screen + ssh, but with atom...</li>
</ul> | 0 |
<p dir="auto">I'm on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/9f6d389b90bfe01dc0b74d6795dcb9d3c43d98ae/hovercard" href="https://github.com/microsoft/vscode/commit/9f6d389b90bfe01dc0b74d6795dcb9d3c43d98ae"><tt>9f6d389</tt></a> (master) to check out the folding stuff and I really like it! :)</p>
<p dir="auto">I noticed it isn't possible to fold empty regions like the interface below and the empty function. The fold arrow doesn't appear. Is this by design? There isn't that much to fold, only some newlines so it isn't a big issue though.</p>
<p dir="auto">ps. I'm using TypeScript</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface test {
}
function name(params:type) {
}"><pre class="notranslate"><code class="notranslate">interface test {
}
function name(params:type) {
}
</code></pre></div>
<p dir="auto"><strong>edit</strong> If it is by design, feel free to close</p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2193314/13258746/4bf18806-da09-11e5-9882-18b4dea62383.png"><img src="https://cloud.githubusercontent.com/assets/2193314/13258746/4bf18806-da09-11e5-9882-18b4dea62383.png" alt="image" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">I am utilizing select fields and auto complete a lot in my app and I'd like to know if there are plans for adding multi-select for these fields. I think multi-select is widely required feature that a lot of developers can benefit from.</p>
<p dir="auto">Thanks!</p> | <p dir="auto">What do you think about multiple select?</p> | 1 |
<ul dir="auto">
<li>user settings</li>
<li>type 'editor.' -> invoke intelli-sense and choose 'editor.lineNumber'</li>
<li>notice the result, I would expect that the 'editor.' I typed gets overwritten</li>
</ul>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1926584/12649603/97e71444-c5df-11e5-965c-2e6061ac40e9.png"><img src="https://cloud.githubusercontent.com/assets/1926584/12649603/97e71444-c5df-11e5-965c-2e6061ac40e9.png" alt="screen shot 2016-01-28 at 16 52 46" style="max-width: 100%;"></a></p> | <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/12582268/5ab7dc7e-c43c-11e5-916c-daf6d600c8bf.gif"><img src="https://cloud.githubusercontent.com/assets/22350/12582268/5ab7dc7e-c43c-11e5-916c-daf6d600c8bf.gif" alt="bug" data-animated-image="" style="max-width: 100%;"></a></p>
<p dir="auto">From testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128647552" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2257" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2257/hovercard" href="https://github.com/microsoft/vscode/issues/2257">#2257</a></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 checked the <a href="https://github.com/celery/celery/issues?utf8=%E2%9C%93&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 celery.Celery.worker_main function is not documented (see <a href="https://docs.celeryproject.org/en/stable/reference/celery.html?highlight=Celery%20#celery-application-objects" rel="nofollow">https://docs.celeryproject.org/en/stable/reference/celery.html?highlight=Celery%20#celery-application-objects</a>)</p>
<h1 dir="auto">Suggestions</h1> | <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"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> (if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
</ul>
</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 & 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 class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="372952395" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/5133" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/5133/hovercard" href="https://github.com/celery/celery/issues/5133">#5133</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment & Settings</h2>
<p dir="auto"><strong>Celery version</strong>: 4.3.0 (rhubarb)</p>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>
<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>
<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>
<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>
<details open="">
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" def test_always_eager_with_task_serializer_option(self):
self.app.conf.task_always_eager = True
@self.app.task(serializer='pickle')
def task(*args, **kwargs):
pass
task.apply_async((1, 2, 3, 4, {1}))"><pre class="notranslate"> <span class="pl-k">def</span> <span class="pl-en">test_always_eager_with_task_serializer_option</span>(<span class="pl-s1">self</span>):
<span class="pl-s1">self</span>.<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">task_always_eager</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>
<span class="pl-en">@<span class="pl-s1">self</span>.<span class="pl-s1">app</span>.<span class="pl-en">task</span>(<span class="pl-s1">serializer</span><span class="pl-c1">=</span><span class="pl-s">'pickle'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">task</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>):
<span class="pl-k">pass</span>
<span class="pl-s1">task</span>.<span class="pl-en">apply_async</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">1</span>}))</pre></div>
<p dir="auto">(test_tasks.py)</p>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">test passes</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Error <code class="notranslate">kombu.exceptions.EncodeError: Object of type set is not JSON serializable</code></p> | 0 |
<pre class="notranslate">$ cat incorrect_init.go
package main
var (
a = p("a") + c + b
b = p("b") + f()
c = p("c") + f()
d = p("d") + 3
)
func f() int {
d++
return d
}
func p(s string) int {
println(s)
return 0
}
func main() {
println(a, b, c, d)
}
compiling and executing produces:
$ go run incorrect_init.go
d
c
b
a
9 5 4 5
But the correct order per the spec should be: d, b, c, a, with values 9, 4, 5, 5.
See: <a href="http://tip.golang.org/ref/spec#Package_initialization" rel="nofollow">http://tip.golang.org/ref/spec#Package_initialization</a></pre> | <pre class="notranslate"><a href="http://play.golang.org/p/icbjgkx71B" rel="nofollow">http://play.golang.org/p/icbjgkx71B</a>
got:
gc produces the initialization order: c b a .
want:
The variables b and c are independent of each other, and b is declared before c, so the
order should be: b c a .
gccgo reports the order: b c a .
Based on spec clarification <a href="https://golang.org/cl/99020043" rel="nofollow">https://golang.org/cl/99020043</a> (<a href="https://golang.org/issue/6703" rel="nofollow">issue #6703</a>).</pre> | 1 |
<p dir="auto">While VS Code uses the same css.plist for CSS syntax highlighting as TextMate, Atom has this own forked version that is way more up to date:<br>
<a href="https://github.com/atom/language-css/blob/01146c2eac7d47455d5c964dd65eaeb209cfa778/grammars/css.cson">https://github.com/atom/language-css/blob/01146c2eac7d47455d5c964dd65eaeb209cfa778/grammars/css.cson</a></p>
<p dir="auto">Would be nice to find a way to keep all three in sync.</p>
<p dir="auto">Not all parts of css.plist are used in VSCode. For example some features such as the Media Query media features are highlighted from css.plist, but CSS properties that are not included in the file such as the flex box properties get highlighted anyway. I’m not 100% sure which ones need to always be up to date, and which ones don't matter for VSCode yet.</p> | <p dir="auto">I have set up my corporate proxy as explained on the documentation.</p>
<p dir="auto">But every time that I try to download an extension with <code class="notranslate">ext install extensionname</code>, it fails with this error:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/651027c5a5f63f14c21e70dfb24cd13b3080d593429e27f17e35f4d5df44ca66/687474703a2f2f692e696d6775722e636f6d2f5749306f5157412e706e67"><img src="https://camo.githubusercontent.com/651027c5a5f63f14c21e70dfb24cd13b3080d593429e27f17e35f4d5df44ca66/687474703a2f2f692e696d6775722e636f6d2f5749306f5157412e706e67" alt="connection error" data-canonical-src="http://i.imgur.com/WI0oQWA.png" style="max-width: 100%;"></a></p> | 0 |
<p dir="auto">by <strong>schwehr</strong>:</p>
<pre class="notranslate">Hi,
I am a packager for fink (apt-get managed packages on mac osx) and trying to get go to
work properly when installed via fink. I could use some help getting the package setup
correctly. I am not sure why go wants to modify files in its own tree. Is there a
setup step that was missed?
I've modified
<a href="http://fink.cvs.sourceforge.net/viewvc/fink/dists/10.7/stable/main/finkinfo/languages/go.info?view=log" rel="nofollow">http://fink.cvs.sourceforge.net/viewvc/fink/dists/10.7/stable/main/finkinfo/languages/go.info?view=log</a>
to use go 1.1.2 that can be seen here:
<a href="https://sourceforge.net/p/fink/package-submissions/4378/" rel="nofollow">https://sourceforge.net/p/fink/package-submissions/4378/</a>
I'm guessing that once go is built, maybe we are missing a step where we have to run go
to build a bunch of static archives?
Thanks!
-kurt
# Mac osx 10.9
xcodebuild -version
# Xcode 5.0.1
fink selfupdate
fink install go
fink list -i go | grep -i language
i go 1.1.2-1 Concurrent programming language
# Quick summary of what the info file does:
perl -pi -e 's/C.malloc\(C.size_t\(bufSize\)\)/C.malloc\(C.ulong\(bufSize\)\)/'
src/pkg/os/user/lookup_unix.go
export GOROOT_FINAL=%p/lib/go
cd src
./all.bash
mkdir -p %i/lib/go/src
cp -r bin include lib pkg %i/lib/go
cp -r src/pkg %i/lib/go/src
# for godoc
ln -s ../../share/doc/go/doc %i/lib/go/doc
mkdir %i/bin
cd bin
for i in *; do
ln -s ../lib/go/bin/$i %i/bin/$i
done
cd
mkdir go
cd go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
mkdir -p $GOPATH/src/github.com/$USER
echo $GOPATH/src/github.com/$USER
# /Users/schwehr/go/src/github.com/schwehr
mkdir $GOPATH/src/github.com/$USER/hello
cat << EOF > $GOPATH/src/github.com/$USER/hello/hello.go
package main
import "fmt"
func main() {
fmt.Printf("Hello, world.\n")
}
EOF
go build github.com/$USER/hello
go install github.com/$USER/hello
# go install errors: open /sw/lib/go/pkg/darwin_amd64/errors.a: permission denied
# go install math: open /sw/lib/go/pkg/darwin_amd64/math.a: permission denied
go version
go version go1.1.2 darwin/amd64
go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/schwehr/go"
GORACE=""
GOROOT="/sw/lib/go"
GOTOOLDIR="/sw/lib/go/pkg/tool/darwin_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
CGO_ENABLED="1"
# Trying to see what go wants to do:
go install -n -v github.com/schwehr/hello
errors
mkdir -p $WORK/errors/_obj/
mkdir -p $WORK/
cd /sw/lib/go/src/pkg/errors
/sw/lib/go/pkg/tool/darwin_amd64/6g -o $WORK/errors/_obj/_go_.6 -p errors -complete -D
_/sw/lib/go/src/pkg/errors -I $WORK ./errors.go
/sw/lib/go/pkg/tool/darwin_amd64/pack grcP $WORK $WORK/errors.a $WORK/errors/_obj/_go_.6
mkdir -p /sw/lib/go/pkg/darwin_amd64/
cp $WORK/errors.a /sw/lib/go/pkg/darwin_amd64/errors.a
# But that already exists!!!!
ls -l /sw/lib/go/pkg/darwin_amd64/errors.a
# -rw-r--r-- 1 root admin 6948 Nov 27 23:27 /sw/lib/go/pkg/darwin_amd64/errors.a
# Go should really not be trying to do this kind of thing!</pre> | <h1 dir="auto">Proposal: Vendor specification and experimental repository fetch code</h1>
<p dir="auto">Author(s): Daniel Theophanes</p>
<p dir="auto">Last updated: 2015-12-06</p>
<h2 dir="auto">Abstract</h2>
<p dir="auto">Establish a specification file format that lists dependency revisions and<br>
a package in the golang.org/x/exp repository that discovers, reads, and downloads<br>
packages at a given revision. Tools may continue to use other formats to generate<br>
this file.</p>
<h2 dir="auto">Background</h2>
<p dir="auto">Many developers wish to specify revisions of vendor dependencies without copying<br>
them into the repository. For a case study I will bring up two:</p>
<p dir="auto">A) <a href="https://github.com/cockroachdb/cockroach">https://github.com/cockroachdb/cockroach</a></p>
<p dir="auto">B) <a href="https://github.com/gluster/glusterd2">https://github.com/gluster/glusterd2</a></p>
<p dir="auto">(A) uses <code class="notranslate">github.com/robfig/glock</code> which specifies revisions for each remote repository<br>
in file in the project root called "GLOCKFILE". A partial list of the file is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cmd golang.org/x/tools/cmd/stress
cmd golang.org/x/tools/cmd/stringer
github.com/agtorre/gocolorize f42b554bf7f006936130c9bb4f971afd2d87f671
github.com/biogo/store 3b4c041f52c224ee4a44f5c8b150d003a40643a0
github.com/cockroachdb/c-rocksdb bf15ead80bdc205a19b3d33415b23c156a3cf371
github.com/cockroachdb/c-snappy 5c6d0932e0adaffce4bfca7bdf2ac37f79952ccf
github.com/cockroachdb/yacc 443154b1852a8702b07d675da6cd97cd9177a316
github.com/coreos/etcd a423a55b142c2b9a82811604204cddbccd0a9cf9"><pre class="notranslate"><code class="notranslate">cmd golang.org/x/tools/cmd/stress
cmd golang.org/x/tools/cmd/stringer
github.com/agtorre/gocolorize f42b554bf7f006936130c9bb4f971afd2d87f671
github.com/biogo/store 3b4c041f52c224ee4a44f5c8b150d003a40643a0
github.com/cockroachdb/c-rocksdb bf15ead80bdc205a19b3d33415b23c156a3cf371
github.com/cockroachdb/c-snappy 5c6d0932e0adaffce4bfca7bdf2ac37f79952ccf
github.com/cockroachdb/yacc 443154b1852a8702b07d675da6cd97cd9177a316
github.com/coreos/etcd a423a55b142c2b9a82811604204cddbccd0a9cf9
</code></pre></div>
<p dir="auto">(B) uses <code class="notranslate">github.com/Masterminds/glide</code> which specifies revisions for each remote<br>
repository in a file in the project root called "glide.yaml". This file contains:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="parent: null
package: github.com/gluster/glusterd2
import:
- package: github.com/gorilla/context
version: 1c83b3eabd45b6d76072b66b746c20815fb2872d
- package: gopkg.in/tylerb/graceful.v1
version: 48afeb21e2fcbcff0f30bd5ad6b97747b0fae38e
- package: github.com/pborman/uuid
version: cccd189d45f7ac3368a0d127efb7f4d08ae0b655
- package: github.com/gorilla/mux
version: ad4d7a5882b961e07e2626045eb995c022ac6664
- package: golang.org/x/net
version: b4e17d61b15679caf2335da776c614169a1b4643
- package: github.com/docker/libkv
version: 93099f38de7421e6979983652730a81e2bafd578
- package: github.com/codegangsta/negroni
version: c7477ad8e330bef55bf1ebe300cf8aa67c492d1b
- package: golang.org/x/sys
subpackages:
- /unix
- package: github.com/meatballhat/negroni-logrus
version: dd89490b0057cca7fe3fa3885f82935dfd430c2e
- package: github.com/Sirupsen/logrus
version: v0.8.7
- package: github.com/hashicorp/consul
version: v0.5.2"><pre class="notranslate"><code class="notranslate">parent: null
package: github.com/gluster/glusterd2
import:
- package: github.com/gorilla/context
version: 1c83b3eabd45b6d76072b66b746c20815fb2872d
- package: gopkg.in/tylerb/graceful.v1
version: 48afeb21e2fcbcff0f30bd5ad6b97747b0fae38e
- package: github.com/pborman/uuid
version: cccd189d45f7ac3368a0d127efb7f4d08ae0b655
- package: github.com/gorilla/mux
version: ad4d7a5882b961e07e2626045eb995c022ac6664
- package: golang.org/x/net
version: b4e17d61b15679caf2335da776c614169a1b4643
- package: github.com/docker/libkv
version: 93099f38de7421e6979983652730a81e2bafd578
- package: github.com/codegangsta/negroni
version: c7477ad8e330bef55bf1ebe300cf8aa67c492d1b
- package: golang.org/x/sys
subpackages:
- /unix
- package: github.com/meatballhat/negroni-logrus
version: dd89490b0057cca7fe3fa3885f82935dfd430c2e
- package: github.com/Sirupsen/logrus
version: v0.8.7
- package: github.com/hashicorp/consul
version: v0.5.2
</code></pre></div>
<p dir="auto">I would like to point out a few features these tools provide:</p>
<ul dir="auto">
<li>Specify commands to fetch.</li>
<li>Specify repositories at a given revision.</li>
<li>Specify repositories at a given version.</li>
<li>Specify a sub-tree of packages in a given repository.</li>
</ul>
<p dir="auto">Right now each vendor tool specifies these same properties in different formats.<br>
A common tool cannot be built that reads a single file and downloads the needed<br>
dependencies. This isn't a huge burden on a dedicated developer, but for a<br>
user passing by who just wants to build the source quickly, it is an impediment.</p>
<h2 dir="auto">Proposal</h2>
<p dir="auto">I propose specifying a single file format that will describe packages sourced<br>
outside the project repository. I also propose adding a packge to the<br>
golang.org/x/exp repository that discovers, reads, and optionally downloads<br>
third party packages.</p>
<p dir="auto">Furthermore I propose using the specification found at<br>
<a href="https://github.com/kardianos/vendor-spec">https://github.com/kardianos/vendor-spec</a> with one addition as the basis for this<br>
specification. The addition is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Package []struct {
...
// Tree indicates that the specified folder, along with all sub-folders
// are required.
Tree bool `json:"tree"`
...
}"><pre class="notranslate"><code class="notranslate">Package []struct {
...
// Tree indicates that the specified folder, along with all sub-folders
// are required.
Tree bool `json:"tree"`
...
}
</code></pre></div>
<p dir="auto">Both the specification and the proposed package will be considered experimental<br>
and subject to change or retraction until at least go1.7. This process will be<br>
done with an eye to possibly adding this feature to <code class="notranslate">go get</code>.</p>
<h2 dir="auto">Rationale</h2>
<p dir="auto">The vendor file format needs to be able to be read and written with standard<br>
go packages. This adds to the possibly that <code class="notranslate">go get</code> could fetch packages<br>
automatically.</p>
<p dir="auto">Vendor tools exist today that download packages from a specification. They are just<br>
incompatible with each other despite using the same information to download the<br>
dependencies. If we can agree on a single format for tools to write to, even if<br>
it isn't the primary format for that tool, all tools and possibly <code class="notranslate">go get</code> can<br>
download dependencies.</p>
<p dir="auto">Existing vendor tools and their formats don't always handle corner cases or<br>
different approaches. For example current tool file formats can't handle the<br>
case of vendoring a patched version of a standard library package (this<br>
would have been useful for <code class="notranslate">crypto/tls</code> forks for detecting the heartbleed<br>
attack and for accessing MS Azure).</p>
<p dir="auto">I am proposing a file format that "govendor" uses. I'm not trying to put my own<br>
tool as central. Infact, "govendor" was built to validate the "vendor-spec"<br>
proposal. The "vendor-spec" has received significant external contributions<br>
and as such "govendor" has changed to match the spec (and will continue to do so).</p>
<h2 dir="auto">Compatibility</h2>
<p dir="auto">This will be standardization of existing practices. There is no go1 compatibility<br>
issues. Existing tools can treat the specification as a write only file.</p>
<h2 dir="auto">Implementation</h2>
<p dir="auto">A file format to describe vendor packages should be accepted when this<br>
proposal is accepted. Should this proposal be accepted a new package<br>
should be added to the "golang.org/x/exp" repository to support reading<br>
the vendor file and downloading packages. The author of this proposal<br>
offers to create or assist in creating this package. This would be created<br>
within 2 months of the proposal being accepted.</p>
<h2 dir="auto">Risks</h2>
<p dir="auto">It would be ideal if other vendor tool package authors could agree to at least<br>
write to a standard file format informally and collaboratively. Indeed the largest<br>
risk is if vendor tools fail to write the common file format. However I think<br>
unless there is a tangible benefit (such as <code class="notranslate">go get</code> support) there will continue<br>
to not be a reason to collaborate on a standard.</p>
<h2 dir="auto">Open issues</h2>
<p dir="auto">The proposed standard file format uses JSON, which might be better then XML, but<br>
harder to write by then something like TOML. Tools that want the vendor file<br>
to be hand created will be forced to generate this file from a different file.</p>
<p dir="auto">The file format specifies packages, not repositories. Repositories can be specified<br>
by using the root path to the repository and specifying <code class="notranslate">"tree": true</code>, but it isn't<br>
the default for the format. Some people may take issue with that as they are used<br>
to or desire tools that only work at the repository level. This could be a point<br>
of division. From experience I absolutely love vendoring at the package level<br>
(this is what github.com/kardianos/govendor does by default).</p> | 0 |
<p dir="auto">Trying to build the project (and using Babel JS)</p>
<p dir="auto">I get these error messages<br>
(Something in the mergeAndPrefix => Extend chain is trying to create two copies of teh same property on these lines)</p>
<p dir="auto">ERROR in ./lib/icon-button.jsx<br>
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\icon-button.jsx Line 72:<br>
Duplicate data property in object literal not allowed in strict mode<br>
| transition: Transitions.easeOut(),<br>
| padding: this.getSpacing().iconSize / 2,<br>
| width: this.getSpacing().iconSize * 2,<br>
| height: this.getSpacing().iconSize * 2<br>
| },<br>
@ ./lib/index.js 16:14-38</p>
<p dir="auto">ERROR in ./lib/tabs/tab.jsx<br>
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\tabs\tab.jsx Line 36:<br>
Duplicate data property in object literal not allowed in strict mode<br>
| textAlign: 'center',<br>
| verticalAlign: 'middle',<br>
| height: '48px',<br>
| color: Colors.white,<br>
| opacity: '.6',<br>
@ ./lib/index.js 46:7-28</p>
<p dir="auto">ERROR in ./lib/menu/subheader-menu-item.jsx<br>
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\menu\subheader-menu-item.jsx Line 43:<br>
Duplicate data property in object literal not allowed in strict mode<br>
| height: subheaderHeight + gutterMini,<br>
| lineHeight: subheaderHeight + 'px',<br>
| color: this.getTheme().textColor,<br>
| borderTop: 'solid 1px ' + this.getTheme().borderColor,<br>
| paddingTop: gutterMini,<br>
@ ./lib/menu/menu.jsx 17:24-56</p>
<p dir="auto">ERROR in ./lib/styles/themes/light-theme.js<br>
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js!F:\Projects\app\material-ui\src\styles\themes\light-theme.js Line 145:<br>
Duplicate data property in object literal not allowed in strict mode<br>
| separatorColor: 'rgba(0, 0, 0, .175)',<br>
| menuHoverColor: 'rgba(0, 0, 0, .10)',<br>
| menuHoverColor: Colors.white<br>
| }<br>
| };<br>
@ ./lib/styles/theme-manager.js 9:9-40</p>
<p dir="auto">ERROR in ./lib/enhanced-textarea.jsx<br>
Module parse failed: F:\Projects\app\node_modules\babel-loader\index.js?stage=1!F:\Projects\app\material-ui\src\enhanced-textarea.jsx Line 101:<br>
Duplicate data property in object literal not allowed in strict mode<br>
| style: inputStyles,<br>
| rows: this.props.rows,<br>
| style: AutoPrefix.all(inputStyles),<br>
| onChange: this._handleChange }))<br>
| );<br>
@ ./lib/text-field.jsx 13:23-53</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>
<p dir="auto">I found the documentation diverged from the version of this package I have installed which caused a lot of wasted time trying to debug non existent issues. It should be possible to easily view the documentation for a specified version of this package.</p>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>Material-UI</td>
<td>1.0.0-beta.23</td>
</tr>
</tbody>
</table> | 0 |
<p dir="auto">Hi!</p>
<p dir="auto">I was trying to install a fresh install of the tensorflow master from source, but always run into an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package"><pre class="notranslate"><code class="notranslate">$ bazel build -c opt --config=cuda --verbose_failures --spawn_strategy=standalone //tensorflow/tools/pip_package:build_pip_package
</code></pre></div>
<p dir="auto">Eventually fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /system/user/bioinf01/tom/sources/tensorflow/tensorflow/python/BUILD:71:1: C++ compilation of rule '//tensorflow/python:py_func_lib' failed: crosstool_wrapper_driver_is_not_
gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 118.584s, Critical Path: 32.92s"><pre class="notranslate"><code class="notranslate">ERROR: /system/user/bioinf01/tom/sources/tensorflow/tensorflow/python/BUILD:71:1: C++ compilation of rule '//tensorflow/python:py_func_lib' failed: crosstool_wrapper_driver_is_not_
gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /system/user/unterthi/.cache/bazel/_bazel_unterthi/b4214462455bc5801962f5dfb9d41d3b/tensorflow && \
exec env - \
INTERCEPT_LOCALLY_EXECUTABLE=1 \
PATH=/system/apps/biosoft/bazel-0.1.1/bazel-bin/src:/system/apps/biosoft/jdk1.8.0_40/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/d
istribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-3
51/bin:/usr/local/cuda/bin:/system/apps/biosoft/R-3.2.0/bin:/system/apps/biosoft/caffe_py351/distribute/bin:/system/apps/biosoft/lmdb-0.9.17/bin:/system/apps/biosoft/protobuf-3.0.0
-alpha-3.1_py351/bin:/system/apps/biosoft/boost_1_59_0_py351/bin:/system/apps/biosoft/python-351/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/system
/user/unterthi/bin:/system/user/unterthi/bin \
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-fre
e-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iquote bazel-out/local_linux-py3-opt/genfiles -isystem google/
protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-o
pt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem ex
ternal/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/eigen3 -isystem exte
rnal/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_incl
ude -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_include -isystem bazel-out/local_linux-py3-opt/genfiles/util/pyth
on/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_li
nux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorfl
ow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/
py_func.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 118.584s, Critical Path: 32.92s
</code></pre></div>
<p dir="auto">Running that last command myself to see the GCC error message gives:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstac
k-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iqu
ote bazel-out/local_linux-py3-opt/genfiles -isystem google/protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem externa
l/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-
opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/lo
cal_linux-py3-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-
eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_include -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_includ
e -isystem bazel-out/local_linux-py3-opt/genfiles/util/python/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"
' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_lin
ux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tens
orflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o
In file included from ./tensorflow/core/public/tensor.h:19:0,
from ./tensorflow/python/lib/core/py_func.h:20,
from tensorflow/python/lib/core/py_func.cc:16:
./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:90: fatal error: external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor: No such file or directory
#include "external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor"
^
compilation terminated."><pre class="notranslate"><code class="notranslate">$ third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstac
k-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -iquote . -iqu
ote bazel-out/local_linux-py3-opt/genfiles -isystem google/protobuf/src -isystem bazel-out/local_linux-py3-opt/genfiles/google/protobuf/src -isystem tools/cpp/gcc3 -isystem externa
l/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-py3-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-py3-
opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/re2 -isystem bazel-out/local_linux-py3-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/lo
cal_linux-py3-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-5651786d5e59 -isystem bazel-out/local_linux-py3-opt/genfiles/external/eigen_archive/eigen-
eigen-5651786d5e59 -isystem third_party/py/numpy/numpy_include -isystem bazel-out/local_linux-py3-opt/genfiles/third_party/py/numpy/numpy_include -isystem util/python/python_includ
e -isystem bazel-out/local_linux-py3-opt/genfiles/util/python/python_include -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"
' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local_linux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o' -MD -MF bazel-out/local_lin
ux-py3-opt/bin/tensorflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.d -fPIC -c tensorflow/python/lib/core/py_func.cc -o bazel-out/local_linux-py3-opt/bin/tens
orflow/python/_objs/py_func_lib/tensorflow/python/lib/core/py_func.pic.o
In file included from ./tensorflow/core/public/tensor.h:19:0,
from ./tensorflow/python/lib/core/py_func.h:20,
from tensorflow/python/lib/core/py_func.cc:16:
./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:90: fatal error: external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor: No such file or directory
#include "external/eigen_archive/eigen-eigen-5651786d5e59/unsupported/Eigen/CXX11/Tensor"
^
compilation terminated.
</code></pre></div> | <p dir="auto">Hi</p>
<p dir="auto">Sounds like the python3 building script have some issues:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PC% bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 18.140s, Critical Path: 2.02s"><pre class="notranslate"><code class="notranslate">PC% bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 18.140s, Critical Path: 2.02s
</code></pre></div>
<p dir="auto">With verbose_faillures :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 30.007s, Critical Path: 29.28s"><pre class="notranslate"><code class="notranslate">ERROR: /home/zenol/tensorflow/tensorflow/tensorflow/python/BUILD:247:1: Converting to Python 3: tensorflow/python/ops/functional_ops.py failed: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: 2to3 failed: error executing command
(cd /home/zenol/.cache/bazel/_bazel_zenol/67d52188e906c7f900d4635d7d1ff821/tensorflow && \
exec env - \
bazel-out/host/bin/external/bazel_tools/tools/python/2to3 --no-diffs --nobackups --write --output-dir bazel-out/local_linux-py3-opt/genfiles/python3/tensorflow/python/ops --write-unchanged-files tensorflow/python/ops/functional_ops.py): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 30.007s, Critical Path: 29.28s
</code></pre></div>
<p dir="auto">Nb : The python2 build seems to work.</p> | 1 |
<p dir="auto">Hello,</p>
<p dir="auto">Why a date field with the options below is it limited. Choice available between 1902 and 2037?</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$Builder-> add ('date', 'date', array (
'input' => 'datetime'
'widget' => 'choice'
'years' => range (1850,2050) "
));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span><span class="pl-v">Builder</span></span>-> <span class="pl-en">add</span> (<span class="pl-s">'date'</span>, <span class="pl-s">'date'</span>, <span class="pl-en">array</span> (
<span class="pl-s">'input'</span> => <span class="pl-s">'datetime'</span>
'widget' => 'choice'
'years' => range (<span class="pl-c1">1850</span>,<span class="pl-c1">2050</span>) "
));</pre></div>
<p dir="auto">documentation says:</p>
<blockquote>
<p dir="auto">If timestamp is used, DateType is limited to dates entre Fri, Dec. 13, 1901 8:45:54 p.m. GMT and Tue, January 19, 2038 3:14:07 GMT on 32bit systems. This is due to a limitation in PHP Itself.</p>
</blockquote>
<p dir="auto">Is it normal that the option datetime have the same limitation?<br>
For information i use symfony 2.3</p>
<p dir="auto">Thank you for this great framework.</p> | <p dir="auto"><a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/DateType.php#L277">https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Core/Type/DateType.php#L277</a></p>
<p dir="auto">When I set date options like</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder->add('expire', 'date', array('years' => range(2000, 2100)));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span>-><span class="pl-en">add</span>(<span class="pl-s">'expire'</span>, <span class="pl-s">'date'</span>, <span class="pl-en">array</span>(<span class="pl-s">'years'</span> => range(<span class="pl-c1">2000</span>, <span class="pl-c1">2100</span>)));</pre></div>
<p dir="auto">year choice field shows</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<select>
<option value="2000">2000</option>
<option value="2000">2000</option>
...
<option value="2037">2037</option>
<option value="2038"></option>
<option value="2039"></option>
...
<option value="2100"></option>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">select</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2000</span>"<span class="pl-kos">></span>2000<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2000</span>"<span class="pl-kos">></span>2000<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
...
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2037</span>"<span class="pl-kos">></span>2037<span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2038</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2039</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span>
...
<span class="pl-kos"><</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">2100</span>"<span class="pl-kos">></span><span class="pl-kos"></</span><span class="pl-ent">option</span><span class="pl-kos">></span></pre></div>
<p dir="auto">It's perhaps because <code class="notranslate">gmmktime</code> on 32-bit is only suitable for up to 2038-01-19 03:14:07 .</p>
<p dir="auto">On 32-bit php</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ php -r 'echo gmmktime(0,0,0,6,15,2037);'
2128636800
$ php -r 'echo gmmktime(0,0,0,6,15,2038);'
## shows nothing ##
$ php -r 'var_dump(gmmktime(0,0,0,6,15,2038));'
bool(false)"><pre class="notranslate">$ php -r <span class="pl-s"><span class="pl-pds">'</span>echo gmmktime(0,0,0,6,15,2037);<span class="pl-pds">'</span></span>
2128636800
$ php -r <span class="pl-s"><span class="pl-pds">'</span>echo gmmktime(0,0,0,6,15,2038);<span class="pl-pds">'</span></span>
<span class="pl-c"><span class="pl-c">#</span># shows nothing ##</span>
$ php -r <span class="pl-s"><span class="pl-pds">'</span>var_dump(gmmktime(0,0,0,6,15,2038));<span class="pl-pds">'</span></span>
bool(false)</pre></div>
<p dir="auto">On 64-bit php</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ php -r 'echo gmmktime(0, 0, 0, 6, 15, 2037);'
2128636800
$ php -r 'echo gmmktime(0, 0, 0, 6, 15, 2038);'
2160172800"><pre class="notranslate">$ php -r <span class="pl-s"><span class="pl-pds">'</span>echo gmmktime(0, 0, 0, 6, 15, 2037);<span class="pl-pds">'</span></span>
2128636800
$ php -r <span class="pl-s"><span class="pl-pds">'</span>echo gmmktime(0, 0, 0, 6, 15, 2038);<span class="pl-pds">'</span></span>
2160172800</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 class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version: win 10, spring-boot 1.5.9.RELEASE</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>Java config</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Configuration
public class HttpConfig {
@Bean
RestTemplate restTemplate(){
RestTemplate restTemplate = new RestTemplate();
return restTemplate;
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Configuration</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">HttpConfig</span> {
<span class="pl-c1">@</span><span class="pl-c1">Bean</span>
<span class="pl-smi">RestTemplate</span> <span class="pl-en">restTemplate</span>(){
<span class="pl-smi">RestTemplate</span> <span class="pl-s1">restTemplate</span> = <span class="pl-k">new</span> <span class="pl-smi">RestTemplate</span>();
<span class="pl-k">return</span> <span class="pl-s1">restTemplate</span>;
}
}</pre></div>
<ol start="2" dir="auto">
<li>Dubbo Service config</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Configuration
public class CanaryConfig {
private Logger logger = LoggerFactory.getLogger(CanaryConfig.class);
@Autowired
private ApplicationConfig application;
@Autowired
private RegistryConfig registry;
@Autowired
private ProtocolConfig protocol;
@PostConstruct
public void init() {
logger.info("CanaryConfig init ...");
// 服务提供者暴露服务配置
// 此实例很重,封装了与注册中心的连接,请自行缓存,否则可能造成内存和连接泄漏
ServiceConfig<CanaryService> service = new ServiceConfig<>();
service.setApplication(application);
// 多个注册中心可以用setRegistries()
service.setRegistry(registry);
// 多个协议可以用setProtocols()
service.setProtocol(protocol);
service.setInterface(CanaryService.class);
service.setRef(new CanaryServiceImpl());
service.setFilter("tracing,dubboInterfaceAuthorityFilter,dubboLogFilter");
// 如果不延迟暴露, 则filter无法进入setter来获取spring实例
// service.setDelay(5000);
// 暴露及注册服务
service.export();
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Configuration</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">CanaryConfig</span> {
<span class="pl-k">private</span> <span class="pl-smi">Logger</span> <span class="pl-s1">logger</span> = <span class="pl-smi">LoggerFactory</span>.<span class="pl-en">getLogger</span>(<span class="pl-smi">CanaryConfig</span>.<span class="pl-k">class</span>);
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">ApplicationConfig</span> <span class="pl-s1">application</span>;
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">RegistryConfig</span> <span class="pl-s1">registry</span>;
<span class="pl-c1">@</span><span class="pl-c1">Autowired</span>
<span class="pl-k">private</span> <span class="pl-smi">ProtocolConfig</span> <span class="pl-s1">protocol</span>;
<span class="pl-c1">@</span><span class="pl-c1">PostConstruct</span>
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">init</span>() {
<span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">"CanaryConfig init ..."</span>);
<span class="pl-c">// 服务提供者暴露服务配置</span>
<span class="pl-c">// 此实例很重,封装了与注册中心的连接,请自行缓存,否则可能造成内存和连接泄漏</span>
<span class="pl-smi">ServiceConfig</span><<span class="pl-smi">CanaryService</span>> <span class="pl-s1">service</span> = <span class="pl-k">new</span> <span class="pl-smi">ServiceConfig</span><>();
<span class="pl-s1">service</span>.<span class="pl-en">setApplication</span>(<span class="pl-s1">application</span>);
<span class="pl-c">// 多个注册中心可以用setRegistries()</span>
<span class="pl-s1">service</span>.<span class="pl-en">setRegistry</span>(<span class="pl-s1">registry</span>);
<span class="pl-c">// 多个协议可以用setProtocols()</span>
<span class="pl-s1">service</span>.<span class="pl-en">setProtocol</span>(<span class="pl-s1">protocol</span>);
<span class="pl-s1">service</span>.<span class="pl-en">setInterface</span>(<span class="pl-smi">CanaryService</span>.<span class="pl-k">class</span>);
<span class="pl-s1">service</span>.<span class="pl-en">setRef</span>(<span class="pl-k">new</span> <span class="pl-smi">CanaryServiceImpl</span>());
<span class="pl-s1">service</span>.<span class="pl-en">setFilter</span>(<span class="pl-s">"tracing,dubboInterfaceAuthorityFilter,dubboLogFilter"</span>);
<span class="pl-c">// 如果不延迟暴露, 则filter无法进入setter来获取spring实例</span>
<span class="pl-c">// service.setDelay(5000);</span>
<span class="pl-c">// 暴露及注册服务</span>
<span class="pl-s1">service</span>.<span class="pl-en">export</span>();
}
}</pre></div>
<ol start="3" dir="auto">
<li>Dubbo filter(in another dependency jar)</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Activate(group = {Constants.PROVIDER, Constants.CONSUMER})
public class DubboInterfaceAuthorityFilter implements Filter {
private static final Logger logger = LoggerFactory.getLogger(DubboInterfaceAuthorityFilter.class);
public void setRestTemplate(RestTemplate restTemplate) {
// get restTemplate instance from spring
logger.info(" into setter");
}
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
if(restTemplate!=null){
// my code
}
// ...
}
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">Activate</span>(<span class="pl-s1">group</span> = {<span class="pl-smi">Constants</span>.<span class="pl-c1">PROVIDER</span>, <span class="pl-smi">Constants</span>.<span class="pl-c1">CONSUMER</span>})
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">DubboInterfaceAuthorityFilter</span> <span class="pl-k">implements</span> <span class="pl-smi">Filter</span> {
<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">Logger</span> <span class="pl-s1">logger</span> = <span class="pl-smi">LoggerFactory</span>.<span class="pl-en">getLogger</span>(<span class="pl-smi">DubboInterfaceAuthorityFilter</span>.<span class="pl-k">class</span>);
<span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">setRestTemplate</span>(<span class="pl-smi">RestTemplate</span> <span class="pl-s1">restTemplate</span>) {
<span class="pl-c">// get restTemplate instance from spring</span>
<span class="pl-s1">logger</span>.<span class="pl-en">info</span>(<span class="pl-s">" into setter"</span>);
}
<span class="pl-c1">@</span><span class="pl-c1">Override</span>
<span class="pl-k">public</span> <span class="pl-smi">Result</span> <span class="pl-en">invoke</span>(<span class="pl-smi">Invoker</span><?> <span class="pl-s1">invoker</span>, <span class="pl-smi">Invocation</span> <span class="pl-s1">invocation</span>) <span class="pl-k">throws</span> <span class="pl-smi">RpcException</span> {
<span class="pl-k">if</span>(<span class="pl-s1">restTemplate</span>!=<span class="pl-c1">null</span>){
<span class="pl-c">// my code</span>
}
<span class="pl-c">// ...</span>
}
}</pre></div>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">DubboInterfaceAuthorityFilter can invoke its setRestTemplate method, to get restTemplate instance from spring</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">DubboInterfaceAuthorityFilter do not invoke setRestTemplate method, so that restTemplate is always null in my filter.</p>
<h3 dir="auto">By the way</h3>
<p dir="auto">If i <code class="notranslate">service.setDelay(5000);</code> or export this service by dubbo xml:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<dubbo:service interface="com.canary.service.CanaryService" ref="canaryServiceImpl" version="1.0.3"/>
<bean id="canaryServiceImpl" class="com.canary.service.CanaryServiceImpl"/>"><pre class="notranslate"><<span class="pl-ent">dubbo</span><span class="pl-ent">:</span><span class="pl-ent">service</span> <span class="pl-e">interface</span>=<span class="pl-s"><span class="pl-pds">"</span>com.canary.service.CanaryService<span class="pl-pds">"</span></span> <span class="pl-e">ref</span>=<span class="pl-s"><span class="pl-pds">"</span>canaryServiceImpl<span class="pl-pds">"</span></span> <span class="pl-e">version</span>=<span class="pl-s"><span class="pl-pds">"</span>1.0.3<span class="pl-pds">"</span></span>/>
<<span class="pl-ent">bean</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>canaryServiceImpl<span class="pl-pds">"</span></span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>com.canary.service.CanaryServiceImpl<span class="pl-pds">"</span></span>/></pre></div>
<p dir="auto">DubboInterfaceAuthorityFilter will invoke its setRestTemplate method.</p>
<p dir="auto"><strong>Why ?</strong></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.3-SNAPSHOT</li>
<li>Operating System version: macOs</li>
<li>Java version: JDK 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>We cannot getFuture from alibaba RpcContext after setFuture, the result is null.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CompletableFuture future = new CompletableFuture();
com.alibaba.dubbo.rpc.RpcContext.getContext().setFuture(future);
Future result = com.alibaba.dubbo.rpc.RpcContext.getContext().getFuture();"><pre class="notranslate"><code class="notranslate">CompletableFuture future = new CompletableFuture();
com.alibaba.dubbo.rpc.RpcContext.getContext().setFuture(future);
Future result = com.alibaba.dubbo.rpc.RpcContext.getContext().getFuture();
</code></pre></div>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">result should be same new FutureAdapter(future);</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">result is null.</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div> | 0 |
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: Installing ArrayViews v0.6.4
INFO: Installing Compat v0.7.7
INFO: Upgrading DataArrays: v0.2.19 => v0.2.20"><pre class="notranslate"><code class="notranslate">julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: Installing ArrayViews v0.6.4
INFO: Installing Compat v0.7.7
INFO: Upgrading DataArrays: v0.2.19 => v0.2.20
</code></pre></div>
<p dir="auto">My update hangs for over 2 hours.</p>
<p dir="auto">Observed on OS X 10.11, julia 0.4.0, 0.4.1 and release-0.4 HEAD, but not on master.</p>
<p dir="auto">To reproduce, create an empty v0.4 directory with METADATA and DataArrays v0.2.19 installed, and create a REQUIRE file with "DataArrays" as the only entry.</p>
<p dir="auto">Backtrace on julia-debug if it's helpful:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="* thread #1: tid = 0x64352e, 0x00007fff8d217072 libsystem_kernel.dylib`kevent + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff8d217072 libsystem_kernel.dylib`kevent + 10
frame #1: 0x000000010211e2cc libjulia-debug.dylib`uv__io_poll(loop=0x0000000102d75338, timeout=<unavailable>) + 684 at kqueue.c:130 [opt]
frame #2: 0x000000010210e838 libjulia-debug.dylib`uv_run(loop=0x0000000102d75338, mode=UV_RUN_ONCE) + 360 at core.c:294 [opt]
* frame #3: 0x00000001020cdf31 libjulia-debug.dylib`jl_run_once(loop=0x0000000102d75338) + 65 at jl_uv.c:116
frame #4: 0x00000001035dd511 sys-debug.dylib`julia_process_events_17564 + 225 at stream.jl:713 [opt]
frame #5: 0x00000001035dd1ba sys-debug.dylib`julia_wait_17562 + 154 at task.jl:360 [opt]
frame #6: 0x00000001035dcfa6 sys-debug.dylib`julia_wait_17560 + 454 at task.jl:286 [opt]
frame #7: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000107621630, args=0x00007fff5dc63090, nargs=1) + 64 at julia.h:1325
frame #8: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000107621290, args=0x00007fff5dc63090, nargs=1) + 529 at gf.c:1684
frame #9: 0x0000000103623d88 sys-debug.dylib`julia_stream_wait_19296 + 488 at stream.jl:60 [opt]
frame #10: 0x0000000103623b73 sys-debug.dylib`julia_wait_19295 + 115 at process.jl:655 [opt]
frame #11: 0x0000000306851f34
frame #12: 0x0000000306851e43
frame #13: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000108861550, args=0x00007fff5dc63220, nargs=1) + 64 at julia.h:1325
frame #14: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106b4e690, args=0x00007fff5dc63220, nargs=1) + 529 at gf.c:1684
frame #15: 0x0000000306855265
frame #16: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001084d55b0, args=0x00007fff5dc63378, nargs=1) + 64 at julia.h:1325
frame #17: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106d6c150, args=0x00007fff5dc63378, nargs=1) + 529 at gf.c:1684
frame #18: 0x0000000306854496
frame #19: 0x0000000306854127
frame #20: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000108544ab0, args=0x00007fff5dc63538, nargs=2) + 64 at julia.h:1325
frame #21: 0x0000000101fc8583 libjulia-debug.dylib`jl_f_kwcall(F=0x0000000000000000, args=0x00007fff5dc63538, nargs=2) + 931 at builtins.c:545
frame #22: 0x0000000306893484
frame #23: 0x0000000306896efe
frame #24: 0x0000000306896e07
frame #25: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 64 at julia.h:1325
frame #26: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 235 at builtins.c:1037
frame #27: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 64 at julia.h:1325
frame #28: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001058746d0, args=0x00007fff5dc63d40, nargs=2) + 816 at gf.c:1708
frame #29: 0x00000001036317e2 sys-debug.dylib`julia_resolve_19574 + 6738 at entry.jl:459 [opt]
frame #30: 0x000000010362a7ee sys-debug.dylib`julia_update_19438 + 5166 at entry.jl:313 [opt]
frame #31: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #32: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 235 at builtins.c:1037
frame #33: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #34: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106393790, args=0x00007fff5dc64240, nargs=1) + 529 at gf.c:1684
frame #35: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000106393790, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #36: 0x0000000101fc7dd1 libjulia-debug.dylib`jl_f_apply(F=0x0000000000000000, args=0x00007fff5dc64428, nargs=2) + 2817 at builtins.c:497
frame #37: 0x000000030684ac37
frame #38: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086d4df0, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #39: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086d4df0, args=0x0000000000000000, nargs=0) + 235 at builtins.c:1037
frame #40: 0x000000030684a0bb
frame #41: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 64 at julia.h:1325
frame #42: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 235 at builtins.c:1037
frame #43: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 64 at julia.h:1325
frame #44: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x0000000107338530, args=0x00007fff5dc647f8, nargs=2) + 816 at gf.c:1708
frame #45: 0x00000003068475a6
frame #46: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 64 at julia.h:1325
frame #47: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 235 at builtins.c:1037
frame #48: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 64 at julia.h:1325
frame #49: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001061bb8f0, args=0x00007fff5dc649e8, nargs=3) + 816 at gf.c:1708
frame #50: 0x00000001036600a7 sys-debug.dylib`julia_update_20232 + 215 at pkg.jl:45 [opt]
frame #51: 0x00000001036600d9 sys-debug.dylib`jlcall_update_20232 + 9
frame #52: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #53: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 235 at builtins.c:1037
frame #54: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #55: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x00000001063c1cb0, args=0x00007fff5dc64c18, nargs=0) + 529 at gf.c:1684
frame #56: 0x00000001020aba10 libjulia-debug.dylib`jl_apply(f=0x00000001063c1cb0, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #57: 0x00000001020ab303 libjulia-debug.dylib`do_call(f=0x00000001063c1cb0, args=0x00000001095ae708, nargs=0, eval0=0x0000000000000000, locals=0x0000000000000000, nl=0, ngensym=0) + 371 at interpreter.c:65
frame #58: 0x00000001020a8325 libjulia-debug.dylib`eval(e=0x0000000108701490, locals=0x0000000000000000, nl=0, ngensym=0) + 2853 at interpreter.c:213
frame #59: 0x00000001020a77cd libjulia-debug.dylib`jl_interpret_toplevel_expr(e=0x0000000108701490) + 45 at interpreter.c:27
frame #60: 0x00000001020ca86b libjulia-debug.dylib`jl_toplevel_eval_flex(e=0x00000001087004d0, fast=1) + 2347 at toplevel.c:527
frame #61: 0x00000001020cb278 libjulia-debug.dylib`jl_toplevel_eval(v=0x00000001087004d0) + 40 at toplevel.c:550
frame #62: 0x0000000101fc89ee libjulia-debug.dylib`jl_toplevel_eval_in(m=0x00000001057f0010, ex=0x00000001087004d0, delay_warn=0) + 782 at builtins.c:579
frame #63: 0x0000000101fc8cb8 libjulia-debug.dylib`jl_f_top_eval(F=0x0000000000000000, args=0x00007fff5dc65508, nargs=2) + 248 at builtins.c:610
frame #64: 0x000000030684687a
frame #65: 0x00000003068463c7
frame #66: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 64 at julia.h:1325
frame #67: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 235 at builtins.c:1037
frame #68: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 64 at julia.h:1325
frame #69: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001061b8f30, args=0x00007fff5dc65808, nargs=2) + 816 at gf.c:1708
frame #70: 0x00000003068411cc
frame #71: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #72: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 235 at builtins.c:1037
frame #73: 0x00000001020b7fc0 libjulia-debug.dylib`jl_apply(f=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #74: 0x00000001020b7f6f libjulia-debug.dylib`start_task + 47 at task.c:240"><pre class="notranslate"><code class="notranslate">* thread #1: tid = 0x64352e, 0x00007fff8d217072 libsystem_kernel.dylib`kevent + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff8d217072 libsystem_kernel.dylib`kevent + 10
frame #1: 0x000000010211e2cc libjulia-debug.dylib`uv__io_poll(loop=0x0000000102d75338, timeout=<unavailable>) + 684 at kqueue.c:130 [opt]
frame #2: 0x000000010210e838 libjulia-debug.dylib`uv_run(loop=0x0000000102d75338, mode=UV_RUN_ONCE) + 360 at core.c:294 [opt]
* frame #3: 0x00000001020cdf31 libjulia-debug.dylib`jl_run_once(loop=0x0000000102d75338) + 65 at jl_uv.c:116
frame #4: 0x00000001035dd511 sys-debug.dylib`julia_process_events_17564 + 225 at stream.jl:713 [opt]
frame #5: 0x00000001035dd1ba sys-debug.dylib`julia_wait_17562 + 154 at task.jl:360 [opt]
frame #6: 0x00000001035dcfa6 sys-debug.dylib`julia_wait_17560 + 454 at task.jl:286 [opt]
frame #7: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000107621630, args=0x00007fff5dc63090, nargs=1) + 64 at julia.h:1325
frame #8: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000107621290, args=0x00007fff5dc63090, nargs=1) + 529 at gf.c:1684
frame #9: 0x0000000103623d88 sys-debug.dylib`julia_stream_wait_19296 + 488 at stream.jl:60 [opt]
frame #10: 0x0000000103623b73 sys-debug.dylib`julia_wait_19295 + 115 at process.jl:655 [opt]
frame #11: 0x0000000306851f34
frame #12: 0x0000000306851e43
frame #13: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000108861550, args=0x00007fff5dc63220, nargs=1) + 64 at julia.h:1325
frame #14: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106b4e690, args=0x00007fff5dc63220, nargs=1) + 529 at gf.c:1684
frame #15: 0x0000000306855265
frame #16: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001084d55b0, args=0x00007fff5dc63378, nargs=1) + 64 at julia.h:1325
frame #17: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106d6c150, args=0x00007fff5dc63378, nargs=1) + 529 at gf.c:1684
frame #18: 0x0000000306854496
frame #19: 0x0000000306854127
frame #20: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000108544ab0, args=0x00007fff5dc63538, nargs=2) + 64 at julia.h:1325
frame #21: 0x0000000101fc8583 libjulia-debug.dylib`jl_f_kwcall(F=0x0000000000000000, args=0x00007fff5dc63538, nargs=2) + 931 at builtins.c:545
frame #22: 0x0000000306893484
frame #23: 0x0000000306896efe
frame #24: 0x0000000306896e07
frame #25: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 64 at julia.h:1325
frame #26: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 235 at builtins.c:1037
frame #27: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001087d7110, args=0x00007fff5dc63d40, nargs=2) + 64 at julia.h:1325
frame #28: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001058746d0, args=0x00007fff5dc63d40, nargs=2) + 816 at gf.c:1708
frame #29: 0x00000001036317e2 sys-debug.dylib`julia_resolve_19574 + 6738 at entry.jl:459 [opt]
frame #30: 0x000000010362a7ee sys-debug.dylib`julia_update_19438 + 5166 at entry.jl:313 [opt]
frame #31: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #32: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 235 at builtins.c:1037
frame #33: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000106393830, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #34: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x0000000106393790, args=0x00007fff5dc64240, nargs=1) + 529 at gf.c:1684
frame #35: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000106393790, args=0x00007fff5dc64240, nargs=1) + 64 at julia.h:1325
frame #36: 0x0000000101fc7dd1 libjulia-debug.dylib`jl_f_apply(F=0x0000000000000000, args=0x00007fff5dc64428, nargs=2) + 2817 at builtins.c:497
frame #37: 0x000000030684ac37
frame #38: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086d4df0, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #39: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086d4df0, args=0x0000000000000000, nargs=0) + 235 at builtins.c:1037
frame #40: 0x000000030684a0bb
frame #41: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 64 at julia.h:1325
frame #42: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 235 at builtins.c:1037
frame #43: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001086d4e30, args=0x00007fff5dc647f8, nargs=2) + 64 at julia.h:1325
frame #44: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x0000000107338530, args=0x00007fff5dc647f8, nargs=2) + 816 at gf.c:1708
frame #45: 0x00000003068475a6
frame #46: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 64 at julia.h:1325
frame #47: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 235 at builtins.c:1037
frame #48: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001086dd970, args=0x00007fff5dc649e8, nargs=3) + 64 at julia.h:1325
frame #49: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001061bb8f0, args=0x00007fff5dc649e8, nargs=3) + 816 at gf.c:1708
frame #50: 0x00000001036600a7 sys-debug.dylib`julia_update_20232 + 215 at pkg.jl:45 [opt]
frame #51: 0x00000001036600d9 sys-debug.dylib`jlcall_update_20232 + 9
frame #52: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #53: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 235 at builtins.c:1037
frame #54: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x00000001063c1d10, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #55: 0x0000000101fb9cf1 libjulia-debug.dylib`jl_apply_generic(F=0x00000001063c1cb0, args=0x00007fff5dc64c18, nargs=0) + 529 at gf.c:1684
frame #56: 0x00000001020aba10 libjulia-debug.dylib`jl_apply(f=0x00000001063c1cb0, args=0x00007fff5dc64c18, nargs=0) + 64 at julia.h:1325
frame #57: 0x00000001020ab303 libjulia-debug.dylib`do_call(f=0x00000001063c1cb0, args=0x00000001095ae708, nargs=0, eval0=0x0000000000000000, locals=0x0000000000000000, nl=0, ngensym=0) + 371 at interpreter.c:65
frame #58: 0x00000001020a8325 libjulia-debug.dylib`eval(e=0x0000000108701490, locals=0x0000000000000000, nl=0, ngensym=0) + 2853 at interpreter.c:213
frame #59: 0x00000001020a77cd libjulia-debug.dylib`jl_interpret_toplevel_expr(e=0x0000000108701490) + 45 at interpreter.c:27
frame #60: 0x00000001020ca86b libjulia-debug.dylib`jl_toplevel_eval_flex(e=0x00000001087004d0, fast=1) + 2347 at toplevel.c:527
frame #61: 0x00000001020cb278 libjulia-debug.dylib`jl_toplevel_eval(v=0x00000001087004d0) + 40 at toplevel.c:550
frame #62: 0x0000000101fc89ee libjulia-debug.dylib`jl_toplevel_eval_in(m=0x00000001057f0010, ex=0x00000001087004d0, delay_warn=0) + 782 at builtins.c:579
frame #63: 0x0000000101fc8cb8 libjulia-debug.dylib`jl_f_top_eval(F=0x0000000000000000, args=0x00007fff5dc65508, nargs=2) + 248 at builtins.c:610
frame #64: 0x000000030684687a
frame #65: 0x00000003068463c7
frame #66: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 64 at julia.h:1325
frame #67: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 235 at builtins.c:1037
frame #68: 0x0000000101fb71f0 libjulia-debug.dylib`jl_apply(f=0x0000000108700870, args=0x00007fff5dc65808, nargs=2) + 64 at julia.h:1325
frame #69: 0x0000000101fb9e10 libjulia-debug.dylib`jl_apply_generic(F=0x00000001061b8f30, args=0x00007fff5dc65808, nargs=2) + 816 at gf.c:1708
frame #70: 0x00000003068411cc
frame #71: 0x0000000101fc7f50 libjulia-debug.dylib`jl_apply(f=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #72: 0x0000000101fca9cb libjulia-debug.dylib`jl_trampoline(F=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 235 at builtins.c:1037
frame #73: 0x00000001020b7fc0 libjulia-debug.dylib`jl_apply(f=0x0000000107f2da70, args=0x0000000000000000, nargs=0) + 64 at julia.h:1325
frame #74: 0x00000001020b7f6f libjulia-debug.dylib`start_task + 47 at task.c:240
</code></pre></div> | <p dir="auto">I find that <code class="notranslate">Pkg.udpate()</code> stalls almost every time when updating a package to a new version. This is how a typical output looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of Gadfly...
INFO: Updating cache of Clang...
INFO: Updating cache of Compose...
INFO: Updating cache of Clang...
INFO: Updating SmallInts...
INFO: Updating MPI...
INFO: Updating FloatHigher...
INFO: Updating Hwloc...
INFO: Updating JLD...
INFO: Updating AutoBenchmark...
INFO: Updating PETSc...
INFO: Updating ClusterManagers...
INFO: Updating HDF5...
INFO: Updating Variants...
INFO: Updating HelloWorld...
INFO: Updating WideInts...
INFO: Updating Elemental...
INFO: Updating Persist...
INFO: Computing changes...
INFO: Upgrading Compose: v0.4.0 => v0.4.1
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of Gadfly...
INFO: Updating cache of Clang...
INFO: Updating cache of Compose...
INFO: Updating cache of Clang...
INFO: Updating SmallInts...
INFO: Updating MPI...
INFO: Updating FloatHigher...
INFO: Updating Hwloc...
INFO: Updating JLD...
INFO: Updating AutoBenchmark...
INFO: Updating PETSc...
INFO: Updating ClusterManagers...
INFO: Updating HDF5...
INFO: Updating Variants...
INFO: Updating HelloWorld...
INFO: Updating WideInts...
INFO: Updating Elemental...
INFO: Updating Persist...
INFO: Computing changes...
INFO: Upgrading Compose: v0.4.0 => v0.4.1"><pre class="notranslate"><code class="notranslate">julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of Gadfly...
INFO: Updating cache of Clang...
INFO: Updating cache of Compose...
INFO: Updating cache of Clang...
INFO: Updating SmallInts...
INFO: Updating MPI...
INFO: Updating FloatHigher...
INFO: Updating Hwloc...
INFO: Updating JLD...
INFO: Updating AutoBenchmark...
INFO: Updating PETSc...
INFO: Updating ClusterManagers...
INFO: Updating HDF5...
INFO: Updating Variants...
INFO: Updating HelloWorld...
INFO: Updating WideInts...
INFO: Updating Elemental...
INFO: Updating Persist...
INFO: Computing changes...
INFO: Upgrading Compose: v0.4.0 => v0.4.1
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of Gadfly...
INFO: Updating cache of Clang...
INFO: Updating cache of Compose...
INFO: Updating cache of Clang...
INFO: Updating SmallInts...
INFO: Updating MPI...
INFO: Updating FloatHigher...
INFO: Updating Hwloc...
INFO: Updating JLD...
INFO: Updating AutoBenchmark...
INFO: Updating PETSc...
INFO: Updating ClusterManagers...
INFO: Updating HDF5...
INFO: Updating Variants...
INFO: Updating HelloWorld...
INFO: Updating WideInts...
INFO: Updating Elemental...
INFO: Updating Persist...
INFO: Computing changes...
INFO: Upgrading Compose: v0.4.0 => v0.4.1
</code></pre></div>
<p dir="auto">Here, nothing happens any more. To remedy this, I can e.g. abort, and then manually <code class="notranslate">git fetch</code> this repository. Alternatively, I can <code class="notranslate">Pkg.checkout("Compose"); Pkg.free("Compose")</code>. Both usually remedy the hang.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia> versioninfo()
Julia Version 0.4.3-pre+8
Commit 8402319* (2016-01-09 00:36 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin15.2.0)
CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3"><pre class="notranslate"><code class="notranslate">julia> versioninfo()
Julia Version 0.4.3-pre+8
Commit 8402319* (2016-01-09 00:36 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin15.2.0)
CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3
</code></pre></div> | 1 |
<p dir="auto">I'm using 6to5 on a big app. I like that you guys use regenerator to implement generators, so I'm confused why you care that things get renamed. I have a lot of generator functions, and if I minimize, I see the error "GeneratorFunction renamed?"</p>
<p dir="auto"><a href="http://jlongster.com/s/genfunc-err.png" rel="nofollow">http://jlongster.com/s/genfunc-err.png</a></p>
<p dir="auto">If there isn't a solution to this, this may be a showstopper for me using 6to5. Surely you guys support minification?</p> | <p dir="auto">See <a href="https://github.com/6to5/6to5/blob/55e2010311906a05e56b8c9ecd4e11d497b5e9f8/lib/6to5/transformation/transformers/es6-generators/runtime.js#L39">here</a>.</p>
<p dir="auto">The author of this code tries to be clever and set <code class="notranslate">GF.name</code> in the line above, but this actually isn't possible to do (try it in Chrome or Firefox, it will just ignore the assignment).</p>
<p dir="auto">Having <code class="notranslate">"GeneratorFunction"</code> as the constructor name is mandated by the specification. However, I would argue it's not a very important part of the specification, and that convenient minification is much more important. At the very least, the <code class="notranslate">throw</code> line should be removed, so people who don't care what the constructor name is aren't affected. It's worth noting that Regenerator itself does not care what the constructor name is.</p>
<p dir="auto">However, there is a case for removing the <code class="notranslate">"GeneratorFunction"</code> trick altogether: it would allow for removing the <code class="notranslate">mark()</code> call in the following, improving the readability of the generated code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@smogon-dev:~$ echo 'function* foo() { }' | 6to5
"use strict";
var foo = regeneratorRuntime.mark(function foo() {
return regeneratorRuntime.wrap(function foo$(_context) {
while (true) switch (_context.prev = _context.next) {
case 0:
case "end": return _context.stop();
}
}, foo, this);
});"><pre class="notranslate"><code class="notranslate">root@smogon-dev:~$ echo 'function* foo() { }' | 6to5
"use strict";
var foo = regeneratorRuntime.mark(function foo() {
return regeneratorRuntime.wrap(function foo$(_context) {
while (true) switch (_context.prev = _context.next) {
case 0:
case "end": return _context.stop();
}
}, foo, this);
});
</code></pre></div>
<p dir="auto">Here's the issue which lead to <code class="notranslate">mark</code> being added: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="21928288" data-permission-text="Title is private" data-url="https://github.com/facebook/regenerator/issues/48" data-hovercard-type="issue" data-hovercard-url="/facebook/regenerator/issues/48/hovercard" href="https://github.com/facebook/regenerator/issues/48">facebook/regenerator#48</a>. The primary reason seems to be allowing the <code class="notranslate">co</code> library to perform some magic to distinguish between regular functions and generator functions. I guess I'm not swayed by this because <code class="notranslate">co</code> isn't very useful when you have async functions (like we do).</p> | 1 |
<p dir="auto">I've tried to create a simple example that utilizes workers to send and receive messages, but the main "thread" for lack of a better word fails to receive any kind of message from my worker.</p>
<p dir="auto">According to <code class="notranslate">deno -V</code> I'm using <code class="notranslate">deno 1.5.3</code></p>
<p dir="auto">Below are my test files, run them with <code class="notranslate">deno run --unstable --allow-read test.ts</code></p>
<details>
<summary>test.ts (click to expand)</summary>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const worker = new Worker(new URL('testworker.ts', import.meta.url).href, { type: 'module', deno: true });
worker.onmessage = (e) => {
//This is never executed
console.log('Stuff in worker done:', e.data);
};
worker.postMessage('test');"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">worker</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Worker</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">'testworker.ts'</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">.</span><span class="pl-c1">meta</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">href</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">type</span>: <span class="pl-s">'module'</span><span class="pl-kos">,</span> <span class="pl-c1">deno</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">worker</span><span class="pl-kos">.</span><span class="pl-en">onmessage</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-c">//This is never executed</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">'Stuff in worker done:'</span><span class="pl-kos">,</span> <span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">postMessage</span><span class="pl-kos">(</span><span class="pl-s">'test'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
</details>
<details>
<summary>testworker.ts (click to expand)</summary>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Random from 'https://deno.land/x/[email protected]/Random.js';
async function doStuff(data: any) {
console.log('Doing stuff:', data);
const r = new Random();
const randInt = r.int(200, 2000);
await new Promise((res, _) => setTimeout(() => res(randInt), 1000));
}
//deno-lint-ignore ban-ts-comment
//@ts-ignore
onmessage = async (e) => {
try {
//deno-lint-ignore ban-ts-comment
//@ts-ignore
postMessage(await doStuff(e.data))
console.log('Stuff done:', e.data);
} catch (e) {
console.error('Stuff error', e);
}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-smi">Random</span> <span class="pl-k">from</span> <span class="pl-s">'https://deno.land/x/[email protected]/Random.js'</span><span class="pl-kos">;</span>
<span class="pl-k">async</span> <span class="pl-k">function</span> <span class="pl-en">doStuff</span><span class="pl-kos">(</span><span class="pl-s1">data</span>: <span class="pl-smi">any</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">'Doing stuff:'</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Random</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">randInt</span> <span class="pl-c1">=</span> <span class="pl-s1">r</span><span class="pl-kos">.</span><span class="pl-en">int</span><span class="pl-kos">(</span><span class="pl-c1">200</span><span class="pl-kos">,</span> <span class="pl-c1">2000</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">await</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s1">_</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-en">res</span><span class="pl-kos">(</span><span class="pl-s1">randInt</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">1000</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">//deno-lint-ignore ban-ts-comment</span>
<span class="pl-c">//<span class="pl-k">@ts</span>-ignore</span>
<span class="pl-en">onmessage</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-c">//deno-lint-ignore ban-ts-comment</span>
<span class="pl-c">//<span class="pl-k">@ts</span>-ignore</span>
<span class="pl-en">postMessage</span><span class="pl-kos">(</span><span class="pl-k">await</span> <span class="pl-en">doStuff</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">data</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">'Stuff done:'</span><span class="pl-kos">,</span> <span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">error</span><span class="pl-kos">(</span><span class="pl-s">'Stuff error'</span><span class="pl-kos">,</span> <span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
</details>
<p dir="auto">The output shows the following:</p>
<details>
<summary>Output (click to expand)</summary>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Doing stuff: test
Stuff done: test"><pre class="notranslate"><code class="notranslate">Doing stuff: test
Stuff done: test
</code></pre></div>
</details>
<p dir="auto">As you can see, the line <code class="notranslate">Stuff in worker done:</code> is never logged to the console. Unless I'm doing something wrong that's just not how it's supposed to work as far as I'm aware.</p> | <p dir="auto">Example:</p>
<p dir="auto"><code class="notranslate">worker.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="self.addEventListener('message', ev => {
try {
const {data} = ev as MessageEvent;
console.log('worker <- main:', data);
const value = data > 0 ? data * 2 : undefined;
(self as any).postMessage(value);
console.log('worker -> main:', value);
}
catch (ex) {
console.error(ex);
}
});"><pre class="notranslate"><span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'message'</span><span class="pl-kos">,</span> <span class="pl-s1">ev</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">try</span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span>data<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">ev</span> <span class="pl-k">as</span> <span class="pl-smi">MessageEvent</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">'worker <- main:'</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">data</span> <span class="pl-c1">></span> <span class="pl-c1">0</span> ? <span class="pl-s1">data</span> <span class="pl-c1">*</span> <span class="pl-c1">2</span> : <span class="pl-c1">undefined</span><span class="pl-kos">;</span>
<span class="pl-kos">(</span><span class="pl-s1">self</span> <span class="pl-k">as</span> <span class="pl-smi">any</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">postMessage</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'worker -> main:'</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">ex</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">error</span><span class="pl-kos">(</span><span class="pl-s1">ex</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"><code class="notranslate">main.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const data = 0;
const main = async (): Promise<void> => {
let resolve: (value: number) => void;
const workerUrl = new URL('worker.ts', import.meta.url).href;
const worker = new Worker(workerUrl, {deno: true, type: 'module'});
const handleWorkerMessage = (ev: MessageEvent): void => {
const {data} = ev;
console.log('main <- worker:', data);
resolve(data);
worker.terminate();
};
worker.addEventListener('message', handleWorkerMessage);
worker.addEventListener('messageerror', () => console.log('message error'));
worker.addEventListener('error', () => console.log('error'));
const result = await new Promise(res => {
resolve = res;
worker.postMessage(data);
console.log('main -> worker:', data);
});
console.log(result);
};
if (import.meta.main) main();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-en">main</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos"><</span><span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">></span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> <span class="pl-s1">resolve</span>: <span class="pl-kos">(</span><span class="pl-s1">value</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-smi"><span class="pl-k">void</span></span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">workerUrl</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">URL</span><span class="pl-kos">(</span><span class="pl-s">'worker.ts'</span><span class="pl-kos">,</span> <span class="pl-k">import</span><span class="pl-kos">.</span><span class="pl-c1">meta</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">href</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">worker</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">Worker</span><span class="pl-kos">(</span><span class="pl-s1">workerUrl</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">deno</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">type</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">const</span> <span class="pl-en">handleWorkerMessage</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">ev</span>: <span class="pl-smi">MessageEvent</span><span class="pl-kos">)</span>: <span class="pl-smi"><span class="pl-k">void</span></span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span>data<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">ev</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'main <- worker:'</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">terminate</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'message'</span><span class="pl-kos">,</span> <span class="pl-s1">handleWorkerMessage</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'messageerror'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></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">'message error'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">addEventListener</span><span class="pl-kos">(</span><span class="pl-s">'error'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=></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">'error'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-s1">res</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-s1">resolve</span> <span class="pl-c1">=</span> <span class="pl-s1">res</span><span class="pl-kos">;</span>
<span class="pl-s1">worker</span><span class="pl-kos">.</span><span class="pl-en">postMessage</span><span class="pl-kos">(</span><span class="pl-s1">data</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">'main -> worker:'</span><span class="pl-kos">,</span> <span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">result</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">import</span><span class="pl-kos">.</span><span class="pl-c1">meta</span><span class="pl-kos">.</span><span class="pl-c1">main</span><span class="pl-kos">)</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">When run, it just hangs forever after the worker posts <code class="notranslate">undefined</code> back to the main process because the handler is never invoked:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="example % deno run --unstable --allow-read=. main.ts
main -> worker: 0
worker <- main: 0
worker -> main: undefined
^C"><pre class="notranslate"><code class="notranslate">example % deno run --unstable --allow-read=. main.ts
main -> worker: 0
worker <- main: 0
worker -> main: undefined
^C
</code></pre></div>
<p dir="auto">If—on line 1 of <code class="notranslate">main.ts</code>—<code class="notranslate">data</code> is changed to a number greater than <code class="notranslate">0</code>, the worker will post back a <code class="notranslate">number</code> instead of <code class="notranslate">undefined</code> and everything works as expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="example % deno run --unstable --allow-read=. main.ts
Check file:///Users/jesse/example/main.ts
main -> worker: 1
worker <- main: 1
worker -> main: 2
main <- worker: 2
2"><pre class="notranslate"><code class="notranslate">example % deno run --unstable --allow-read=. main.ts
Check file:///Users/jesse/example/main.ts
main -> worker: 1
worker <- main: 1
worker -> main: 2
main <- worker: 2
2
</code></pre></div>
<p dir="auto">I'm not sure why this behavior is happening, but <code class="notranslate">undefined</code> is a meaningful value, and this seems like a bug.</p> | 1 |
<p dir="auto">Sorry, the best testcase I have right now is Servo master. If you run the binary under gdb and try to break anywhere in the <code class="notranslate">compositing</code> crate, the symbols just don't exist. You can't break by filename either. You can break on mangled symbols, but there are no source positions. Other crates (like <code class="notranslate">script</code>, for example) work perfectly fine.</p> | <h2 dir="auto">Reproduce Steps</h2>
<ol dir="auto">
<li>Create a project using <code class="notranslate">cargo new test_rust</code></li>
<li>Edit the <code class="notranslate">lib.rs</code> file to:</li>
</ol>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub trait HasArea {
fn area(&self) -> f64 {
0f64
}
}
pub fn print_area<T: HasArea>(shape: T) -> f64{
shape.area()
}
fn main() {
struct Square {
side: f64,
}
impl HasArea for Square {
fn area(&self) -> f64 {
self.side * self.side
}
}
let s = Square {
side: 20f64,
};
let b = print_area(s);
println!("Area: {}", b);
} "><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">HasArea</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">area</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">f64</span> <span class="pl-kos">{</span>
<span class="pl-c1">0f64</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">print_area</span><span class="pl-kos"><</span><span class="pl-smi">T</span><span class="pl-kos">:</span> <span class="pl-smi">HasArea</span><span class="pl-kos">></span><span class="pl-kos">(</span><span class="pl-s1">shape</span><span class="pl-kos">:</span> <span class="pl-smi">T</span><span class="pl-kos">)</span> -> <span class="pl-smi">f64</span><span class="pl-kos">{</span>
shape<span class="pl-kos">.</span><span class="pl-en">area</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">struct</span> <span class="pl-smi">Square</span> <span class="pl-kos">{</span>
<span class="pl-c1">side</span><span class="pl-kos">:</span> <span class="pl-smi">f64</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span>
<span class="pl-k">impl</span> <span class="pl-smi">HasArea</span> <span class="pl-k">for</span> <span class="pl-smi">Square</span> <span class="pl-kos">{</span>
<span class="pl-k">fn</span> <span class="pl-en">area</span><span class="pl-kos">(</span><span class="pl-c1">&</span><span class="pl-smi">self</span><span class="pl-kos">)</span> -> <span class="pl-smi">f64</span> <span class="pl-kos">{</span>
<span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">side</span> <span class="pl-c1">*</span> <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-c1">side</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<span class="pl-k">let</span> s = <span class="pl-smi">Square</span> <span class="pl-kos">{</span>
<span class="pl-c1">side</span><span class="pl-kos">:</span> <span class="pl-c1">20f64</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> b = <span class="pl-en">print_area</span><span class="pl-kos">(</span>s<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"Area: {}"</span>, b<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> </pre></div>
<p dir="auto">Basically, it defines a trait and a generic method which accepts it as an argument.<br>
3. Run <code class="notranslate">rustc -g src/lib.rs</code> to compile it and run <code class="notranslate">gdb lib</code> to debug. It could step into the <code class="notranslate">print_area()</code> function and the result is correct as well.<br>
4. If I move the <code class="notranslate">main()</code> function into a standalone file <code class="notranslate">main.rs</code> and referece this library using <code class="notranslate">external crate test_rust</code>, call <code class="notranslate">cargo build</code> to build the library(I already set the debug flag in <code class="notranslate">Cargo.toml</code>) and run <code class="notranslate">rustc -g -extern test_rust=target/libXXXX main.rs</code>. I could not debug into the <code class="notranslate">print_area()</code> function, though the running result is correct. In gdb, it just goes to next line instead of going to the function definition.</p>
<p dir="auto">Please note if I don't use generic for the function, both cases are working as expected.</p>
<h2 dir="auto">OS</h2>
<p dir="auto">Archlinux x86_64</p>
<h2 dir="auto">Rust version</h2>
<p dir="auto">rustc 0.13.0-nightly (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/81eeec0941f936f0f3de881c3991a74f32fe0625/hovercard" href="https://github.com/rust-lang/rust/commit/81eeec0941f936f0f3de881c3991a74f32fe0625"><tt>81eeec0</tt></a> 2014-11-21 23:16:48 +0000)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/81eeec0941f936f0f3de881c3991a74f32fe0625/hovercard" href="https://github.com/rust-lang/rust/commit/81eeec0941f936f0f3de881c3991a74f32fe0625"><tt>81eeec0</tt></a><br>
commit-date: 2014-11-21 23:16:48 +0000<br>
host: x86_64-unknown-linux-gnu<br>
release: 0.13.0-nightly</p> | 1 |
<p dir="auto">while i was working with flutter i came across a situation that i want to access flutter plugin from my native code<br>
example</p>
<blockquote>
<p dir="auto">i set SharedPreferences using flutter code and i want to access this<br>
prefs from java</p>
</blockquote>
<p dir="auto">i achieved that by reading plugin source code and get SharedPreferences name and how the plugin store keys and every thing worked as expected , but i wonder if there easier way that i can use ?</p> | <h2 dir="auto">Steps to Reproduce</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dependencies:
flutter:
sdk: flutter
url_launcher: ^4.0.2"><pre class="notranslate"><code class="notranslate">dependencies:
flutter:
sdk: flutter
url_launcher: ^4.0.2
</code></pre></div>
<p dir="auto">Code sample:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="String url = 'https://baomoi.com/tai-dung-binh-cua-hlv-park-hang-seo/r/28958542.epi';
if (await canLaunch(url)) {
await launch(url, forceWebView: true);
} else {
print('Could not launch $url');
}"><pre class="notranslate"><code class="notranslate">String url = 'https://baomoi.com/tai-dung-binh-cua-hlv-park-hang-seo/r/28958542.epi';
if (await canLaunch(url)) {
await launch(url, forceWebView: true);
} else {
print('Could not launch $url');
}
</code></pre></div>
<p dir="auto">Result : webview did not show</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E/MethodChannel#plugins.flutter.io/url_launcher( 1626): Failed to handle method call
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ContextImpl.startActivity(ContextImpl.java:672)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ContextImpl.startActivity(ContextImpl.java:659)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.plugins.urllauncher.UrlLauncherPlugin.onMethodCall(UrlLauncherPlugin.java:61)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.Looper.loop(Looper.java:135)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ActivityThread.main(ActivityThread.java:5417)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/flutter ( 1626): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 1626): PlatformException(error, Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?, null)
E/flutter ( 1626): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
E/flutter ( 1626): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:292:18)
E/flutter ( 1626): <asynchronous suspension>
E/flutter ( 1626): #2 launch (package:url_launcher/url_launcher.dart:66:19)
E/flutter ( 1626): #3 _ReadingViewState.build.<anonymous closure> (package:cat_dog/modules/dashboard/components/ReadingView.dart:57:23)
E/flutter ( 1626): <asynchronous suspension>
E/flutter ( 1626): #4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14)
E/flutter ( 1626): #5 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:562:30)
E/flutter ( 1626): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter ( 1626): #7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
E/flutter ( 1626): #8 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:175:7)
E/flutter ( 1626): #9 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:315:9)
E/flutter ( 1626): #10 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
E/flutter ( 1626): #11 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
E/flutter ( 1626): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:180:19)
E/flutter ( 1626): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:158:22)
E/flutter ( 1626): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:138:7)
E/flutter ( 1626): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
E/flutter ( 1626): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
E/flutter ( 1626): #17 _invoke1 (dart:ui/hooks.dart:168:13)
E/flutter ( 1626): #18 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5)"><pre class="notranslate"><code class="notranslate">E/MethodChannel#plugins.flutter.io/url_launcher( 1626): Failed to handle method call
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ContextImpl.startActivity(ContextImpl.java:672)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ContextImpl.startActivity(ContextImpl.java:659)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.content.ContextWrapper.startActivity(ContextWrapper.java:331)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.plugins.urllauncher.UrlLauncherPlugin.onMethodCall(UrlLauncherPlugin.java:61)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.os.Looper.loop(Looper.java:135)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at android.app.ActivityThread.main(ActivityThread.java:5417)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/MethodChannel#plugins.flutter.io/url_launcher( 1626): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/flutter ( 1626): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 1626): PlatformException(error, Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?, null)
E/flutter ( 1626): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
E/flutter ( 1626): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:292:18)
E/flutter ( 1626): <asynchronous suspension>
E/flutter ( 1626): #2 launch (package:url_launcher/url_launcher.dart:66:19)
E/flutter ( 1626): #3 _ReadingViewState.build.<anonymous closure> (package:cat_dog/modules/dashboard/components/ReadingView.dart:57:23)
E/flutter ( 1626): <asynchronous suspension>
E/flutter ( 1626): #4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:507:14)
E/flutter ( 1626): #5 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:562:30)
E/flutter ( 1626): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter ( 1626): #7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
E/flutter ( 1626): #8 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:175:7)
E/flutter ( 1626): #9 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:315:9)
E/flutter ( 1626): #10 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
E/flutter ( 1626): #11 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
E/flutter ( 1626): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:180:19)
E/flutter ( 1626): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:158:22)
E/flutter ( 1626): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:138:7)
E/flutter ( 1626): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
E/flutter ( 1626): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
E/flutter ( 1626): #17 _invoke1 (dart:ui/hooks.dart:168:13)
E/flutter ( 1626): #18 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Analyzing cat_dog...
No issues found! (ran in 16.7s)"><pre class="notranslate"><code class="notranslate">Analyzing cat_dog...
No issues found! (ran in 16.7s)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.5 17F77, locale en-VN)
• Flutter version 1.0.0 at /Users/mac-lt108/Documents/flutter
• Framework revision 5391447fae (12 days ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/mac-lt108/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/mac-lt108/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
• All Android licenses accepted.
[!] iOS toolchain - develop for iOS devices (Xcode 9.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3, Build version 9E145
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update with Brew, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] Connected device (2 available)
• Google Nexus 5X, 6 0 0, API 23, 1080x1920 • 192.168.56.102:5555 • android-x86 • Android 6.0 (API 23)
• IBL020 • 4afcab750f170bacf52696158e2fbc69295b79b9 • ios • iOS 11.2.1
! Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.5 17F77, locale en-VN)
• Flutter version 1.0.0 at /Users/mac-lt108/Documents/flutter
• Framework revision 5391447fae (12 days ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/mac-lt108/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/mac-lt108/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
• All Android licenses accepted.
[!] iOS toolchain - develop for iOS devices (Xcode 9.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3, Build version 9E145
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update with Brew, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] Connected device (2 available)
• Google Nexus 5X, 6 0 0, API 23, 1080x1920 • 192.168.56.102:5555 • android-x86 • Android 6.0 (API 23)
• IBL020 • 4afcab750f170bacf52696158e2fbc69295b79b9 • ios • iOS 11.2.1
! Doctor found issues in 1 category.
</code></pre></div> | 0 |
<p dir="auto">The following code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
[].iter();
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">iter</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">results in the following compiler error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.rs:2:1: 2:3 error: internal compiler error: borrow-vec associated with bad sty: &ty_err
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
test.rs:2 [].iter();
^~
task 'rustc' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/libsyntax/diagnostic.rs:76
task '<main>' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/librustc/lib.rs:396"><pre class="notranslate"><code class="notranslate">test.rs:2:1: 2:3 error: internal compiler error: borrow-vec associated with bad sty: &ty_err
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
test.rs:2 [].iter();
^~
task 'rustc' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/libsyntax/diagnostic.rs:76
task '<main>' failed at 'explicit failure', /home/sami/Programmes/rust-git/src/rust/src/librustc/lib.rs:396
</code></pre></div>
<p dir="auto">I’m using revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/df41115213e851b9f23dfea3d6782dea5243a5d4/hovercard" href="https://github.com/rust-lang/rust/commit/df41115213e851b9f23dfea3d6782dea5243a5d4"><tt>df41115</tt></a> (2013-12-01), with <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/c6e934f44797fd482d79f7be481cac12a9804046/hovercard" href="https://github.com/rust-lang/rust/commit/c6e934f44797fd482d79f7be481cac12a9804046"><tt>c6e934f</tt></a> cherry-picked to make <code class="notranslate">make install</code> work (pull request 10753, now merged into master).</p> | <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
let v = &[];
let it = v.iter();
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">let</span> v = <span class="pl-c1">&</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">let</span> it = v<span class="pl-kos">.</span><span class="pl-en">iter</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="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &ty_err
vec-ice.rs:3 let it = v.iter();
^"><pre class="notranslate"><code class="notranslate">vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &ty_err
vec-ice.rs:3 let it = v.iter();
^
</code></pre></div>
<p dir="auto">(Doesn't happen with <code class="notranslate">.slice</code>.)</p> | 1 |
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=willisblackburn" rel="nofollow">Willis Blackburn</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9068?redirect=false" rel="nofollow">SPR-9068</a></strong> and commented</p>
<p dir="auto">I'm trying to implement RFC 2324 but cannot return HTTP response code 418 because it's not defined in the HttpStatus enumeration.</p>
<p dir="auto">More generally, the enumeration of specific status values precludes the use of any others.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 GA</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102304" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11418" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11418/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11418">#11418</a> RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum (<em><strong>"duplicates"</strong></em>)</li>
</ul> | <p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=springboy" rel="nofollow">Rick Evans</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2566?redirect=false" rel="nofollow">SPR-2566</a></strong> and commented</p>
<p dir="auto">(c.f. comment from Matt Raible on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398068795" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7043" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7043/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7043">#7043</a>)</p>
<p dir="auto">It would be cool if this tag supported a "key" attribute so you could read directly from your messageSource. For example:</p>
<p dir="auto"><form:label path="firstName" key="user.firstName"/></p>
<p dir="auto">Just a thought.</p>
<p dir="auto">Matt</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0 RC3</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="398077042" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8047" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8047/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8047">#8047</a> Provide comprehensive I18N support for the Spring form tag library. (<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="398066605" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6768" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6768/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6768">#6768</a> Add MessageSource support to HTML taglib (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">15 votes, 12 watchers</p> | 0 |
<p dir="auto">Installed the react development tools to chrome Version 89.0.4389.114 (Official Build) (64-bit)<br>
Open my development version of my react app localhost:3000 with several components and I see the react icon<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7073595/113520660-a1463a80-9562-11eb-9b6d-82919344c146.png"><img src="https://user-images.githubusercontent.com/7073595/113520660-a1463a80-9562-11eb-9b6d-82919344c146.png" alt="image" style="max-width: 100%;"></a><br>
Go to the inspect and component to and nothing is showing<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7073595/113520674-ccc92500-9562-11eb-87d0-5068abc150e1.png"><img src="https://user-images.githubusercontent.com/7073595/113520674-ccc92500-9562-11eb-87d0-5068abc150e1.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I'm using this chode <a href="https://codesandbox.io/s/react-devtools-dk9gj?fontsize=14" rel="nofollow">https://codesandbox.io/s/react-devtools-dk9gj?fontsize=14</a><br>
and when you open this in chrome it works.<br>
I open it from localhost and it does not work.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7073595/113520835-d2733a80-9563-11eb-88cb-7bb6d6b30ade.png"><img src="https://user-images.githubusercontent.com/7073595/113520835-d2733a80-9563-11eb-88cb-7bb6d6b30ade.png" alt="image" style="max-width: 100%;"></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""react": "16.8.6",
"react-dom": "16.8.6",
"react-scripts": "^4.0.3""><pre class="notranslate"><code class="notranslate">"react": "16.8.6",
"react-dom": "16.8.6",
"react-scripts": "^4.0.3"
</code></pre></div>
<p dir="auto">npm --version 7.6.3<br>
nodejs v14.16.0</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li></li>
<li></li>
</ol>
<p dir="auto">Link to code example:</p>
<h2 dir="auto">The current behavior</h2>
<h2 dir="auto">The expected behavior</h2> | <p dir="auto">When I use DevTools to select an element on the page, it can't jump/find it.<br>
It also doesn't show it in the Components page.<br>
This was checked by finding its parent and checking the children, non of the newly generated ones are there.<br>
As a probably related bug Profiler doesn't show/record the changes.</p>
<p dir="auto">React version: 16.13.1<br>
React-dom version: 16.13.1<br>
Parcel: 2.0.0-beta.1</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li>Have a parent element</li>
<li>Have a child element (A)</li>
<li>Using conditional rendering (<code class="notranslate">condition ? A : B</code>) "hide" A</li>
<li>B now shows</li>
<li>Try and select B using Chrome Dev Tools's "Select an element in the page to inspect it"</li>
<li>Jumps nowhere/Can't find it manually in the list.</li>
</ol>
<h2 dir="auto">Example</h2>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24227350/97173781-06faf300-1789-11eb-9f66-4c6146d1dc8b.gif"><img src="https://user-images.githubusercontent.com/24227350/97173781-06faf300-1789-11eb-9f66-4c6146d1dc8b.gif" alt="2020-10-26_12-38-43" data-animated-image="" style="max-width: 100%;"></a><br>
In this example, I demonstrate that it works on the Search Bar (light grey bar) which is the TextField=>InputBase tree, and the Container that contains the search & images and how hovering over the image doesn't do anything.<br>
I then click on the image and nothing happens & the state panel on the right of Dev Tools empties itself.</p>
<h2 dir="auto">The current behaviour</h2>
<p dir="auto">Can't find newly rendered components in React Dev Tools Components panel</p>
<h2 dir="auto">The expected behavior</h2>
<p dir="auto">Being able to find the newly rendered components in React Dev Tools Components panel</p> | 1 |
<p dir="auto">In other programs, pressing <strong>Ctrl + Del</strong> on the end of a line would delete newline characters and bring the next line after the cursor.</p>
<p dir="auto">Example in Sublime Text:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/164ef56231d8ea290d4b5a0109bedb00b4a5eab5999d0ede7a0ef83a8e4a0727/68747470733a2f2f732e6b7076702e696e2f676966732f57665661432e676966"><img src="https://camo.githubusercontent.com/164ef56231d8ea290d4b5a0109bedb00b4a5eab5999d0ede7a0ef83a8e4a0727/68747470733a2f2f732e6b7076702e696e2f676966732f57665661432e676966" alt="" data-animated-image="" data-canonical-src="https://s.kpvp.in/gifs/WfVaC.gif" style="max-width: 100%;"></a></p>
<p dir="auto">(<a href="https://s.kpvp.in/gifs/WfVaC.gif" rel="nofollow">https://s.kpvp.in/gifs/WfVaC.gif</a>)</p> | <p dir="auto">[Enter steps to reproduce below:]</p>
<ol dir="auto">
<li>...</li>
<li>...</li>
</ol>
<p dir="auto"><strong>Atom Version</strong>: 0.211.0<br>
<strong>System</strong>: Microsoft Windows 8.1 Pro<br>
<strong>Thrown From</strong>: Atom Core</p>
<h3 dir="auto">Stack Trace</h3>
<p dir="auto">Uncaught Error: Cannot find module './context-menu'<br>
Error: Cannot find module './context-menu'<br>
at Function.Module._resolveFilename (module.js:328:15)<br>
at Function.Module._load (module.js:270:25)<br>
at Module.require (module.js:357:17)<br>
at require (module.js:376:17)<br>
at BrowserWindow. (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)<br>
at emitOne (events.js:77:13)<br>
at BrowserWindow.emit (events.js:166:7)<br>
at callFunction (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)<br>
at EventEmitter. (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)<br>
at emitMany (events.js:108:13)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)"><pre class="notranslate"><code class="notranslate">At C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77
Error: Cannot find module './context-menu'
Error: Cannot find module './context-menu'
at Function.Module._resolveFilename (module.js:328:15)
at Function.Module._load (module.js:270:25)
at Module.require (module.js:357:17)
at require (module.js:376:17)
at BrowserWindow.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\browser\atom-window.js:152:27)
at emitOne (events.js:77:13)
at BrowserWindow.emit (events.js:166:7)
at callFunction (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:116:18)
at EventEmitter.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\browser\lib\rpc-server.js:208:14)
at emitMany (events.js:108:13)
at metaToValue (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:77:15)
at BrowserWindow.RemoteMemberFunction [as emit] (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\atom.asar\renderer\api\lib\remote.js:111:26)
at ContextMenuManager.module.exports.ContextMenuManager.showForEvent (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\context-menu-manager.js:170:31)
at HTMLDocument.<anonymous> (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\window-event-handler.js:150:33)
at HTMLDocument.handler (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\src\space-pen-extensions.js:112:34)
at HTMLDocument.jQuery.event.dispatch (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4681:9)
at HTMLDocument.elemData.handle (C:\Users\jaideepdas\AppData\Local\atom\app-0.211.0\resources\app.asar\node_modules\space-pen\vendor\jquery.js:4359:46)
</code></pre></div>
<h3 dir="auto">Commands</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -0:36.8.0 core:move-up (atom-text-editor.editor.is-focused)
-0:36.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
-0:35.9.0 editor:newline (atom-text-editor.editor.is-focused)
8x -0:32.9.0 core:move-up (atom-text-editor.editor.is-focused)
-0:31.2.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
-0:29.9.0 core:copy (atom-text-editor.editor.is-focused)
8x -0:29.6.0 core:move-down (atom-text-editor.editor.is-focused)
-0:28.1.0 core:paste (atom-text-editor.editor.is-focused)
17x -0:27.3.0 core:select-left (atom-text-editor.editor.is-focused)
-0:25.7.0 core:select-right (atom-text-editor.editor.is-focused)
-0:25.3.0 core:backspace (atom-text-editor.editor.is-focused)
2x -0:24.6.0 core:move-left (atom-text-editor.editor.is-focused)
-0:19.9.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
-0:13.6.0 core:move-left (atom-text-editor.editor.is-focused)
3x -0:11 core:undo (atom-text-editor.editor.is-focused)
3x -0:09.4.0 core:save (atom-text-editor.editor.is-focused)"><pre class="notranslate"><code class="notranslate"> -0:36.8.0 core:move-up (atom-text-editor.editor.is-focused)
-0:36.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
-0:35.9.0 editor:newline (atom-text-editor.editor.is-focused)
8x -0:32.9.0 core:move-up (atom-text-editor.editor.is-focused)
-0:31.2.0 editor:select-to-end-of-line (atom-text-editor.editor.is-focused)
-0:29.9.0 core:copy (atom-text-editor.editor.is-focused)
8x -0:29.6.0 core:move-down (atom-text-editor.editor.is-focused)
-0:28.1.0 core:paste (atom-text-editor.editor.is-focused)
17x -0:27.3.0 core:select-left (atom-text-editor.editor.is-focused)
-0:25.7.0 core:select-right (atom-text-editor.editor.is-focused)
-0:25.3.0 core:backspace (atom-text-editor.editor.is-focused)
2x -0:24.6.0 core:move-left (atom-text-editor.editor.is-focused)
-0:19.9.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
-0:13.6.0 core:move-left (atom-text-editor.editor.is-focused)
3x -0:11 core:undo (atom-text-editor.editor.is-focused)
3x -0:09.4.0 core:save (atom-text-editor.editor.is-focused)
</code></pre></div>
<h3 dir="auto">Config</h3>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
]
},
"editor": {
"invisibles": {},
"fontSize": 15
}
}"><pre class="notranslate">{
<span class="pl-ent">"core"</span>: {
<span class="pl-ent">"themes"</span>: [
<span class="pl-s"><span class="pl-pds">"</span>one-light-ui<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>one-light-syntax<span class="pl-pds">"</span></span>
]
},
<span class="pl-ent">"editor"</span>: {
<span class="pl-ent">"invisibles"</span>: {},
<span class="pl-ent">"fontSize"</span>: <span class="pl-c1">15</span>
}
}</pre></div>
<h3 dir="auto">Installed Packages</h3>
<div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User
atom-beautify, v0.28.5
# Dev
No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span>
atom<span class="pl-k">-</span>beautify, v0.<span class="pl-ii">28</span>.<span class="pl-ii">5</span>
<span class="pl-c"><span class="pl-c">#</span> Dev</span>
<span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> | 0 |
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Currently if we render a slot for multiple times (eg. inside a <code class="notranslate">v-for</code> loop), we'll get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Duplicate presence of slot "${name}" found in the same render tree - this will likely cause render errors."><pre class="notranslate"><code class="notranslate">Duplicate presence of slot "${name}" found in the same render tree - this will likely cause render errors.
</code></pre></div>
<p dir="auto">I know it's intentional to prevent render errors (like losing correct data binding) but consider the following use case: I have a <code class="notranslate">v-breadcrumbs</code> component which has a default item separator of a text node <code class="notranslate">/</code>, and I want to allows users to specify their own separators which can be anything, like an <code class="notranslate"><v-icon></code> component.</p>
<p dir="auto">Currently if I want to make it work, I have to define a scoped slot in the <code class="notranslate">v-breadcrumbs</code> component and bind nothing to it:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<slot name="sep" v-bind="{}">/</slot>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">slot</span> <span class="pl-c1">name</span>="<span class="pl-s">sep</span>" <span class="pl-c1">v-bind</span>="<span class="pl-s">{}</span>"<span class="pl-kos">></span>/<span class="pl-kos"></</span><span class="pl-ent">slot</span><span class="pl-kos">></span></pre></div>
<p dir="auto">And component users must define <code class="notranslate">slot-scope</code> on it and not use anything from it:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="<v-breadcrumbs>
<v-icon slot="sep" slot-scope="_" name="angle-right"/>
</v-breadcrumbs>"><pre class="notranslate"><span class="pl-kos"><</span><span class="pl-ent">v-breadcrumbs</span><span class="pl-kos">></span>
<span class="pl-kos"><</span><span class="pl-ent">v-icon</span> <span class="pl-c1">slot</span>="<span class="pl-s">sep</span>" <span class="pl-c1">slot-scope</span>="<span class="pl-s">_</span>" <span class="pl-c1">name</span>="<span class="pl-s">angle-right</span>"/>
<span class="pl-kos"></</span><span class="pl-ent">v-breadcrumbs</span><span class="pl-kos">></span></pre></div>
<p dir="auto">And currently Vue is using slots as fallbacks for scoped slots with the same name. Whether the users can use a slot doesn't rely on if they want data from slot scope, but on whether the slot is gonna be rendered for multiple times inside the component self, this may raise more confusion for our users (like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="322432196" data-permission-text="Title is private" data-url="https://github.com/vuejs/vue/issues/8175" data-hovercard-type="issue" data-hovercard-url="/vuejs/vue/issues/8175/hovercard" href="https://github.com/vuejs/vue/issues/8175">#8175</a>).</p>
<p dir="auto">So why don't we just get rid of such caveats and let a slot to be rendered more than once? We can clone them on duplication to prevent render errors as we already run the scoped slot function each time anyway. This makes the logic a lot simpler for users IMO: if we do not expect to use data from the slot scope, just use a slot, otherwise we'll always have to declare <code class="notranslate">slot-scope</code> to create the binding.</p>
<p dir="auto">In addition, this would make documenting the (scoped) slots of a component more consistent, we just declare the data structure for a slot scope and users can decide if they want some data to bind to the <code class="notranslate">slot-scope</code> and don't need to care about how many times it will be rendered.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">No additional API needed, just clone the slot nodes upon render and remove the waring about duplicated slots.</p>
<p dir="auto">It may be implemented in userland today in a quite hacky way, see: <a href="https://codesandbox.io/s/lp11y2wovz" rel="nofollow">https://codesandbox.io/s/lp11y2wovz</a></p>
<p dir="auto">I just tweaked the <code class="notranslate">cloneVNode</code> function from the Vue core a little bit and it seemed to be working as expected using render function (without losing reactivity and event binding). There maybe some other edge situations I missed so correct me if it's not such trivial.</p> | <h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">github missing repository vuejs/vue-ssr-webpack-plugin, i update webpack to version 5 and have error<br>
[vue-server-renderer-webpack-plugin] webpack config <code class="notranslate">output.libraryTarget</code> should be "commonjs2".</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">in my output.libraryTarget is libraryTarget: 'commonjs2'</p> | 0 |
<p dir="auto">rename a file. when the commond pane disappeared ,click other fields make the pane lose focus ,then ...<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/7068058/5485917/b564cb36-86db-11e4-89df-315fd954d9be.png"><img src="https://cloud.githubusercontent.com/assets/7068058/5485917/b564cb36-86db-11e4-89df-315fd954d9be.png" alt="image" style="max-width: 100%;"></a></p> | <p dir="auto">If you click away while doing "Add File" (or rename, etc), the dialog box collapses but remains visible. I think the dialog box should continue to be open even when you click away.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8ade1d76b1f105b83d15dcff7f63b89c8f4677db3c93ca9f04fefde17b30dc5b/687474703a2f2f636c2e6c792f696d6167652f306230783073314c315a335a2f53637265656e2532305265636f7264696e67253230323031342d31322d3137253230617425323030372e3333253230504d2e676966"><img src="https://camo.githubusercontent.com/8ade1d76b1f105b83d15dcff7f63b89c8f4677db3c93ca9f04fefde17b30dc5b/687474703a2f2f636c2e6c792f696d6167652f306230783073314c315a335a2f53637265656e2532305265636f7264696e67253230323031342d31322d3137253230617425323030372e3333253230504d2e676966" alt="" data-animated-image="" data-canonical-src="http://cl.ly/image/0b0x0s1L1Z3Z/Screen%20Recording%202014-12-17%20at%2007.33%20PM.gif" style="max-width: 100%;"></a></p> | 1 |
<p dir="auto">when I run :<br>
<code class="notranslate">bazel build --config=opt --config=cuda --verbose_failures //tensorflow/tools/pip_package:build_pip_package</code></p>
<p dir="auto">INFO: Found 1 target...<br>
ERROR: /home/qs/.cache/bazel/<em>bazel_qs/081cd1dbca77dcff65c775e7e860e873/external/farmhash_archive/BUILD.bazel:12:1: C++ compilation of rule '@farmhash_archive//:farmhash' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command<br>
(cd /home/qs/.cache/bazel/<em>bazel_qs/081cd1dbca77dcff65c775e7e860e873/execroot/tensorflow && <br>
exec env - <br>
LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64/:/usr/lib32/:/usr/lib/x86_64-linux-gnu/::/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64 <br>
PATH=/bin:/usr/bin:/home/qs/mysoft/jdk1.8/bin <br>
external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections -g0 '-std=c++11' -MD -MF bazel-out/host/bin/external/farmhash_archive/<em>objs/farmhash/external/farmhash_archive/src/farmhash.d '-frandom-seed=bazel-out/host/bin/external/farmhash_archive/<em>objs/farmhash/external/farmhash_archive/src/farmhash.o' -iquote external/farmhash_archive -iquote bazel-out/host/genfiles/external/farmhash_archive -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/farmhash_archive/src -isystem bazel-out/host/genfiles/external/farmhash_archive/src -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE</em></em>="redacted"' '-D__TIMESTAMP</em></em>="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c external/farmhash_archive/src/farmhash.cc -o bazel-out/host/bin/external/farmhash_archive/_objs/farmhash/external/farmhash_archive/src/farmhash.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.<br>
gcc: error: unrecognized command line option '-fno-canonical-system-headers'<br>
Target //tensorflow/tools/pip_package:build_pip_package failed to build<br>
INFO: Elapsed time: 1.003s, Critical Path: 0.49s</p>
<p dir="auto">How to solve this problem?</p> | <p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>Have I written custom code (as opposed to using a stock example script provided in TensorFlow): no</li>
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 10.13.6</li>
<li>TensorFlow installed from (source or binary): from pip install</li>
<li>TensorFlow version (use command below): v2.0.0-beta0-16-g1d91213fe7 2.0.0-beta1</li>
<li>Python version: v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14</li>
</ul>
<p dir="auto"><strong>Describe the current behavior</strong></p>
<p dir="auto">Assume that I have already made a previous call of <code class="notranslate">tf.concat</code>. When calling again <code class="notranslate">tf.concat</code> with a <code class="notranslate">values</code> argument which is either a list of <code class="notranslate">Tensor</code> objects of length 1 or a single <code class="notranslate">Tensor</code> object, I get the following error:</p>
<p dir="auto"><code class="notranslate">Duplicate node name in graph: 'concat'</code></p>
<p dir="auto">It seems to be a naming conflict.</p>
<p dir="auto"><strong>Describe the expected behavior</strong></p>
<p dir="auto">From <a href="https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/concat?hl=en" rel="nofollow">tf.concat documentation</a>:</p>
<blockquote>
<p dir="auto"><code class="notranslate">values</code>: A list of <code class="notranslate">Tensor</code> objects or a single <code class="notranslate">Tensor</code>.</p>
</blockquote>
<p dir="auto"><code class="notranslate">tf.concat</code> should not throw an error when <code class="notranslate">values</code> is a list of length 1 or a single <code class="notranslate">Tensor</code> object and no naming conflict should rise.</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 tensorflow as tf
from tensorflow.keras import Input
print('Using Tensorflow version {} (git version {})'.format(tf.version.VERSION, tf.version.GIT_VERSION))
i = Input(shape=3)
j = Input(shape=4)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat(i, axis=-1))
except Exception as e:
print(type(e))
print(e)"><pre class="notranslate"><code class="notranslate">import tensorflow as tf
from tensorflow.keras import Input
print('Using Tensorflow version {} (git version {})'.format(tf.version.VERSION, tf.version.GIT_VERSION))
i = Input(shape=3)
j = Input(shape=4)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i, j], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat([i], axis=-1))
except Exception as e:
print(type(e))
print(e)
try:
print(tf.concat(i, axis=-1))
except Exception as e:
print(type(e))
print(e)
</code></pre></div>
<p dir="auto">which outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using Tensorflow version 2.0.0-beta1 (git version v2.0.0-beta0-16-g1d91213fe7)
Tensor("concat:0", shape=(None, 7), dtype=float32)
Tensor("concat_1:0", shape=(None, 7), dtype=float32)
<class 'ValueError'>
Duplicate node name in graph: 'concat'
<class 'ValueError'>
Duplicate node name in graph: 'concat'"><pre class="notranslate"><code class="notranslate">Using Tensorflow version 2.0.0-beta1 (git version v2.0.0-beta0-16-g1d91213fe7)
Tensor("concat:0", shape=(None, 7), dtype=float32)
Tensor("concat_1:0", shape=(None, 7), dtype=float32)
<class 'ValueError'>
Duplicate node name in graph: 'concat'
<class 'ValueError'>
Duplicate node name in graph: 'concat'
</code></pre></div>
<p dir="auto">If I comment both <code class="notranslate">print(tf.concat([i, j], axis=-1))</code> lines then <code class="notranslate">print(tf.concat([i], axis=-1))</code> does not fail, but <code class="notranslate">print(tf.concat(i, axis=-1))</code> do. If I also comment <code class="notranslate">print(tf.concat([i], axis=-1))</code> then <code class="notranslate">print(tf.concat(i, axis=-1))</code> resolves without error.</p>
<p dir="auto"><strong>Other info / logs</strong></p>
<p dir="auto">Full error log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1550 try:
-> 1551 c_op = c_api.TF_FinishOperation(op_desc)
1552 except errors.InvalidArgumentError as e:
InvalidArgumentError: Duplicate node name in graph: 'concat'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-2-bd15a2b20363> in <module>
----> 1 print(tf.concat(i, axis=-1))
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in concat(values, axis, name)
1282 dtype=dtypes.int32).get_shape().assert_is_compatible_with(
1283 tensor_shape.scalar())
-> 1284 return identity(values[0], name=scope)
1285 return gen_array_ops.concat_v2(values=values, axis=axis, name=name)
1286
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in identity(input, name)
84 return copied
85 else:
---> 86 ret = gen_array_ops.identity(input, name=name)
87 # Propagate handle data for happier shape inference for resource variables.
88 if hasattr(input, "_handle_data"):
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py in identity(input, name)
4251 # Add nodes to the TensorFlow graph.
4252 _, _, _op = _op_def_lib._apply_op_helper(
-> 4253 "Identity", input=input, name=name)
4254 _result = _op.outputs[:]
4255 _inputs_flat = _op.inputs
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py in _apply_op_helper(self, op_type_name, name, **keywords)
786 op = g.create_op(op_type_name, inputs, dtypes=None, name=scope,
787 input_types=input_types, attrs=attr_protos,
--> 788 op_def=op_def)
789 return output_structure, op_def.is_stateful, op
790
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py in create_op(***failed resolving arguments***)
463 return super(FuncGraph, self).create_op(
464 op_type, inputs, dtypes, input_types, name, attrs, op_def,
--> 465 compute_device=compute_device)
466
467 def capture(self, tensor, name=None):
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py in new_func(*args, **kwargs)
505 'in a future version' if date is None else ('after %s' % date),
506 instructions)
--> 507 return func(*args, **kwargs)
508
509 doc = _add_deprecated_arg_notice_to_docstring(
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in create_op(***failed resolving arguments***)
3294 input_types=input_types,
3295 original_op=self._default_original_op,
-> 3296 op_def=op_def)
3297 self._create_op_helper(ret, compute_device=compute_device)
3298 return ret
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in __init__(self, node_def, g, inputs, output_types, control_inputs, input_types, original_op, op_def)
1712 op_def, inputs, node_def.attr)
1713 self._c_op = _create_c_op(self._graph, node_def, grouped_inputs,
-> 1714 control_input_ops)
1715
1716 # Initialize self._outputs.
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1552 except errors.InvalidArgumentError as e:
1553 # Convert to ValueError for backwards compatibility.
-> 1554 raise ValueError(str(e))
1555
1556 return c_op
ValueError: Duplicate node name in graph: 'concat'"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1550 try:
-> 1551 c_op = c_api.TF_FinishOperation(op_desc)
1552 except errors.InvalidArgumentError as e:
InvalidArgumentError: Duplicate node name in graph: 'concat'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-2-bd15a2b20363> in <module>
----> 1 print(tf.concat(i, axis=-1))
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in concat(values, axis, name)
1282 dtype=dtypes.int32).get_shape().assert_is_compatible_with(
1283 tensor_shape.scalar())
-> 1284 return identity(values[0], name=scope)
1285 return gen_array_ops.concat_v2(values=values, axis=axis, name=name)
1286
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py in identity(input, name)
84 return copied
85 else:
---> 86 ret = gen_array_ops.identity(input, name=name)
87 # Propagate handle data for happier shape inference for resource variables.
88 if hasattr(input, "_handle_data"):
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py in identity(input, name)
4251 # Add nodes to the TensorFlow graph.
4252 _, _, _op = _op_def_lib._apply_op_helper(
-> 4253 "Identity", input=input, name=name)
4254 _result = _op.outputs[:]
4255 _inputs_flat = _op.inputs
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py in _apply_op_helper(self, op_type_name, name, **keywords)
786 op = g.create_op(op_type_name, inputs, dtypes=None, name=scope,
787 input_types=input_types, attrs=attr_protos,
--> 788 op_def=op_def)
789 return output_structure, op_def.is_stateful, op
790
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/func_graph.py in create_op(***failed resolving arguments***)
463 return super(FuncGraph, self).create_op(
464 op_type, inputs, dtypes, input_types, name, attrs, op_def,
--> 465 compute_device=compute_device)
466
467 def capture(self, tensor, name=None):
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py in new_func(*args, **kwargs)
505 'in a future version' if date is None else ('after %s' % date),
506 instructions)
--> 507 return func(*args, **kwargs)
508
509 doc = _add_deprecated_arg_notice_to_docstring(
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in create_op(***failed resolving arguments***)
3294 input_types=input_types,
3295 original_op=self._default_original_op,
-> 3296 op_def=op_def)
3297 self._create_op_helper(ret, compute_device=compute_device)
3298 return ret
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in __init__(self, node_def, g, inputs, output_types, control_inputs, input_types, original_op, op_def)
1712 op_def, inputs, node_def.attr)
1713 self._c_op = _create_c_op(self._graph, node_def, grouped_inputs,
-> 1714 control_input_ops)
1715
1716 # Initialize self._outputs.
~/Documents/beta1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1552 except errors.InvalidArgumentError as e:
1553 # Convert to ValueError for backwards compatibility.
-> 1554 raise ValueError(str(e))
1555
1556 return c_op
ValueError: Duplicate node name in graph: 'concat'
</code></pre></div> | 0 |
<h2 dir="auto">Example</h2>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { readJson } from 'https://deno.land/std/fs/mod.ts'
const f = await readJson('./settings.json')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">readJson</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'https://deno.land/std/fs/mod.ts'</span>
<span class="pl-k">const</span> <span class="pl-s1">f</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">readJson</span><span class="pl-kos">(</span><span class="pl-s">'./settings.json'</span><span class="pl-kos">)</span></pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run https://raw.githubusercontent.com/SimonSiefke/deno-sample/master/src/index.ts"><pre class="notranslate">deno run https://raw.githubusercontent.com/SimonSiefke/deno-sample/master/src/index.ts</pre></div>
<h2 dir="auto">Expected behavior:</h2>
<p dir="auto">It compiles without errors.</p>
<h2 dir="auto">Current behavior:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Compile https://raw.githubusercontent.com/SimonSiefke/deno-sample/master/src/index.ts
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:90:16
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:101:10
error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(originSrcFilePath, dest, type);
~~~~~~~
at https://deno.land/std/fs/copy.ts:114:14
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:119:16
error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(originSrcFilePath, dest, type);
~~~~~~~~~~~
at https://deno.land/std/fs/copy.ts:132:8
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:137:10
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:157:16
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:185:10
error TS2339: Property 'link' does not exist on type 'typeof Deno'.
await Deno.link(src, dest);
~~~~
at https://deno.land/std/fs/ensure_link.ts:28:14
error TS2339: Property 'linkSync' does not exist on type 'typeof Deno'.
Deno.linkSync(src, dest);
~~~~~~~~
at https://deno.land/std/fs/ensure_link.ts:52:8
error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(src, dest, srcFilePathType);
~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:31:14
error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(src, dest, srcFilePathType);
~~~~~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:58:8
Found 12 errors."><pre class="notranslate"><code class="notranslate">Compile https://raw.githubusercontent.com/SimonSiefke/deno-sample/master/src/index.ts
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:90:16
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:101:10
error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(originSrcFilePath, dest, type);
~~~~~~~
at https://deno.land/std/fs/copy.ts:114:14
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, statInfo.atime, statInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:119:16
error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(originSrcFilePath, dest, type);
~~~~~~~~~~~
at https://deno.land/std/fs/copy.ts:132:8
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, statInfo.atime, statInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:137:10
error TS2339: Property 'utime' does not exist on type 'typeof Deno'.
await Deno.utime(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~
at https://deno.land/std/fs/copy.ts:157:16
error TS2339: Property 'utimeSync' does not exist on type 'typeof Deno'.
Deno.utimeSync(dest, srcStatInfo.atime, srcStatInfo.mtime);
~~~~~~~~~
at https://deno.land/std/fs/copy.ts:185:10
error TS2339: Property 'link' does not exist on type 'typeof Deno'.
await Deno.link(src, dest);
~~~~
at https://deno.land/std/fs/ensure_link.ts:28:14
error TS2339: Property 'linkSync' does not exist on type 'typeof Deno'.
Deno.linkSync(src, dest);
~~~~~~~~
at https://deno.land/std/fs/ensure_link.ts:52:8
error TS2339: Property 'symlink' does not exist on type 'typeof Deno'.
await Deno.symlink(src, dest, srcFilePathType);
~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:31:14
error TS2339: Property 'symlinkSync' does not exist on type 'typeof Deno'.
Deno.symlinkSync(src, dest, srcFilePathType);
~~~~~~~~~~~
at https://deno.land/std/fs/ensure_symlink.ts:58:8
Found 12 errors.
</code></pre></div>
<h2 dir="auto">Additional information</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno --version
deno 1.0.0-rc1
v8 8.2.308
typescript 3.8.3"><pre class="notranslate"><code class="notranslate">deno --version
deno 1.0.0-rc1
v8 8.2.308
typescript 3.8.3
</code></pre></div> | <p dir="auto">Parts of the standard library now require the <code class="notranslate">--unstable</code> option to function. I suggest we move all things that use unstable APIs into different files which are then re-exported by multiple entry points: <code class="notranslate">mod.ts</code> and <code class="notranslate">unstable.ts</code>. <code class="notranslate">unstable.ts</code> would re export <code class="notranslate">mod.ts</code> + all unstable features.</p> | 1 |
<h3 dir="auto">Feature request</h3>
<p dir="auto"><g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji> Accelerate has a wrapper to help with distributed metric calculation (a tough problem!), and the <code class="notranslate">no_trainer</code> scripts should be updated to include it!</p>
<p dir="auto">An example can be seen <a href="https://github.com/huggingface/accelerate/blob/main/examples/nlp_example.py#L163-L169">here</a>, below is an example diff of what the integration would look like:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- predictions, references = accelerator.gather((predictions, batch["labels"]))
- # If we are in a multiprocess environment, the last batch has duplicates
- if accelerator.num_processes > 1:
- if step == len(eval_dataloader) - 1:
- predictions = predictions[: len(eval_dataloader.dataset) - samples_seen]
- references = references[: len(eval_dataloader.dataset) - samples_seen]
- else:
- samples_seen += references.shape[0]
+ predictions, references = accelerator.gather_for_metrics((predictions, batch["labels"])) "><pre class="notranslate"><span class="pl-md"><span class="pl-md">-</span> predictions, references = accelerator.gather((predictions, batch["labels"]))</span>
<span class="pl-md"><span class="pl-md">-</span> # If we are in a multiprocess environment, the last batch has duplicates</span>
<span class="pl-md"><span class="pl-md">-</span> if accelerator.num_processes > 1:</span>
<span class="pl-md"><span class="pl-md">-</span> if step == len(eval_dataloader) - 1:</span>
<span class="pl-md"><span class="pl-md">-</span> predictions = predictions[: len(eval_dataloader.dataset) - samples_seen]</span>
<span class="pl-md"><span class="pl-md">-</span> references = references[: len(eval_dataloader.dataset) - samples_seen]</span>
<span class="pl-md"><span class="pl-md">-</span> else:</span>
<span class="pl-md"><span class="pl-md">-</span> samples_seen += references.shape[0]</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> predictions, references = accelerator.gather_for_metrics((predictions, batch["labels"])) </span></pre></div>
<p dir="auto">The list of available scripts to update include:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/image-classification/run_image_classification_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/language-modeling/run_clm_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/language-modeling/run_mlm_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/multiple-choice/run_swag_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/question_answering/run_qa_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/speech-pretraining/run_wav2vec2_pretraining_no_trainer.py</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> examples/pytorch/summarization/run_summarization_no_trainer.py</li>
</ul>
<h3 dir="auto">Motivation</h3>
<p dir="auto">This is a great first issue for someone who wants to learn how to use some of the latest bits in Accelerate and get an easy beginner contribution to the library <g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji></p>
<h3 dir="auto">Your contribution</h3>
<p dir="auto">If you decide to pick up this issue, feel free to ping myself (<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/muellerzr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/muellerzr">@muellerzr</a>), <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a>, or <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pacman100/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pacman100">@pacman100</a> to review <g-emoji class="g-emoji" alias="hugs" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f917.png">🤗</g-emoji></p> | <h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto"><code class="notranslate">T5ForConditionalGeneration</code> inherits <code class="notranslate">generate</code> from <code class="notranslate">PreTrainedModel</code> via <code class="notranslate">GenerationMixin</code>.</p>
<p dir="auto">Currently in our docs if we write:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for more info see :meth:`transformers.T5ForConditionalGeneration.generate`"><pre class="notranslate"><code class="notranslate">for more info see :meth:`transformers.T5ForConditionalGeneration.generate`
</code></pre></div>
<p dir="auto">it doesn't get resolved in the html docs (it doesn't get a xref link, but leaves it as a text)</p>
<p dir="auto">Neither <code class="notranslate">transformers.PreTrainedModel.generate</code> gets resolved - which is the super-class that has this method.</p>
<p dir="auto">But since it's a mixin and actually comes from <code class="notranslate">transformers.generation_utils.GenerationMixin</code> the only way to get the cross-reference turned into a working link is to write:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for more info see :meth:`transformers.generation_utils.GenerationMixin.generate`"><pre class="notranslate"><code class="notranslate">for more info see :meth:`transformers.generation_utils.GenerationMixin.generate`
</code></pre></div>
<p dir="auto">which is slow and complicated to figure out and non-intuitive. And this was just one example.</p>
<p dir="auto">Both <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a> and I tried to find a sphinx configuration to make it resolve <code class="notranslate">transformers.T5ForConditionalGeneration.generate</code> to <code class="notranslate">transformers.generation_utils.GenerationMixin.generate</code> and point to the right doc entry, but didn't succeed.</p>
<p dir="auto">This could be related to the fact that we don't generate docs for inherited methods and only document them in the parent class. We want to keep it that way but to be able to cross-reference the inherited methods in the docstrings.</p>
<p dir="auto">If you perhaps have an expertise in sphinx and could help us resolve this it'd be absolutely amazing!</p>
<p dir="auto">T5 was just an example, this is needed for dozens of models.</p>
<p dir="auto">If there is no way to currently do it you could also submit a feature request with sphinx and take a lead on following through for this new feature to be added.</p>
<p dir="auto">Bonus:</p>
<p dir="auto">As explained above we don't duplicate inherited methods docs, but it'd be really useful to list the inherited methods which didn't get documented in the sub-classes, e.g.: <a href="https://huggingface.co/transformers/model_doc/t5.html#tft5forconditionalgeneration" rel="nofollow">https://huggingface.co/transformers/model_doc/t5.html#tft5forconditionalgeneration</a> could have a brief entry:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Inherited methods: generate, greedy_search, sample, beam_search, beam_sample, group_beam_search"><pre class="notranslate"><code class="notranslate">Inherited methods: generate, greedy_search, sample, beam_search, beam_sample, group_beam_search
</code></pre></div>
<p dir="auto">with cross-references to the corresponding full doc entries in the super-class. Of course, while this could be created manually, it'd be very difficult to maintain - so we need to this to be autogenerated.</p>
<p dir="auto">Thank you!</p>
<p dir="auto">Related issues/prs:</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="849737172" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/11049" data-hovercard-type="pull_request" data-hovercard-url="/huggingface/transformers/pull/11049/hovercard" href="https://github.com/huggingface/transformers/pull/11049">#11049</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="771239511" data-permission-text="Title is private" data-url="https://github.com/huggingface/transformers/issues/9202" data-hovercard-type="issue" data-hovercard-url="/huggingface/transformers/issues/9202/hovercard" href="https://github.com/huggingface/transformers/issues/9202">#9202</a></li>
</ul> | 0 |
<p dir="auto">One of my coworkers made the following observation:</p>
<blockquote>
<p dir="auto">I noticed the julia profiler is sampling all the threads in a deterministic order, which can skew the profile for multithreaded code. When you stop one thread holding an important mutex, you can get a pileup of threads blocking for that mutex, which can make it seem like there's lots of mutex contention, but really that mutex contention is caused by the profiler.</p>
</blockquote>
<p dir="auto">We talked about this with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/JeffBezanson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/JeffBezanson">@JeffBezanson</a> last month, and I'm opening an issue about this so we don't forget. :)<br>
We guessed probably the best thing to do is to select one thread at random and record a sample for just that thread? But it'd be best to consult an expert on multithreaded profiling.</p> | <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia> sort(unsigned.([1,0,1,0,1,1]), rev=true)
6-element Vector{UInt64}:
0x0000000000000001
0x0000000000000000
0x0000000000000001
0x0000000000000000
0x0000000000000001
0x0000000000000001"><pre class="notranslate">julia<span class="pl-k">></span> <span class="pl-c1">sort</span>(<span class="pl-c1">unsigned</span>.([<span class="pl-c1">1</span>,<span class="pl-c1">0</span>,<span class="pl-c1">1</span>,<span class="pl-c1">0</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1</span>]), rev<span class="pl-k">=</span><span class="pl-c1">true</span>)
<span class="pl-c1">6</span><span class="pl-k">-</span>element Vector{UInt64}<span class="pl-k">:</span>
<span class="pl-c1">0x0000000000000001</span>
<span class="pl-c1">0x0000000000000000</span>
<span class="pl-c1">0x0000000000000001</span>
<span class="pl-c1">0x0000000000000000</span>
<span class="pl-c1">0x0000000000000001</span>
<span class="pl-c1">0x0000000000000001</span></pre></div>
<p dir="auto">see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1031507047" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/42718" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/42718/hovercard" href="https://github.com/JuliaLang/julia/pull/42718">#42718</a> for why this bug exists</p> | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.