{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/28453","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/28453/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/28453/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/28453/events","html_url":"https://github.com/JuliaLang/julia/pull/28453","id":347729583,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjU2OTMz","number":28453,"title":"Fixed long stacktrace printing","user":{"login":"Liozou","id":23532352,"node_id":"MDQ6VXNlcjIzNTMyMzUy","avatar_url":"https://avatars0.githubusercontent.com/u/23532352?v=4","gravatar_id":"","url":"https://api.github.com/users/Liozou","html_url":"https://github.com/Liozou","followers_url":"https://api.github.com/users/Liozou/followers","following_url":"https://api.github.com/users/Liozou/following{/other_user}","gists_url":"https://api.github.com/users/Liozou/gists{/gist_id}","starred_url":"https://api.github.com/users/Liozou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liozou/subscriptions","organizations_url":"https://api.github.com/users/Liozou/orgs","repos_url":"https://api.github.com/users/Liozou/repos","events_url":"https://api.github.com/users/Liozou/events{/privacy}","received_events_url":"https://api.github.com/users/Liozou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2018-08-05T20:45:33Z","updated_at":"2018-08-06T11:28:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/28453","html_url":"https://github.com/JuliaLang/julia/pull/28453","diff_url":"https://github.com/JuliaLang/julia/pull/28453.diff","patch_url":"https://github.com/JuliaLang/julia/pull/28453.patch"},"body":"Fix #28442.\r\n\r\nThis PR makes long stacktrace printing work again by correcting #28328 in the case of stacktraces of length greater than `BIG_STACKTRACE_SIZE = 50`. However, it breaks the non-official API introduced in that same PR revolving around the possible modification of `update_stackframes_callback[]` by external packages to fix the number of lines:\r\n- Before this PR, `update_stackframes_callback[]` was called only once, and updated in-place the entire vector of `Tuple{StackFrame, Int}` where `Int` was the number of repetitions of the stackframe.\r\n- After this PR, `update_stackframes_callback[]` is called on each stackframe individually and should return a corrected stackframe.\r\n\r\nI also removed the use of `invokelatest` since `update_stackframes_callback` is a `Ref`, thus `update_stackframes_callback[]` should automatically refer to the latest implementation of the updater. Feel free to correct me if I was wrong here. I would also like to remove the `try...catch` block around the updater call but since it was in the original PR, I kept it here.\r\n\r\nIncidentally, this fixes a minor issue where cycles that were repeated only once were not shrunk.\r\n\r\n@timholy I think you should review this. I checked the code from Revise which is broken by this new API but it seems only a few lines need to be changed in the definition of `update_stacktrace_lineno!`(namely: get rid of the loop and return `t` instead of modifying `trace[i]` in-place) so that shouldn't be too bad."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/410677571","html_url":"https://github.com/JuliaLang/julia/pull/28453#issuecomment-410677571","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/28453","id":410677571,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDY3NzU3MQ==","user":{"login":"Liozou","id":23532352,"node_id":"MDQ6VXNlcjIzNTMyMzUy","avatar_url":"https://avatars0.githubusercontent.com/u/23532352?v=4","gravatar_id":"","url":"https://api.github.com/users/Liozou","html_url":"https://github.com/Liozou","followers_url":"https://api.github.com/users/Liozou/followers","following_url":"https://api.github.com/users/Liozou/following{/other_user}","gists_url":"https://api.github.com/users/Liozou/gists{/gist_id}","starred_url":"https://api.github.com/users/Liozou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liozou/subscriptions","organizations_url":"https://api.github.com/users/Liozou/orgs","repos_url":"https://api.github.com/users/Liozou/repos","events_url":"https://api.github.com/users/Liozou/events{/privacy}","received_events_url":"https://api.github.com/users/Liozou/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T11:28:57Z","updated_at":"2018-08-06T11:28:57Z","author_association":"CONTRIBUTOR","body":"I can add the `invokelatest` back, but I can't restore the original API for the time being, so there will be a `try invokelatest(...) catch` block called at each iteration, which is slow. It's for stacktrace printing so speed is probably not crucial but still. Everyone OK with this?"}}
{"actor":{"display_login":"Liozou"}}