tryGet messages can spam the
logs and may be better if
they are just verbose instead
of warnings. Also now
we display the line where
this tryGet call was.
This uses the developer.logs
method to print logs on
native and console.logs on
web. Therefore we have
native colored logs
everywhere without the use
of a package. It highlights
errors and warnings on
web much better and supports
collapsing stacktraces on
web.
For context, see https://github.com/matrix-org/matrix-doc/pull/3471
Basically the spec was wrong and didn't match what clients and servers
were doing. Might fix registration on matrix.org.
BREAKING CHANGE: Any client that implements the email portion will fail
to build now.
It seems that there is a problem in the matrix Spec according to this.
the Spec says that the type is required and session is nullable.
But for using this endpoint:
https://spec.matrix.org/unstable/client-server-api/#client-behaviour-1-1
We need to send an auth object which only contains the session.
We should file an issue at the spec and ask there for more information.
Currently we should make type nullable as well because otherwise
this would break uiaRequests in the app for SSO.
I see soo much annoying warnings in the logs since matrix 0.2.0
and to be honest it was never helpful to have this logs. Therefore it seems to make more
sense to make those warnings optional.
* check casts (for list and map) at cast time by recreating the list/map
instead of throwing on access.
* type warnings work now slightly differently:
* when we expect nullable fields to be actually null within normal
operation you can explicitly set the tryGet type param to an
optional type and mute the warning. Otherwise it'll warn that something
is null which we expect to something else.