2022 Retrospective— 8 min
It is the end of the year, and a lot of people are writing end-of-year posts, and outlooks for the new year. So here is mine.
It was an interesting year for sure. We shipped a bunch of stuff. Some internal that otherwise noone would know about and others external features adding support for new platforms and ecosystems.
A big internal item was switching our serverside processor from breakpad to rust-minidump. The crate was primarily developed by folks at Mozilla, but our team contributed a bunch of fixes and extended support to other platforms such as MIPS.
We ran both implementations side by side for some time to gather up differences and were looking at some mismatching cases. We fixed regressions and celebrated improvements. Though some regressions slipped through and we had to fix them after the switch. As we are dealing with customer data though, it was not really possible to create testcases out of all the interesting cases.
Our support for unwind info was also extended, especially on Windows to be able to unwind in more situations.
There were also a bunch of fixes to our own SymCache format, a lot of which were contributed by Mozilla people as well.
We also started dogfooding our own performance monitoring product, as well as the profiling support in some limited fashion.
On to more visible features, we enabled support for line numbers in Unity projects. After a lot of initial experimentation and exploration, we ended up with a simple and elegant solution. The Unity il2cpp compiler puts annotations into the generated C++ sources that map back to the C# code they were generated from. We simply use those annotations to map back to the C# code.
There is one followup to the whole Unity story however. As we do not control the stack walking on the client-side at all, we are at the mercy of what Unity gives us. And in some cases it gives us offset instruction addresses. In other cases we offset those again in a wrong way.
Surprisingly, the source of this problem touches lots of parts of the product, and work is ongoing to find a solution that serves more usecases as well.
Next up, we added server-side support to symbolicate .NET stack traces. And a contractor even extended this support to also offer source context as well.
Whereas we have server-side support for this for quite some time, the .NET SDK is a bit lacking behind, but should soon catch up to ship this feature to customers.
Another big thing we shipped was improved SourceMap support. We are now parsing the minified JS source to extract function scopes and give them reasonably meaningful names, and using the SourceMap to recover the original names.
You can read up on our blog post that explains all this in more detail. We also designed a new lookup format for this that is very similar to our existing SymCache format. This opens up the door to cache all these computations to amortize their cost in the future.
Apart from all this feature work, I also blogged about some interesting issues and bugs that I fixed along the way, like format ossification and a serious inefficiency in the parsing of DWARF Abbreviations.
Inspired by the above feature work on SourceMaps and .NET Portable PDBs, I started a blog series exploring those formats in great depth. I am procrastinating hard, but still plan to eventually write about DWARF and native PDB formats as well.
I wrote quite a lot of posts about Rust this year. Take a look at the archive, they are too many to list.
These range from educational posts about Futures in general, commentary on some of the broader discussions in the ecosystem as well as describing some common pitfalls and exploring some zero-copy parsing.
I called out to fix rustdoc doctests as they are rather held together by doc-tape right now. (Yes, I want to make this pun a thing!) Some posts in the community about what the Rust foundation should focus on mentioned hiring / funding people to work on especially tedious and non-glamorous tasks. Doctests seem to be one of those, and are in need of someone giving more love to them.
One PR of mine, stabilizing the
flag, which itself is just an implementation detail to make the output of
cargo test more readable has been in FCP limbo for quite some time now, and
there is little movement.
Towards the end of the year I took it on myself to improve the inner workings
async fn. Primarily motivated by Sentry starting to dogfood our profiling
product, and seeing how bad async stack traces look in profiles. Someone called
me out that this is indeed a big “yak shave” just to get prettier stack traces.
This was not as smooth sailing as I had hoped though. Whereas removal of the
GenFuture is on its way to Rust
1.67, the state it is in does
take one significant shortcut.
The Future gets a
&mut Context<'_> from the outside, but is treating that as
ResumeTy is an unsafe pointer wrapper around
and its only purpose is to paper over some shortcomings in the type checker.
For now, this works in practice as
&mut Context<'_> are really
just pointers, but the
cg_clif codegen backend validates these types more
strictly and is complaining, rightfully so.
An earlier attempt of mine to fix that and use
&'static mut Context<'_>
failed as it caused a
higher-ranked lifetime error. This error already existed,
and still exists for some weird cases, though my change really did break existing
It was eventually reverted, but left
nightly and even
beta in an unusable
state for some people for some time. A lesson to myself here is to revert
things earlier if there is serious breakage.
Reverting that change however is still causing problems for
cg_clif. I do have
a PR up that replaces this
ResumeTy later in the pipeline so the type checker is still dealing with
ResumeTy for now. I believe there is already work underway in the type checker
to solve the underlying problems that made this workaround necessary.
Well, probably everyone is feeling it themselves that we have arrived in a real cost of living crises. I won’t go into details of who is responsible though.
I wanted to buy real estate and relocate for some time, but that plan is put on ice right now, as this depends on four factors that make right now the worst time to commit to such an investment:
- Financing options have been getting worse over the year to a point where mortgages are not affordable at all.
- At the same time, real estate prices are as inflated as ever, and there is not yet a trend of them going down either.
- Cost of living has exploded, so after living expenses there is less capital left over to allocate to investments.
- Salaries haven’t caught up yet with any of this.
I fear that things are getting worse still before they get better. Its also a sentiment shared by a lot of people.
All in all, this whole situation makes me super anxious, and it feels like the world around me is going to shit.
Well, lets leave this year behind us and start fresh into the new one, shall we?
I’m not someone to have big plans and ambitions, but there is one thing I would like to do this coming year.
Sentry has recently acquired CodeCov. This is great news, as I am super passionate about code coverage as well. After all, cov.rs redirects to my blog here.
I have contributed improvements to code coverage of doctests already two years ago, and was taking a look at some preliminary work to eventually add proper branch coverage support to the Rust compiler.
With these recent news, I hope I will be able to dedicate some official time
to this effort. Along with taking care of any followup work from my changes
async functions. And I would also like to present the inner working of
async functions any my work to improve that at a meetup and/or conference
sometime this year as well.
That is pretty much all I can think of right now. Everything else I will make up as I go. :-)