update http://www.typescriptlang.org/Handbook

I first had a read through the above mentioned website before looking in the language spec and then realised that a lot of the syntax and concepts described on the above mentioned website is out-of-date, already deprecated respectively. For instance, it does still use the term internal module instead of namespace or uses the import ... require instead of import ... from.
IMO the website should either be updated or a notice should be shown that it is outdated and one should have a look at the language spec

:+1:
Just inquired in #typescript about this, while exploring it was very difficult to actually get a hold of current syntax or best practices. Was constantly cross referencing w/ the spec and changelog.

We are actually in the process to updating the website, hopefully have a new one within the next few weeks. This is mainly to update the documentation. sorry for the outdated content, and hopefully we have this issue resolved soon.

Any update on this? I feel like I wasted a lot of time reading the entire handbook over Christmas break; when I actually got my hands dirty, I realized a lot had changed since the last time the handbook was updated. I agree, an "outdated" notice should be put on the handbook till someone has time to fully update it.

I had the same issue last year (until I figured out that the wiki here is up to date). This is a serious issue, and I suspect it prevents a lot of beginners from being successful with the language.

:+1: I spent a lot of time reading, and developing using the "Handbook" and tons of important features are out-dated or just not present. I found this wiki just as others have said.

Sorry for the delay, but we have rolled out a new website today, see https://blogs.msdn.microsoft.com/typescript/2016/03/24/new-typescript-website/.
Docs should be updated more frequently moving forward.


Fixes incorrect type mapping

Fixes https://github.com/microsoft/kiota/issues/5462
Fixes the mapping of types in request builders with subsequent paths with the same name to not select themselves.

This should also resolve https://github.com/microsoft/kiota/issues/4831


Updated: wps-office <IP_ADDRESS>34

Newer version of wps-office (<IP_ADDRESS>52) is now available in master. ac70e6ccfdca4fd31422b1affffba835d68aad61


Next release v1.5.0 -- Capella (withdrawals) & more

New upcoming mev-boost release v1.5.0
Most notably, the Capella fork is introducing withdrawals to the ExecutionPayload, and requires changes across all parts of the MEV-Boost transaction supply chain.
The current mev-boost main branch already includes all related changes, and a release candidate is available.
Notable changes

Capella readiness
getPayload retries

Latest release
https://github.com/flashbots/mev-boost/releases/tag/v1.5.0-alpha2
Docker Images:

flashbots/mev-boost:1.5.0-alpha2-portable
flashbots/mev-boost:1.5.0-alpha2

More Capella Details
Capella changes

#431
#436

mev-boost is moving to using the Attestant types and extending those, rather than maintaining custom types at go-boost-utils. See also:

https://github.com/attestantio/go-builder-client
https://github.com/flashbots/mev-boost/issues/404

Other changes
See also https://flashbots.notion.site/MEV-Boost-Capella-Upgrades-00cea01704794f6eb4f792c55b69c441 for more details about the changes across the stack

Documentation of changes to all parts of the MEV-Boost infra: https://flashbots.notion.site/MEV-Boost-Capella-Upgrades-00cea01704794f6eb4f792c55b69c441

v1.5.0 is out now: https://github.com/flashbots/mev-boost/releases/tag/v1.5.0


HHH-11897: Fix support for Tuple results for native queries

https://hibernate.atlassian.net/browse/HHH-11897

@galovics This PR was created based on your work. Let me know if you like the change.

@vladmihalcea fine for me. Go ahead please. :-)


Running 3B and 33B sim. on 4090

Hello,
Is there some way to run the openllama 3B and llama 33B models simultaneously on one RTX 4090? The VRAM limits seem so close!! I am considering buying a 4090, I tested it on runpod and it sadly failed, the 3B model itself took 4GB according to nvtop.
So: Would it be somehow possible to distill the 33B model slightly down to make it work? That would be so important to me
I was thinking about distilling a couple of not so important multilingual paths
So my main questions would be if it is possible to distill the 33B model only slightly, then quantize and load it up.
I just want to know if it's possible at all, I will do the rest to make it work (or perhaps you have a more elegant idea)
Thank you!

Distillation is certainly a possibility, but trying to prune away specific abilities of the model you don't need seems like a mouthful.
Most of what I've been doing recently have been experiments on quantization methods. I'm not ready to really say too much about ExLlama V2, but I can say I've been getting the most promising results from modifying the GPTQ algorithm to include, among other things, a distillation step. One key observation is that while regular GPTQ treats all linear layers equally, they're very much not equal.
The pipe dream is to get 65B running respectably on a single 24 GB GPU, but that may not be realistic. Still, even getting halfway there would mean 33B could be quantized into a considerably smaller average number of bits per weight, leaving more than enough space for a 3B model to run alongside it.

If it doesn't already fit, it would require either a smaller quantization method (and support for that quantization method by ExLlama), or a more memory efficient attention mechanism (conversion of LLaMA from multi-head attention to grouped-query or multi-query attention, plus ExLlama support), or an actually useful sparsity/pruning method, with your proposed hardware. So, it's possible in principle, but in practice isn't trivially doable just yet.
If you happen to already have any Nvidia GPU that's Turing or newer (so 16, 20, 30, 40 series), you could install that alongside a 4090 and run OpenLLaMA 3B on it no problem; and I guess a Pascal (10 series) would probably run fine too even with ExLlama's partial (read: slow) support of that μarch, given 3B's small size.
Or you could just do CPU inference with llama.cpp, 3B should be pretty quick even purely on a CPU.
At least in the US, if cost is at all an issue, you can readily find two 3090s on the second hand market for equal or slightly less than the cost of a single 4090, and that would definitely give you enough room for what you want. Performance isn't all that much slower than a single 4090 given the very similar memory bandwidth. That would also open up the possibility of running 65B, and I think there would be enough room left over after 65B (without any RoPE context extension) to fit 3B.

Thank you both for your in-depth answers!
@turboderp That sounds like phenomenal news, I am looking super forward to v2, even if the distillation doesn't make it's way
Could you perhaps please brieflt guide me through the manual distillation that you are doing? I would really like to experiment with that before v2 release (and perhaps help you somehow evaluating performance if you got any idea on what I should try?)
Thank you a lot as always!

You can sequentially load the models too. Both 3b and 33b can cache into your ram and you can just swap them. Like a few seconds of load per.

@Ph0rk0z Thank you, but that would be too much delay. I need instant access all the time for drafting speculations and sampling them

Out of curiousity, since you mentioned mixed quants, are you planning on using algorithms similar to the proposed OWQ by Changhun Lee et al? the paper on it was fascinating, may make it possible to drop quants further if you keep the important columns at fp16 as per the paper

So right now I'm experimenting with ways to apply this in conjunction with regular quantization as an error correction term. I'm not sure if it ultimately turns out to be worth it, but it would only be like the seventh dead end so far and I have many more ideas to explore.

That's great to hear, I am super excited!

One thing I've noticed is that the various parts of the model respond very differently to quantization. I've written a new GPTQ quantizer that runs in mixed mode, and this gives about a 5% reduction in overall size with negligible increase in perplexity, at least on the 3b model I'm mostly testing on. But it adds a lot of hyperparameters so there may be much more to gain with some tweaking. Sadly every tweak takes like 15 minutes to try out so it's a bit slow going.

I see, it blows my mind how you built this repo mainly on your own.

But briefly, [...]

Thank you for the great explanations, they help me a lot! I wish you the best of luck in the further development, I hope this time it's not a dead end after all :)

They released the new flash attention, does it reduce memory usage at all?

@Ph0rk0z Thank you for updating me! But do you mean Exllama? I can't find any release notes or commits regarding flash attn implementation

It would have to be implemented. I'm just asking if it would help here or not.

I haven't had a change to look at it yet, or determine how much of a difference it would make. Keeping in mind that Flash Attention 1.0 doesn't make much of a difference in practice either. At least it hasn't so far. With longer contexts it might start to matter.


Running out of memory during large quickCheck' runs

Is quickCheck' supposed to run in constant space? I'm running out of memory if I tell it to run a large number of tests (over 5000).
Also, I'm curious why stdout includes 10000/10000 test(s) passed. right before the tests crash. It seems weird for the program to run out of memory if the actual testing is complete.
Code:
module Test.Main where

import Prelude

import Control.Monad.Eff (Eff())
import Data.Either
import Data.Maybe

import Data.Argonaut.Core
import Data.Argonaut.Parser
import Data.Argonaut.Printer
import Test.StrongCheck ((<?>), quickCheck', Result())

f :: Number -> Result
f num =
  case jsonParser (printJson (fromNumber num)) of
    Left e -> false <?> ("jsonParser problem: " <> e)
    Right a ->
      case foldJsonNumber Nothing Just a of
        Nothing -> false <?> "not a number"
        Just b -> b == num <?> "nonequal"

main :: Eff _ Unit
main = quickCheck' 10000 f

Results:
vagrant@mytrusty:/var/apps/purescript-halogen-template$ pulp test
* Building project in /var/apps/purescript-halogen-template
psc: No files found using pattern: src/**/*.js
psc: No files found using pattern: test/**/*.js
Warning found:
in module Test.Main
at /var/apps/purescript-halogen-template/test/Main.purs line 23, column 1 - line 24, column 1

  Wildcard type definition has the inferred type

    ( err :: EXCEPTION
    , random :: RANDOM
    , console :: CONSOLE
    | _14
    )

in value declaration main

See https://github.com/purescript/purescript/wiki/Error-Code-WildcardInferredType for more information,
or to contribute content related to this warning.

* Build successful.
* Running tests...
10000/10000 test(s) passed.

<--- Last few GCs --->

   21704 ms: Scavenge 1388.7 (1435.0) -> 1387.1 (1435.0) MB, 27.2 / 0 ms (+ 7.2 ms in 31 steps since last GC) [allocation failure].
   21740 ms: Scavenge 1388.7 (1435.0) -> 1388.3 (1435.0) MB, 28.6 / 0 ms (+ 5.9 ms in 25 steps since last GC) [allocation failure].
   21771 ms: Scavenge 1388.7 (1435.0) -> 1388.7 (1435.0) MB, 29.4 / 0 ms (+ 1.5 ms in 6 steps since last GC) [allocation failure].
   21801 ms: Scavenge 1388.7 (1435.0) -> 1388.7 (1435.0) MB, 29.6 / 0 ms [allocation failure].

<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: MarkCompactCollector: semi-space copy, fallback in old gen Allocation failed - JavaScript heap out of memory
* ERROR: Subcommand terminated as a result of receiving SIGABRT

Oh, maybe the problem is that quickCheck' just eventually generates an enormous test case and that's what causes the crash, instead of a memory leak. I'll look into it...

We've had this problem when running a large number of iterations of a test too, but not investigated enough to figure out what the real cause is. Thanks for taking a look, it would be great if we could figure it out as this sorta spoils one of the reasons to use SC over QC - SC is stack safe, just apparently it'll consume too much memory instead.

Sorry I never got around to taking an in-depth look at this: I've moved on to a different project, so feel free to close this/continue research as you wish, just don't wait around for me.

look like this cause by Node.js known issue: https://github.com/nodejs/node/issues/6456


Docs: remove hoodie.reset

see https://github.com/hoodiehq/hoodie-client/issues/12

if it looks good, you can merge it in right away :) Use the Rebase and merge button if commit messages follow the semantic-release conventions, or Squash and merge if they don’t and set the message to whatever is right in the respective PR. Makes sense?

Makes sense.
Done.


Making this works with inertia team.

It will be nice if this could work with jetstream InertiaJS?

Hi @novashockinc ,
Do you mean supporting the Jetstream Teams feature?

The package is actually a build-up on Jetstream and InertiaJS stack, so ALL the features that Jetstream supports remain intactly supported by JIG as well. If you experience any challenge, feel free to share.


Cannot locate rx-lifx package on Maven (or other) repositories

Today I had to clear my gradle cache folder (C:\Users\MY_USERNAME\.gradle\caches) to fix a cache bug, and after doing so, Android Studio was complaining that it couldn't find the "rx-lifx" package (neither the version I had been using, 0.0.11, nor the latest version 0.1.1-alpha).
I did an online search for rx-lifx, and can't find it in the Maven, etc. repositories. For example, this search for "lifx" does not find it (but it does find the "jlifx" package): https://central.sonatype.com/search?q=lifx
Any idea why it seems to be gone from the Maven repository? Or was it hosted in some other repository originally? (I can't seem to find it in any repository at least)

Hi @Venryx,
Yeah this was hosted on bintray which apparently was completely shut down yesterday.
It will require some rework to set this up to to publish somewhere else.
To solve your immediate problem, you could apply the following patch, and then run ./gradlew publishToMavenLocal, which will publish and make it available on your local machine if you add mavenLocal() as a repository in your project.
Index: gradle/wrapper/gradle-wrapper.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
--- a/gradle/wrapper/gradle-wrapper.properties	(revision c0c3e7ef4d8cd523fe0d7e65ed478e4bfd6a4803)
+++ b/gradle/wrapper/gradle-wrapper.properties	(date<PHONE_NUMBER>947)
@@ -1,6 +1,5 @@
-#Tue Feb 20 22:19:46 AEDT 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle	(revision c0c3e7ef4d8cd523fe0d7e65ed478e4bfd6a4803)
+++ b/build.gradle	(date<PHONE_NUMBER>971)
@@ -14,11 +14,6 @@

 }

-
-plugins {
-    id "com.jfrog.bintray" version "1.7.3"
-}
-
 apply plugin: 'org.junit.platform.gradle.plugin'

 version "0.1.1-alpha"
@@ -64,28 +59,6 @@
     //useJUnitPlatform()
 }

-bintray {
-    user = "$System.env.BINTRAY_USER"
-    key = "$System.env.BINTRAY_KEY"
-
-    pkg {
-        repo = 'RxLifx-Kotlin'
-        name = 'RxLifx-Kotlin'
-        userOrg = 'flowsprenger'
-        licenses = ['MIT']
-        vcsUrl = 'https://github.com/flowsprenger/RxLifx-Kotlin'
-        version {
-            name = "$project.version"
-            desc = 'RxLifx-Kotlin'
-            released  = new Date()
-            vcsTag = "$project.version"
-            attributes = [:]
-        }
-        publish = true
-    }
-    publications = ['MyPublication']
-}
-
 publishing {
     publications {
         MyPublication(MavenPublication) {


Crash while running the AFURLSessionManagerTests test suite on iOS 10

Running the AFURLSessionManagerTests test suite (commit 4fb051898c60051d207ca0c24435766fdf140e34) on iOS 10 often crashes. Trying three to five times is enough for me to reproduce it on my machine.
Here’s the backtrace of the crash, it may have slight variations, but it always crashes in object_isClass :
Test Suite 'Selected tests' started at 2016-09-26 21:24:19.837
Test Suite 'AFNetworking iOS Tests.xctest' started at 2016-09-26 21:24:19.837
Test Suite 'AFURLSessionManagerTests' started at 2016-09-26 21:24:19.838
Test Case '-[AFURLSessionManagerTests testSwizzlingIsProperlyConfiguredForDummyClass]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsProperlyConfiguredForDummyClass]' passed (0.005 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundUploadTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundUploadTask]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDataTask]' started.
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDataTask]' passed (0.006 seconds).
Test Case '-[AFURLSessionManagerTests testDataTaskDownloadProgressCanBeKVOd]' started.
Test Case '-[AFURLSessionManagerTests testDataTaskDownloadProgressCanBeKVOd]' passed (0.396 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDownloadTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDownloadTask]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForUploadTask]' started.
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForUploadTask]' passed (0.004 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDataTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDataTask]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundDownloadTaskAfterResume]' started.
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundDownloadTaskAfterResume]' passed (0.007 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundUpload]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundUpload]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByLocalUploadTaskAfterResume]' started.
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByLocalUploadTaskAfterResume]' passed (0.004 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundUploadTaskAfterResume]' started.
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundUploadTaskAfterResume]' passed (0.006 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDataTask]' started.
(lldb) bt
* thread #1: tid = 0xa5572, 0x00000001060be3fa libobjc.A.dylib`object_isClass + 18, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x00000001060be3fa libobjc.A.dylib`object_isClass + 18
    frame #1: 0x0000000105b92e32 Foundation`-[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 308
    frame #2: 0x0000000105c69fe6 Foundation`-[NSProgress _setValueForKeys:settingBlock:] + 290
    frame #3: 0x0000000105c6af3c Foundation`-[NSProgress setTotalUnitCount:] + 132
  * frame #4: 0x000000011237665d AFNetworking`-[AFURLSessionManagerTaskDelegate init](self=0x00007fbb5201c960, _cmd="init") + 541 at AFURLSessionManager.m:139
    frame #5: 0x000000011237cb4b AFNetworking`-[AFURLSessionManager addDelegateForDataTask:uploadProgress:downloadProgress:completionHandler:](self=0x00007fbb5060bf50, _cmd="addDelegateForDataTask:uploadProgress:downloadProgress:completionHandler:", dataTask=0x00007fbb5203eff0, uploadProgressBlock=(null), downloadProgressBlock=(null), completionHandler=(null)) + 187 at AFURLSessionManager.m:612
    frame #6: 0x000000011237e767 AFNetworking`-[AFURLSessionManager dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:](self=0x00007fbb5060bf50, _cmd="dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:", request=0x00007fbb520378d0, uploadProgressBlock=(null), downloadProgressBlock=(null), completionHandler=(null)) + 407 at AFURLSessionManager.m:760
    frame #7: 0x0000000112290e25 AFNetworking iOS Tests`-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDataTask](self=0x00007fbb52034b70, _cmd="testSwizzlingIsWorkingAsExpectedForForegroundDataTask") + 165 at AFURLSessionManagerTests.m:330
    frame #8: 0x00000001065e605c CoreFoundation`__invoking___ + 140
    frame #9: 0x00000001065e5ee1 CoreFoundation`-[NSInvocation invoke] + 289
    frame #10: 0x0000000105a98210 XCTest`__24-[XCTestCase invokeTest]_block_invoke_2 + 481
    frame #11: 0x0000000105ad09d4 XCTest`-[XCTestContext performInScope:] + 190
    frame #12: 0x0000000105a9801c XCTest`-[XCTestCase invokeTest] + 255
    frame #13: 0x0000000105a98835 XCTest`-[XCTestCase performTest:] + 457
    frame #14: 0x0000000105a958fd XCTest`-[XCTestSuite performTest:] + 491
    frame #15: 0x0000000105a958fd XCTest`-[XCTestSuite performTest:] + 491
    frame #16: 0x0000000105a958fd XCTest`-[XCTestSuite performTest:] + 491
    frame #17: 0x0000000105a81b0c XCTest`__25-[XCTestDriver _runSuite]_block_invoke + 51
    frame #18: 0x0000000105aa2fc3 XCTest`-[XCTestObservationCenter _observeTestExecutionForBlock:] + 602
    frame #19: 0x0000000105a819a9 XCTest`-[XCTestDriver _runSuite] + 436
    frame #20: 0x0000000105a827a2 XCTest`-[XCTestDriver _checkForTestManager] + 287
    frame #21: 0x0000000105ad1f5c XCTest`_XCTestMain + 628

My first reflex was to enable zombie objects. But once zombies are enabled, the crash becomes impossible to reproduce! So back to the drawing board and let’s look at frame # 1. Here’s an excerpt of -[NSObject willChangeValueForKey:], with the help of Hopper:
r13 = [self observationInfo];
r15 = [self _implicitObservationInfo];
// […] some lines skipped
if (var_58 != 0x0) {
	r15 = r12;
	r13 = var_58;
	do {
		r14 = *r15->_observer;
		rax = 0x0;
		if (!object_isClass(r14)) {
			rax = [r14 retain];
		}
		*r15 = rax;
		r15 = r15 + 0x8;
		r13 = r13 - 0x1;
		COND = r13 != 0x0;
	} while (COND);
}

There’s no need to understand everything, but you can notice that the object_isClass() function parameter is an _observer. This is very odd. As you can see at frame # 4 (the last AFNetworking frame before the crash), the downloadProgress property is freshly created one line above. How could it possibly have an observer?
self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;

Let’s add some logs to get an idea of what’s happening.
self.uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
NSLog(@"\n    %@\n        self.uploadProgress = %@\n        observationInfo: %@", self, self.uploadProgress, [self.uploadProgress observationInfo]);
self.uploadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;

self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
NSLog(@"\n    %@\n        self.downloadProgress = %@\n        observationInfo: %@", self, self.downloadProgress, [self.downloadProgress observationInfo]);
self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;

And here are the results when running the test suite:

Test Suite 'Selected tests' started at 2016-09-26 23:24:40.845
Test Suite 'AFNetworking iOS Tests.xctest' started at 2016-09-26 23:24:40.846
Test Suite 'AFURLSessionManagerTests' started at 2016-09-26 23:24:40.846
Test Case '-[AFURLSessionManagerTests testSwizzlingIsProperlyConfiguredForDummyClass]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsProperlyConfiguredForDummyClass]' passed (0.006 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundUploadTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundUploadTask]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDataTask]' started.
2016-09-26 23:24:40.861 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d1f680>
        self.uploadProgress = <NSProgress: 0x7ffa68d18b90> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:40.861 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d1f680>
        self.downloadProgress = <NSProgress: 0x7ffa68d23c40> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDataTask]' passed (0.007 seconds).
Test Case '-[AFURLSessionManagerTests testDataTaskDownloadProgressCanBeKVOd]' started.
2016-09-26 23:24:40.865 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f39540>
        self.uploadProgress = <NSProgress: 0x7ffa68f0fc80> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:40.866 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f39540>
        self.downloadProgress = <NSProgress: 0x7ffa68c1bd30> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDataTaskDownloadProgressCanBeKVOd]' passed (2.016 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDownloadTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDownloadTask]' passed (0.003 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForUploadTask]' started.
2016-09-26 23:24:42.886 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f35d40>
        self.uploadProgress = <NSProgress: 0x7ffa68f41620> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.887 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f35d40>
        self.downloadProgress = <NSProgress: 0x7ffa68f41780> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForUploadTask]' passed (0.005 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDataTask]' started.
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForBackgroundDataTask]' passed (0.001 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundDownloadTaskAfterResume]' started.
2016-09-26 23:24:42.893 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa6a116d70>
        self.uploadProgress = <NSProgress: 0x7ffa6a1054f0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.893 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa6a116d70>
        self.downloadProgress = <NSProgress: 0x7ffa68d22fd0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundDownloadTaskAfterResume]' passed (0.006 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundUpload]' started.
2016-09-26 23:24:42.899 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d08610>
        self.uploadProgress = <NSProgress: 0x7ffa68d22fd0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.899 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d08610>
        self.downloadProgress = <NSProgress: 0x7ffa68d140c0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundUpload]' passed (0.003 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByLocalUploadTaskAfterResume]' started.
2016-09-26 23:24:42.902 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d25230>
        self.uploadProgress = <NSProgress: 0x7ffa68d240e0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.902 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d25230>
        self.downloadProgress = <NSProgress: 0x7ffa68c192e0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByLocalUploadTaskAfterResume]' passed (0.004 seconds).
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundUploadTaskAfterResume]' started.
2016-09-26 23:24:42.907 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d27b00>
        self.uploadProgress = <NSProgress: 0x7ffa68d27b50> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.907 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d27b00>
        self.downloadProgress = <NSProgress: 0x7ffa68f0e230> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDidResumeNotificationIsReceivedByBackgroundUploadTaskAfterResume]' passed (0.005 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDataTask]' started.
2016-09-26 23:24:42.911 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d0baf0>
        self.uploadProgress = <NSProgress: 0x7ffa68d240e0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.911 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d0baf0>
        self.downloadProgress = <NSProgress: 0x7ffa6a11de00> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDataTask]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDownloadTask]' started.
2016-09-26 23:24:42.915 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c0bab0>
        self.uploadProgress = <NSProgress: 0x7ffa68c10350> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.915 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c0bab0>
        self.downloadProgress = <NSProgress: 0x7ffa6a119730> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDownloadTask]' passed (0.003 seconds).
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDownload]' started.
2016-09-26 23:24:42.918 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d29650>
        self.uploadProgress = <NSProgress: 0x7ffa68d29940> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.918 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d29650>
        self.downloadProgress = <NSProgress: 0x7ffa68d29e80> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testSwizzlingIsWorkingAsExpectedForForegroundDownload]' passed (0.002 seconds).
Test Case '-[AFURLSessionManagerTests testDidSuspendNotificationIsReceivedByLocalDataTaskAfterSuspend]' started.
2016-09-26 23:24:42.920 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c183b0>
        self.uploadProgress = <NSProgress: 0x7ffa68c201d0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.921 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c183b0>
        self.downloadProgress = <NSProgress: 0x7ffa68f38080> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDidSuspendNotificationIsReceivedByLocalDataTaskAfterSuspend]' passed (0.004 seconds).
Test Case '-[AFURLSessionManagerTests testUploadTaskDoesReportProgress]' started.
2016-09-26 23:24:42.935 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d16030>
        self.uploadProgress = <NSProgress: 0x7ffa68d24360> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:42.935 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d16030>
        self.downloadProgress = <NSProgress: 0x7ffa68c178a0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:43.417 xctest[27176:732467] 40% completed
2016-09-26 23:24:43.418 xctest[27176:732486] 100% completed
Test Case '-[AFURLSessionManagerTests testUploadTaskDoesReportProgress]' passed (0.497 seconds).
Test Case '-[AFURLSessionManagerTests testDataTaskDoesReportDownloadProgress]' started.
2016-09-26 23:24:43.423 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f219a0>
        self.uploadProgress = <NSProgress: 0x7ffa68f38080> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:43.424 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68f219a0>
        self.downloadProgress = <NSProgress: 0x7ffa68f363f0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
Test Case '-[AFURLSessionManagerTests testDataTaskDoesReportDownloadProgress]' passed (0.759 seconds).
Test Case '-[AFURLSessionManagerTests testRDAR17029580IsFixed]' started.
[...]
2016-09-26 23:24:44.182 xctest[27176:732480]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68e019b0>
        self.uploadProgress = <NSProgress: 0x7ffa68e01a40> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:44.182 xctest[27176:732558]
    <AFURLSessionManagerTaskDelegate: 0x7ffa6a000a80>
        self.uploadProgress = <NSProgress: 0x7ffa6a0019f0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:44.182 xctest[27176:732486]
    <AFURLSessionManagerTaskDelegate: 0x7ffa6a11eb00>
        self.uploadProgress = <NSProgress: 0x7ffa6a119730> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: <NSKeyValueObservationInfo 0x7ffa6a117540> (
<NSKeyValueObservance 0x7ffa6a1060f0: Observer: 0x7ffa68c0bab0, Key path: fractionCompleted, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x7ffa6a10d3e0>
)
2016-09-26 23:24:44.182 xctest[27176:732470]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68d24cc0>
        self.uploadProgress = <NSProgress: 0x7ffa68d179e0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
[...]
Test Case '-[AFURLSessionManagerTests testRDAR17029580IsFixed]' passed (0.065 seconds).
Test Case '-[AFURLSessionManagerTests testDidSuspendNotificationIsReceivedByBackgroundDownloadTaskAfterSuspend]' started.
2016-09-26 23:24:44.248 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c159d0>
        self.uploadProgress = <NSProgress: 0x7ffa68c192e0> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: (null)
2016-09-26 23:24:44.248 xctest[27176:732401]
    <AFURLSessionManagerTaskDelegate: 0x7ffa68c159d0>
        self.downloadProgress = <NSProgress: 0x7ffa6a119730> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 0
        observationInfo: <NSKeyValueObservationInfo 0x7ffa6a117540> (
<NSKeyValueObservance 0x7ffa6a1060f0: Observer: 0x7ffa68c0bab0, Key path: fractionCompleted, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x7ffa6a10d3e0>
)

That’s some interesting data.

NSProgress instance are sometimes reassigned an address previously used by another NSProgress instance: for example, 0x7ffa6a119730 is assigned to one download progress, then one upload progress, then another download progress (where the crash happens). This explains why running with zombies enabled made the crash disappear: addresses are never reused because deallocated objets turn into zombies and keep their original address forever.
When the same address (0x7ffa6a119730) is reused, the NSProgress instance has an observer right after its creation. That observer is 0x7ffa68c0bab0, an old AFURLSessionManagerTaskDelegate instance.

Back to lldb at the crash location:

(lldb) frame select 0
frame #0: 0x00000001102853fa libobjc.A.dylib`object_isClass + 18
libobjc.A.dylib`object_isClass:
->  0x1102853fa <+18>: and    rcx, qword ptr [rax + 0x20]
    0x1102853fe <+22>: mov    rax, qword ptr [rcx + 0x8]
    0x110285402 <+26>: mov    al, byte ptr [rax]
    0x110285404 <+28>: and    al, 0x1

And check what is the parameter passed to object_isClass:

(lldb) p/x $arg1
(unsigned long) $0 = 0x00007ffa68c0bab0

There we go, our old (deallocated) AFURLSessionManagerTaskDelegate instance.
This probably means that KVO on fractionCompleted is not properly removed. Observation of the fractionCompleted property is added in -[AFURLSessionManagerTaskDelegate setupProgressForTask:]
and removed in -[AFURLSessionManagerTaskDelegate cleanUpProgressForTask:]:
And sure enough, the cleanUpProgressForTask: method is not called for these three tests:

testBackgroundManagerReturnsExpectedClassForDataTask
testBackgroundManagerReturnsExpectedClassForUploadTask
testBackgroundManagerReturnsExpectedClassForDownloadTask

Disabling these three tests make the crash go away, but that’s probably not the right thing to do. This potential crasher will still exist when a task is created but never used as is the case in these three tests.

Thanks for the detailed notes! This is extremely helpful.
I'm running some tests from the command line on my end, and still seeing it hang on Xcode 8 every now and then.
Right now, I see testDidSuspendNotificationIsReceivedByBackgroundDataTaskAfterSuspend hanging. Still looking.

I have it hung now in this state in the debugger:
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForDownloadTask]' passed (0.014 seconds).
Test Case '-[AFURLSessionManagerTests testBackgroundManagerReturnsExpectedClassForUploadTask]' started.
2016-09-27 09:15:44.625 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:15:54.626 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:04.699 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:14.700 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:24.770 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:34.843 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:44.912 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:16:54.987 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:17:05.054 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:17:15.128 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)
2016-09-27 09:17:25.202 xctest[37504:3364375] void SendDelegateMessage(NSInvocation *): delegate (webView:didFirstVisuallyNonEmptyLayoutInFrame:) failed to return after waiting 10 seconds. main run loop mode: (null)

That message is being printed every 10 seconds now.

Possibly related:
https://openradar.appspot.com/28422096


The "Chatbook" stylesheet is not listed under Format > Stylesheet ?

The README file states:
Once installed, start using Chatbook by first creating an empty notebook, and then selecting the Format > Stylesheet > Chatbook menu item to change the notebook stylesheet.
But after running the paclet installation I don't see it?

Maybe the PacletInstall is failed for me?
In[7]:= PacletInstall[ResourceObject["https://wolfr.am/1c2WoIEpe"]] // Head

Out[7]= PacletInstall

This works though:
PacletInstall[ResourceObject["https://wolfr.am/1c2WoIEpe"]["PacletFile"]]

It works in 13.2.1 by the way, but not in my 13.3 "prerelease"...

Looks like this is not an issue with the Chatbook paclet itself. Closing


--system argument seems to have gone away

To reproduce:
pip install pipenv
pipenv --version
> pipenv, version 4.1.1
pipenv --system install six
> Error: no such option: --system

I've tried this on macOS and Ubuntu.

Thanks for moving this into a new issue @gregplaysguitar 😊. So this has to do with argument ordering. For some reason that I still have yet to pindown, click specifies [OPTIONS] before COMMAND in the usage statement. We manually patched this for --two/--three but it clearly affects every OPTION passed to pipenv. I'll leave this open for now to track the issue further.
In the meantime, the syntax you're actually looking for is pipenv install --system six.

Ah... got it. Thanks for the explanation. I actually tried that, but the thing that threw me was that the first thing it does is creates a virtualenv, even though I'm installing to system. So when I do this from my home directory:
pipenv --system install six

It first creates a virtualenv at /Users/greg/.local/share/virtualenvs/greg-Tm8LTBrB, but then installs six to the system at /usr/local/lib/python3.5/site-packages
Is this the intended behaviour?

@gregplaysguitar, yes and no. We currently have code that verifies the Pipfile and Virtualenv are intact before installing. When you're installing from your home directory, are you expecting the Pipfile  there to be populated with each install?

That is currently the intended behavior, but there is room for improvement :)

Ok, thanks - now I understand what's going on a lot better!

When you're installing from your home directory, are you expecting the Pipfile there to be populated with each install?

I'm not, that example was a bit contrived - what I'm actually doing is using pipenv to build an environment based on an existing Pipfile.
What I really need is a tool that takes a Pipfile and installs into an arbitrary environment, be it an active virtualenv, or the system or whatever. I'm not sure this is the intended purpose of pipenv? It is working though, the redundant virtualenv doesn't do any harm, apart from the possible confusion.

This is actually a repeat of the discussion from #289 now so we should probably close this issue and head back over there, since --system is accounted for?

Yeah, I think that's alright @gregplaysguitar. We'll close this out in favor of #289 if that's more in line with what you're looking for.


Reveals characters with ANSI escape sequences

When using the read module in silent mode with an ANSI formatted prompt and setting a replace character upon the backspace keypress event the replace character is no longer respected, ie, the plain text is displayed on screen.
Without ANSI escape sequences this issue is not present.
I tracked this down to the write method and have implemented a fix, within the ANSI conditional clause (https://github.com/isaacs/mute-stream/blob/master/mute.js#L103) I added:
if(c.indexOf(this._prompt) === 0) {
  var text = c.replace(this._prompt, '');
  text = text.replace(/./g, this.replace);
  c = this._prompt + text;
}

I am using a modified version of the read module which allows passing the unformatted prompt length when calling ReadlineInterface.setPrompt() (https://github.com/joyent/node/issues/3860).
node --version => v0.10.29

The patched version of mute-stream is here:
https://github.com/freeformsystems/cli-input/blob/master/lib/mute.js
Interested in a pull request?

Thank you so much, I thought you would never get around to this! I nearly emailed you after the state of npm email but I imagined you are very busy ;)

I'm on vacation this week, so I found some time to look at a few OSS things :)


Missing table styles

This seems to happen only in our production build.

You can view this at:
https://ci.cloud.paas.upshift.redhat.com/beta/hybrid/cost-management/ocp
Filed the PatternFly issue below:
https://github.com/patternfly/patternfly-react/issues/1810

Confirmed this fixed worked on the beta staging area.


[EMB-374] Make join-osf-banner stay dead in safari

Purpose
In safari, you can dismiss the "join OSF" banner once, but then it comes back and is unkillable.

Summary of Changes

Wrap the banner in an {{#unless}} block, so it's not even in the DOM if it's been previously dismissed.
Make the dismissal a nice animated slide down, like on legacy.
Move the local storage key into the config, rather than a hardcoded string.

Side Effects
n/a

Feature Flags
n/a

QA Notes
Of course test in safari, and probably worth checking the new downward animation works in at least one other browser too.

Open a private/incognito window
Go to an embosf project page, like forks or analytics
The "join osf" banner should slide up gracefully
Isn't it sad that our first impression to most people has the cookie banner obscuring our pitch?
Dismiss the "join osf" banner, it should slide down just as gracefully
Refresh the page, and it should not come back

Ticket

https://openscience.atlassian.net/browse/EMB-374
Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md

Pull Request Test Coverage Report for Build 1668

11 of 11 (100.0%)  changed or added relevant lines in 1 file are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.01%) to 62.653%

Files with Coverage Reduction
New Missed Lines
%

lib/osf-components/addon/components/join-osf-banner/component.ts
2
82.93%

Totals

Change from base Build 1667:
0.01%

Covered Lines:
3580

Relevant Lines:
5446

💛  - Coveralls


Sdk modules management

What it solves
Resolves #https://github.com/gnosis/safe-react/issues/2797
How this PR fixes it
Uses the safe-core-sdk to call the methods getEnableModuleTx and getDisableModuleTx
How to test it

Check that the modules list is empty in Settings > Advanced
Create a new Spending Limit for the first time in Settings > Spending Limit
Check that a new Safe module was added to the list in Settings > Advanced
Remove that module using the actions in the right side of the modules table

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

6 of 36 (16.67%)  changed or added relevant lines in 5 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.04%) to 32.3%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/logic/safe/utils/spendingLimits.ts
1
2
50.0%

src/routes/safe/components/Settings/Advanced/ModulesTable.tsx
2
4
50.0%

src/logic/safe/utils/modules.ts
2
7
28.57%

src/routes/safe/components/Settings/SpendingLimit/NewLimitModal/Review.tsx
0
10
0.0%

src/routes/safe/components/Settings/Advanced/RemoveModuleModal.tsx
1
13
7.69%

Files with Coverage Reduction
New Missed Lines
%

src/routes/safe/components/Settings/Advanced/ModulesTable.tsx
1
70.97%

Totals

Change from base Build<PHONE_NUMBER>:
-0.04%

Covered Lines:
3099

Relevant Lines:
8523

💛  - Coveralls

It looks like dev departed from main a bit. You shouldn’t merge main into this branch. Dev is the base.

LGTM
Enabled the module
Added owners to the list
Used that owner to send funds through the module
Disabled the module and re enabled it again with the MC. The owner is still in the list (correct)
Removed all owners from the list
Add an owner once again, re enabling the module once again
Edited the allowance of those owners.
The allowance itself still works fine (the limit on how much can be sent, and actually limiting the owner to do it)

@germartinez could you solve the git conflict and merge this? Thanks!


"working directory" not completely respected when using "-explicit-swift-module-map-file"

Description
In our setup, -explicit-swift-module-map-file has relative paths. When the execution directory is the same as the working directory, it works all fine. When the execution directory is different, then it errors out.
error: emit-module command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: failed to open explicit Swift module: outputs/StressTest1.swiftmodule
.../swift_repro/foo.swift:5:8: error: no such module 'StressTest1'
import StressTest1

Though we can have absolute paths in "-explicit-swift-module-map-file" which would fix the above error, but we would like to have relative paths given remote caching and reproducibility aspects involved.

Steps to reproduce

Download swift_repro.zip.
./root.sh - note - the first part of the script will be successful (execution directory the same as working directory)
The second part will fail.
Now - execute ./make_paths_absolute.sh - this makes the path in the  "-explicit-swift-module-map-file" absolute.
Now, execute  ./root.sh again and this builds fine now.

Expected behavior

working directory should be honoured(if present) when resolving paths mentioned in the -explicit-swift-module-map-file.

Environment

Swift compiler version info - swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-<IP_ADDRESS>.5 clang-14<IP_ADDRESS>.100)
Xcode version info - Xcode 14.3.1, Build version 14E300b
Deployment target: iOS 15

Note: my understanding of the expected behavior might be wrong or there might be something else going on, so please feel free to correct me or share other ways to go about it, whatever you think is ideal.

cc: @artemcm @cachemeifyoucan

but I am also interested in why the project is setup using -explicit-swift-module-map-file
Currently, rules_swift constructs this file when the explicit module build feature is enabled. cc: @keith @brentleyjones as they can best share the related context involved.

We use the map file because the outputs in a bazel build are all to different directories. Using multiple -I statements has proven in the past to be a performance issue.
The relative paths seem to work, only if they are relative to the executing directory. With bazel this is fine, but we have an IDE integration that relies on -working-directory (which is different from pwd), which currently breaks per this bug report.
So if you could make the relative paths work based on -working-directory, it would really help us out 🙏.

That file is usually generated by swift driver using dependency scanner when explicit module build is enabled.

Also of note, bazel builds will most likely want to alway side-step the dependency scanner, and handle dependencies itself.

I understand your use case and I understand the reason for such decision. I do wonder how slow using -I is, giving the directory it points to is not enormous.
The fundamental issue here is that swift-frontend has no notion of working directory. -working-directory is a flag that is only consumed by swift-driver, and swift-frontend just ignores that. SwiftDriver is in charged of canonicalizing all the paths for swift-frontend and maybe passing working directory via -Xcc flag to embedded clang because clang does care about working directory.
I don't think I want to make a call if we want to change that model or not. Maybe @artemcm is the better person to make a decision here.
The other issue for current bezel workflow is that it is not handling the module dependencies (?) from swift/system. Can you clarify if that is the case? The future direction is to get rid of this world of mixed implicit/explicit module.

I do wonder how slow using -I is, giving the directory it points to is not enormous.

The repro enclosed in this issue is a basic setup demonstrating the problem with relative paths not working and given the smaller scope of build involved, we don't see slowness with -I in this specific repro but we see implicit module builds being extremely slow for our core applications (Rider, Eats and Driver). The core targets depend on 400/500 mixed bag of Swift, ObjC libraries, and Frameworks. When we tap on a symbol, it takes 40-50+ seconds for Xcode to respond and navigate to the right file (having the symbol definition). On profiling this, we find 70%-80% of the time is spent in doing stat calls where we believe, explicit module builds will help, hence we are trying to get this work. (though vfs overlay and a bunch of other optimizations can also help)
SourceKit logs
Notice the request and response timestamp for a "view symbol definition action"
2023-06-20 13:15:06.005 Xcode[8547:10485338] SourceKit-client: [2:request:107387:945.0651] [341] {

2023-06-20 13:16:17.027 Xcode[8547:10485782] SourceKit-client: [2:response:156007:945.0895] [341] {

Maybe @artemcm is the better person to make a decision here.

@artemcm what are your thoughts about supporting relative paths in -explicit-swift-module-map-file?

Thanks for the data. That is helpful. I do wonder how many syscalls we can reduce comparing:

Using explicit module
Loading binary module from -I option

The Bazel rules explicitly call out all the required dependencies from Swift/system (pointing to appropriate search paths, SDKs, and other deps involved).

I am not familiar with Bazel and never played with it. I asked the question because from the example attached, the explicit swift module map only contains one module, which I am not sure if that is the case for production system. Ideally, we want all the dependencies are exhaustively listed in there and we can use -disable-implicit-swift-modules. I will check bazel aquery when I have time.
As to support working-directory in swift-frontend, I don't have the context for all the reason behind such decision. I can guess a few, for example, the underlying file system is shared by swift and clang, also between all the implicit build threads. In the explicit build work, the worst problem is gone, but it is hard to argue against the simplicity of resolving all the path in driver so swift-frontend doesn't need to deal with that. I can't make a call for that and I am also willing to learn all the reasons behind that for a discussion.

Bazel is using the feature added here to allow us to use the explicit module map feature, while still enabling implicit modules for system dependencies, during this transition time before we support fully explicit module builds. So in bazel it's expected that today that file only contains modules from your project, as the system modules are still discovered implicitly.
As Brentley said above the original intent of this was that using -I many times for many search paths had a quadratic performance impact and this approach improved compilation time for us by ~30%! (more context here) I believe the compilation performance issue is actually fixed today but it sounds like Xcode might still suffer from a similar performance bottleneck (maybe if this was working we could test that more accurately).
Aside from performance there is another hermeticity benefit from using this file as opposed to -I. The case is if you have a directory with multiple .swiftmodule files like this:
DerivedData/.../Foo.swiftmodule
DerivedData/.../Bar.swiftmodule

And you want to be able to depend on Foo but not Bar, using -I does not allow you to restrict this, but if you use explicit modules and exclude Bar from the explicit module json file you can limit this. Hermeticity is generally a core feature of bazel so this is a benefit for us where we require users to include Foo and Bar in their deps if they want to depend on both (there are some caveats to this with using sandboxing but some folks disable that because of the performance impact).

The Swift compiler does some weird stuff with the working directory argument like manually applying it to all path args, see here. This looks like an oversight - the working dir is unused https://github.com/apple/swift/blob/77e694ad0d3729f4a5cab48d3cfcb3e0d34e5f74/lib/Frontend/CompilerInvocation.cpp#L1748C10-L1748C32 and the parser has no idea: https://github.com/apple/swift/blob/77e694ad0d3729f4a5cab48d3cfcb3e0d34e5f74/include/swift/Frontend/ModuleInterfaceLoader.h#L318

The working directory code handling code you point out is in Driver (which is going to be removed and is already replaced by swift-driver). The idea is for the swift driver to canonicalize all the paths so swift-frontend do not need to worry about working directory.

The working directory code handling code you point out is in Driver (which is going to be removed and is already replaced by swift-driver). The idea is for the swift driver to canonicalize all the paths so swift-frontend do not need to worry about working directory.

There's another issue that's similar to this with soureckitd - https://github.com/apple/swift/issues/60694 - I think that might be related to how the args get passed to clang. If they're passed to Clang still in their relative form Clang preserves them in relative form and then the dependency tracking subsystems fail to stat the files since they are relative (see swift/lib/IDETool/DependencyChecking.cpp)

Right. I don't know the IDE part very well, and I don't know where we are to get IDE to use explicit module (@artemcm). The explicit module on the build side is new swift driver only feature but IDE is still on old driver.

sourcekitd doesn't currently work with explicit modules - I'm in the midst of trying to add support in https://github.com/apple/swift/pull/67491 but need to address some issues that the tests are running into.

@cachemeifyoucan @artemcm
I noticed that explicit module map is now enabled by default in Xcode 16 (which is great). However, we're currently using Bazel and with the above issue still up with Xcode 16, I'm wondering if there are any updates or workarounds on how we make this work with Bazel. (where paths are relative and not absolute)

I am more and more leaning towards this is build system bug to fix. Ideally, we really don't want to expose swift-frontend that actually compiles the code to any relative paths (and I hope we can add a warning about it but that will certainly break your usecase). This will also help us canonicalizing swift compilation better for things like compilation caching. Also since -working-directory never actually did anything in non-driver code, changing this behavior is not trivial and can break other clients.
As a workaround, can we teach Bazel just to switch directory before each build command to simulate -working-directory flag?

I am more and more leaning towards this is build system bug to fix. Ideally, we really don't want to expose swift-frontend that actually compiles the code to any relative paths (and I hope we can add a warning about it but that will certainly break your usecase). This will also help us canonicalizing swift compilation better for things like compilation caching. Also since -working-directory never actually did anything in non-driver code, changing this behavior is not trivial and can break other clients.
As a workaround, can we teach Bazel just to switch directory before each build command to simulate -working-directory flag?

Thanks for the suggestion. While we can explore implementing directory switching before each build command(wherever needed) in scripts that are fully under our control, it's worth noting that there are scenarios like Xcode indexing jobs where we don't have any full control. These jobs are triggered by Xcode, taking in the scheme target compiler args and if these jobs are passed -working-directory and -explicit-swift-module-map-file flags, indexing would fail(as the working directory won't be the same as the execution directory - same issue).

@bnbarham might have better idea about indexer. I assume the setup is just getting a module-map-file from Bazel and pass that as OTHER_SWIFT_FLAGS to Xcode so indexer is confused by the relative path in the map file?
I guess in this case, one of the components in the pipeline need to patch up the path to be absolute path. If Bazel only works with relative path, it might be a good idea to setup a process during the build/development workflow that the paths are rewritten in explicit module map when exchanged between Bazel and local build system.

Thanks for the insights, @cachemeifyoucan. I made the paths absolute and discovered that the -explicit-swift-module-map-file flag isn't even passed in the open module sourcekit requests. (when we tap on an import statement module name, here the expectation is the module interface would be shown but it errors out). But yes, other indexing file jobs are successful.
@bnbarham
Given this, I'm curious to know if there's an allowed-list for flags, and if so, whether the -explicit-module-map-file flag can be included in it. This might help resolve the remaining issues we're encountering.
Also, haven't really checked the lldb and explicit module map interop. Any insights on that - whether we need any special setup there?


ensure google/fonts/noto* have articles

Noto prs to google/fonts must have an article/ dir which contains a file called ARTICLE.en_us.html e.g https://github.com/google/fonts/tree/main/ofl/notomusic/article.

This is becoming quite a pressing issue. I suggest we implement this asap since Simon is making many noto prs.
cc @vv-monsalve @chrissimpkins

This is becoming quite a pressing issue. I suggest we implement this asap since Simon is making many noto prs.
cc @vv-monsalve @chrissimpkins

@simoncozens

I'm really sorry about this. I'll implement it.

@simoncozens COuld this issue be closed by #3891? Or is there something still in progress?

Yes, I think this is now fixed.


File info retriever

I have added file info retriever.

Added file info retrieval , soon will be class based

Added file info retrieval , soon will be class based

You know how much we hate OOP... 😂😂
Aynaws all upcoming PRs will be OOPed


[SvgIcon] Add a visual regression test

[x] PR has tests / docs demo, and is linted.
[x] Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
[x] Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@oliviertassinari Thanks for picking this up.
Unfortunately I can't test it though, as I still can't get the regression test suite to run. (I've tried upgrading node & deleting and reinstalling test/regression/site/node_modules).
Code LGTM though.

@mbrookes What version of node are you using. Could be an issue on that end?

I was on 5.11.1, upgraded to 5.12.0, same error in both cases.

On my end:

$ node -v
v7.2.0

But I'm not sure that have any impact.

Thanks, I'll give that a go.

Bingo! Regression tests are go.


[PE-D][Tester C] filter does not accept multiple parameters

The example in the UG shows filter being applied on multiple parameters:

But when the user attempts that, it gets this error that dictates only 1 parameter:

Labels: severity.High type.FunctionalityBug
original: craigtonlian/ped#16

The user guide has been correctly updated to only accept one parameter.

Marked as duplicate of #144


A11y_AzureDataStudio(Schema,Dacpac,Backup)_Recompare pop up_Screenreader: After activating the popup "Recompare" NVDA announces "Option button first".

“Check out Accessibility Insights! - Identify accessibility bugs before check-in and make bug fixing faster and easier.”
#A11yMAS; #A11yTCS; #A11y_ADS_Schema_Dacpac_Backup; #Azure Data Studio; #DesktopApp; #Win10; #MAS2.4.2; #MAS1.3.2; #NVDA; #Jaws;
Environment Details:
Application Name: Azure Data Studio
Application Version: 1.9.0 (user setup)
Commit: 78a42e1
Electron: 3.1.8
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.18362
Additional Details:
Screen reader  : NVDA 2019.2.rc2, Jaws
MAS reference: MAS2.4.2 MAS1.3.2
Repro Steps:

Launch Azure Data Studio application.
Connect to server with windows credentials.
Navigate to Extensions from left menu.
Search & install Schema Compare extension.
Navigate to Connections from left menu.
Expand the server connected in step 2.
Right click an on prem database and select Schema compare from Context menu.
Navigate till Select Source or Select Target & hit enter.
Provide all the details for Source & Target.
Navigate till Ok button & hit enter.
Navigate till Options menu from Schema compare Menu bar & hit enter.
Check or uncheck some options & hit Ok.
Validate Re compare pop will open
Start NVDA and check how it read the information.

Actual:
After activating the popup "Re-compare" NVDA reads the information as "Button Options warning Option has changed..." which is not correct.
Same issue is observed with Jaws
Expected:
After activating the popup nvda should read the information as "Options has changed ….. Dialog/Alert/Popup "
Recommendations:
Refer below link which is repository of bug fixes code snippets: https://microsoft.sharepoint.com/teams/msenable/mas/pages/browse-fixes.aspx
User Impact:
Screen reader user will not know the information about the dialog.
MAS Reference:
MAS2.4.2:https://microsoft.sharepoint.com/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={c74ff881-82b6-4401-92cf-8919f9bffaf2}
MAS1.3.2:https://microsoft.sharepoint.com/:w:/r/teams/msenable/_layouts/15/WopiFrame.aspx?sourcedoc={54f28d1f-a2d1-4dcd-84e1-5c9b87e8aba4}
Attachment for Reference:

This is caused by the fact that focus of vscode goes to main window even after toast notif opens- https://github.com/microsoft/azuredatastudio/issues/6661

Reopening and reassigning to @fsteffi as per the Accessibility External Bug Process. @fsteffi, this is an upstream issue from VS Code. Per the instructions in the External Bug Process, can you file this bug with vscode and track it there? https://github.com/microsoft/vscode/issues
This issue is related to #6661. The same fix would likely solve both issues.

Reopening and reassigning to @fsteffi as per the Accessibility External Bug Process. @fsteffi, this is an upstream issue from VS Code. Per the instructions in the External Bug Process, can you file this bug with vscode and track it there? https://github.com/microsoft/vscode/issues
This issue is related to #6661. The same fix would likely solve both issues.

Marking this for Exclusion. @fsteffi, please work with a SME to review.
https://microsoft.sharepoint.com/teams/ceacc/SitePages/External-Bug-process.aspx
Importance of Experience: minimal
Schema compare feature is an extension, not part of ADS core, thus does not affect all users. The re-compare pop-up is also not a critical experience for schema compares; it provides a convenient way to execute a Compare after modifying options, but the same could be achieved by directly selecting "Compare" without the need for the pop-up.
Quality of Experience: manageable
Screen reader users may be slightly confused about the state of the screen when the re-compare popup appears. However, the popup is not necessary to the scenario. Simple workaround: After modifying options, instead of accessing the pop-up, users can directly select "Compare" to recompare.
AAT Conformance Doc: https://cela-ra-aat-prod.azurewebsites.net/#/workflow/ee5c9007-47f4-4fcb-a4d7-a998a617edde?tab=default
External Remark: For users who have installed and are using the Schema Compare extension, when the user executes a Compare and then modifies Options, a toast notification element is displayed, which is not read in the correct order by screen readers. The screen reader will first re-read the Options button before reading information in the notification, which is unrepresentative of the true state of the screen.

@hannahqin we have logged external bug : https://github.com/microsoft/vscode/issues/81484

This was re-filed with vscode as microsoft/vscode#81787

Closing as upstream

Not approved, as this is an improper use of toast and was not acknowledged by the external party.

@Alexandria-R The VSCode (external) team is saying that they do not think toast notifications should steal focus, and that we should use a large modal dialog if we want focus to shift immediately.
We are using toast notifications as expected according to VSCode's documentation and believe that it's the best user experience to use a toast notification in these cases instead of a modal dialog. However, we don't have control over where focus moves when the toast notification pops up, as described in this issue filed by @fsteffi.
Assuming that we are using toast notifications as VSCode intends, which we are, and you believe that the current behavior of screenreader focus is an accessibility issue, then this needs to be taken up with the VSCode team. We unfortunately do not have control over this.
Same comment left in https://github.com/microsoft/azuredatastudio/issues/6661


Remove empty toolbar

Got rid of annoying empty toolbar :tada:
before

after

Nice and clean

cool, didnt know it was possible, seems a bit hacky


Add resolveRefs option or method

What version of Ajv are you using? Does the issue happen if you use the latest version?
v4.11.5
Ajv options object (see https://github.com/epoberezkin/ajv#options):
const options = {
    v5: true,
    allErrors: true,
    verbose: false,
    jsonPointers: false,
    uniqueItems: true,
    unicode: true,
    format: 'full',
    formats: {},
    unknownFormats: 'ignore',
    schemas: {},
    missingRefs: true,
    extendRefs: true,
    loadSchema: undefined,
    removeAdditional: false,
    useDefaults: true,
    coerceTypes: false,
    async: undefined,
    transpile: undefined,
    meta: true,
    validateSchema: true,
    addUsedSchema: true,
    inlineRefs: true,
    passContext: false,
    loopRequired: Infinity,
    ownProperties: false,
    multipleOfPrecision: 0.1,
    errorDataPath: 'object',
    sourceCode: true,
    messages: true,
    beautify: false
}

JSON Schema (please make it as small as possible to reproduce the issue):
const schema = {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "date": { "$ref": "#/definitions/DateTime" },
        "notes": { "$ref": "#/definitions/String500" }
    },
    "additionalProperties": false,
    "definitions": {
        "DateTime": {
            "type": "string",
            "format": "date-time"
        },
        "String500": {
            "type": "string",
            "maxLength": 500
        }
    }
}

Your code (please use options, schema and data as variables):
See RunKit example.
var ajv = Ajv(options);
console.log(ajv.compile(schema).schema.properties);

Outputs:
{
    "date": { "$ref": "#/definitions/DateTime" }, // still defined as $ref
    "notes": { "$ref": "#/definitions/String500" } // ..
}

What results did you expect?
I need $ref values to be resolved within the compiled schema. But (as noted in docs) .compile() method stores the schema as a reference without resolving references.
inlineRefs option seems to be used for inlining referenced schemas but it doesn't. extendRefs is something else either.

duplicate of #22

$ref is not equivalent to schema inclusion - the expectation you have is wrong.
You can read more on the issue in various discussions in JSON-schema-org, this is the last https://github.com/json-schema-org/json-schema-spec/issues/279#issuecomment-288558322

inlineRefs option seems to be used for inlining referenced schemas but it doesn't.

It affects code generation - with this option false $ref is compiled to a function call, by default the code is inlined when possible. The schema itself NEVER changes.

For a subset of possible JSON-schemas $ref can be seen as pre-processing instruction to include the referenced schema in place. In general case such pre-processing is NOT possible.
Performing any schema manipulation, including inlining $refs in place, is out of scope of this package. The scope of this package is validating data against given schema.

Fair enough. Thanks.

Added to FAQ: https://github.com/epoberezkin/ajv/blob/master/FAQ.md#generating-schemas-with-resolved-references-ref


Upgradable immutable smart contracts.

Casper has upgradable contracts, but only contracts owned by an account can be upgraded.  It is mostly undesirable setup, especially if you want to trust the contract. In case of an account-owned contracts, the account can be compromised and new version of contract with malicious code can be deployed. It forces smart contract developers to deploy immutable contracts or use some kind of proxy pattern.
I propose to allow smart contract to upgrade itself. Here is how a simple upgradable DAO could work.

The DAO smart contract is deployed. It holds a list of members and each member has a single vote.
A security researcher finds a bug in the DAO smart contract and reports it to the DAO (over Discord).
DAO members agree to upgrade the contract with the fix. Here is what needs to happen.
In the first step they allow the security researcher to propose a new version of a contract. Through the voting process they have to make the contract to call the host:casper_host::allow_contract_upgrader(Address("0xSecurityResearcher"));

Now that the security researcher is allowed to propose a new version, they build a new code into a WASM file. Then deploy it to the network. The call methods, instead of installing this contract, needs to propose it as a new version of another contract.let upgrade_id = casper_host::propose_contract_upgrade(
    Address("0xDAO"),
    contract_entrypoints,
);

Now the DAO needs to vote one more time to accept the new version. If the vote is successful, then the DAO contract should call the host:casper_host::upgrade(upgrade_id);

Above solution:

prevents DOSing contract with new versions, by whitelisting possible upgraders,
allows contracts to have their own logic of deciding when to make upgrades,
is quite simple.

More details can be explored, but first I'd like discuss the idea of upgrading immutable contracts in general.

Please review the docs for the new Addressable Entity

@MParlikar, the document you have linked doesn't mention Contract Packages. Does it mean this concept is gone in 2.0? Could you please clarify?

@MParlikar how is this related to self upgrading contracts?


Visual change to indicate when editor loses focus

I think there needs to be some visual clue when the editor pane has lost focus (eg. to the tree-view), particularly when some editor text is currently selected. Ordinarily if the editor loses focus the cursor disappears to give some indication, but when text is highlighted the cursor has already gone. If you now switch the focus to the tree-view there is no change in the editor appearance.
Highlighting then clicking on the tree-view taking focus away from the editor:

I had a couple of issues when highlighting with the intention of deleting text, then clicking on the tree-view (expand a sub-folder or something minor without changing the active file), then having been distracted, coming back to press backspace to delete the text and nearly lost a file. :( (thankful for the confirm deletion dialog! :+1:)

@atom/feedback Do you think this should be handled in core, or on a theme-by-theme basis?

I think this should really be core behavior.
Leaving it up to individual themes to implement makes it very inconsistent, breaking people's expectation whenever they change themes (especially if some of them don't even bother implementing it).
The text editor could be just ever so slightly dimmed, or perhaps the tree-view could be highlighted in a way that makes it more obvious that it is the active panel.

The problem with expecting it to be in core is that it can still be overridden in themes ... which still makes it very inconsistent (or at least slightly less than very inconsistent). I think it is better if we rigorously document what expectations there are for themes.

It's probably not that easy to find a good default that works for most themes. Changing colors, adding borders etc. might already feel too intrusive. But adding a certain default could still educate theme authors since they have to override it if they don't like it.
Also there seems to be an issue where :focus has no effect on .active panes, see: https://github.com/atom/one-dark-ui/issues/75#issuecomment-106671648. Not sure if bug or intended.

maybe it is possible to globally decrease saturation?

I think a dimmer (or indeed decreased saturation) might be both subtle and universal enough to request from (or enforce on) themes?

The problem with expecting it to be in core is that it can still be overridden in themes ... which still makes it very inconsistent (or at least slightly less than very inconsistent).

Hell, themes have the power to break every single component in Atom if they really wanted to (even /deep/ in the Shadow DOM :laughing:) – I think it would be reasonable to add a simple base style for indicating when the editor is blurred that theme authors could then choose to override if they really wanted to.

I think it is better if we rigorously document what expectations there are for themes.

I think we should do this too, but I think we can also add a simple base style for this.

Omg, a dimming, desaturating blur when out of focus!

Desaturating blur:

atom-text-editor:not([mini]) {
  -webkit-filter: saturate(.8) blur(2px);
  transition: -webkit-filter .32s;
  &.is-focused {
    -webkit-filter: none;
    transition-duration: .16s;
  }
}

maybe a bit too extreme. :grin: Also, using filter or opacity on the whole editor might cause performance issues.

Maybe it could be a layer on top that has a semi transparent background color like the editor. So it wouldn't mess with the editor itself:

atom-text-editor:not([mini]) {
  &::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: inherit;
    opacity: .4;
    pointer-events: none;
    transition: opacity .32s;
  }
  &.is-focused::before {
    opacity: 0;
    transition-duration: .16s;
  }
}

Although if the editor loses focus, it doesn't necessarily mean you don't wanna read it. Like when previewing files in the tree-view or doing a search.

The desaturating blur is pretty cool-looking, but I meant blurred as in not focused, rather than blurred meaning a blur effect :laughing:.
I like the second option a lot though - maybe it could be a bit more subtle to not discourage reading as much?

Hehe.. yeah.. Just tried to do @batjko's "a dimming, desaturating blur when out of focus! "
The opacity: .4; could be tweaked, although if it's too subtle, it might be hard to tell if it's actually focused or not. For that reason I still prefer the pane markers in the One themes. Easy to spot and don't mess with the editor.

The desaturating blur is pretty cool-looking, but I meant blurred as in not focused

Yes I know, but it put the image in my head ;)
@simurai I like the (actually) blurred version as well, although it is a bit slow on occasion it seems.
I think the opacity version can't be too subtle or it misses the point of being obviously out of focus, you know?

Just tried reducing the blur to something less 'discouraging of reading':
-webkit-filter: saturate(.9) blur(0.8px);

And that works pretty well for my purposes.

I think desatuarting should be more agressive, @simurai did you tried just desaturating without blur? I think it is not the same as overlay.

If you desaturate too much though, you end up breaking the syntax theme visually:

Looks off that way.

maybe it is possible to deaturate only syntax/text without touching background?

I'm not sold on strong desaturation, to be honest. So far I like a subtle blur with a maximum of 10% desaturation the best.
But whatever the details, it's probably the nicer way to do it, compared to some blinking highlighting frame around the panes.

Changing the visual appearance of code based on focus is a bad idea. Blurring the text when out of focus is a truly horrible idea. How are we supposed to read code in an unfocused Atom instance if it's blurred?
Changing the chrome of the Atom window is fine, but do not touch the text editor elements themselves. That only leads to bad UX. What sensible editor changes the readability of code based on whether the window is focused or not?

@thomasjo I can see use cases where people might want to retain full readability while not focused, fair point.
Personally, I like it and will continue using @simurai's quick trick in the stylesheet until something better comes around.
But I can see how it should at least not be mandatory in any way.

Why don't we focus (pun not intended) more on changing the appearance of the window/app chrome instead? I'm in favor of making it easy to distinguish when an Atom window has focus or not, as long as we don't touch the code itself.
I'll try a few experiments, and report back if I figure something out.

I don't think there's a good way of resolving this from core without killing usability while also not breaking any themes (I'm mostly concerned about community themes). Solving this at the theme level is trivial in comparison.
Quick and dirty proof of concept for one-dark-ui
@import "ui-variables";
@import "ui-mixins";

body.is-blurred {
  .tab-bar .tab {
    &:before {
      opacity: 0;
    }

    &.active .title {
      color: @tab-text-color;
    }
  }

  .tree-view {
    .list-item, .selected > .list-item {
      .text(subtle);
    }
  }
}

This obviously needs tweaking, placement in appropriate files and what not, but is suitable for concept testing since it can be pasted directly into styles.less. On the left is the active (and current) styles, and on the right you can see the visual effect when the window is unfocused

Instead of changing the text color in the tree-view, it might be better to simply tweak the opacity, e.g. replace the .text(..) mixin with opacity: 0.6.

@thomasjo, I think you're focusing too much on the window, while the issue is about the text editor which can be unfocused even if the window does have focus. I agree with you that the readability of code shouldn't be messed with. It would make working with split panes a pain, among other things.
An idea that popped into my head, for selections specifically: change their appearance from a solid block to an outline, see images below. It's subtle, but very noticable.

Left: focused editor. Right: blurred editor
atom-text-editor:not(.is-focused)::shadow .highlights .region {
  background-color: transparent;
  border: 1px solid @syntax-selection-color;
}

One problem with this approach I can think of is that it's quite difficult to get this to work consistently across highlights from multiple packages. Another approach could be to reduce the opacity/saturation.

I think you're focusing too much on the window, while the issue is about the text editor which can be unfocused even if the window does have focus.

Good call, I missed that part. Thanks for letting me know! That just makes it even more important to not destroying legibility.

It would make working with split panes a pain, among other things.

Totally forgot about that. Good point. Blur and any other readability-reducing thing is definitely out the window with that one.

I like the solid->outline approach, but certainly agree that could be confused with other outlines like highlight-selected and searches.
I've tried fading out only the selection and quite like the effect. Originally included the transition effect to match the duration when combining in tandem with the fading of the whole editor view... looked cool so I kept it (wouldn't have to be that way as standard). Not sure how to get the same transition on the fade back in with out having it always behave like that when the focus is on :confused:

atom-text-editor:not(.is-focused)::shadow .highlights .region {
  background-color: fadeout(@syntax-selection-color, 95%);
  transition-duration: .16s;
}

I guess the issue can be narrowed down to:

particularly when some editor text is currently selected. Ordinarily if the editor loses focus the cursor disappears to give some indication, but when text is highlighted the cursor has already gone.

Removing the selection on blur might be ok, just like the cursor. Unless there are situations where you still want to see the selection in blurred editors? Are there any?
Here a selection with borders that get removed when blurred:

atom-text-editor.is-focused::shadow .highlights .selection .region {
  box-sizing: border-box;
  border-left: 2px solid @syntax-cursor-color;
  border-right: 2px solid @syntax-cursor-color;
}

But feels a bit aggressive to be added to core. :smiling_imp: