-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To hell with get_stacktrace! #2494
Conversation
589ac3a
to
47858f8
Compare
Codecov Report
@@ Coverage Diff @@
## master #2494 +/- ##
==========================================
+ Coverage 18.07% 18.09% +0.01%
==========================================
Files 340 340
Lines 29369 29329 -40
==========================================
- Hits 5309 5307 -2
+ Misses 24060 24022 -38
Continue to review full report at Codecov.
|
47858f8
to
89acb5d
Compare
This comment has been minimized.
This comment has been minimized.
8c31e7b
to
a5e3401
Compare
7331.1 / Erlang 22.0 / small_tests / faa861a 7331.2 / Erlang 22.0 / internal_mnesia / faa861a 7331.3 / Erlang 22.0 / odbc_mssql_mnesia / faa861a 7331.4 / Erlang 22.0 / mysql_redis / faa861a 7331.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / faa861a 7331.5 / Erlang 22.0 / riak_mnesia / faa861a 7331.6 / Erlang 22.0 / ldap_mnesia / faa861a 7331.9 / Erlang 21.3 / pgsql_mnesia / faa861a |
a5e3401
to
6030a7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort! This was quick :) I have only one cosmetic comment to the code. Also there is a small inconsistency in the way variable containing the stack trace is called. Sometimes it's Stacktrace
and sometimes StackTrace
. Do you think this naming can be made consistent or is there a reason to have both variants?
src/rdbms/mongoose_rdbms.erl
Outdated
"reason=~p:~p stacktrace=~1000p", | ||
[Class, Other, Stacktrace]), | ||
{{'EXIT', Other},Stacktrace} | ||
end, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cosmetic thing. I think readability of this block could be improved a bit by moving they try ... catch
clause to a dedicated function like apply_transaction_function
. What do you think?
7333.1 / Erlang 22.0 / small_tests / 8a8a103 7333.2 / Erlang 22.0 / internal_mnesia / 8a8a103 7333.3 / Erlang 22.0 / odbc_mssql_mnesia / 8a8a103 7333.4 / Erlang 22.0 / mysql_redis / 8a8a103 7333.5 / Erlang 22.0 / riak_mnesia / 8a8a103 7333.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / 8a8a103 7333.6 / Erlang 22.0 / ldap_mnesia / 8a8a103 7333.9 / Erlang 21.3 / pgsql_mnesia / 8a8a103 |
I thought the same while doing this, but I pretty much followed the style of the code already present. Sometimes we had pattern matching against |
6030a7b
to
2167198
Compare
7334.1 / Erlang 22.0 / small_tests / a3ddf3b 7334.2 / Erlang 22.0 / internal_mnesia / a3ddf3b 7334.3 / Erlang 22.0 / odbc_mssql_mnesia / a3ddf3b 7334.4 / Erlang 22.0 / mysql_redis / a3ddf3b 7334.7 / Erlang 22.0 / elasticsearch_and_cassandra_mnesia / a3ddf3b 7334.5 / Erlang 22.0 / riak_mnesia / a3ddf3b 7334.6 / Erlang 22.0 / ldap_mnesia / a3ddf3b 7334.9 / Erlang 21.3 / pgsql_mnesia / a3ddf3b |
Also unify the stacktrace variable naming to `StackTrace`, with camelcase, for the fact that this is actually a two-words variable. This applies only on the case when we pattern-match against `Class:Reason:StackTrace`. The other option is against `C:R:S`. This style was preserved as it was.
2167198
to
2c3d061
Compare
Now only some dependencies are still giving that silly
get_stacktrace/0 deprecated
warning. To be precise, exactly these dependencies (and dependencies of dependencies and so on):Testing on CircleCI is going to be a ton faster than locally😛