Thanks to visit codestin.com
Credit goes to brunogarcia.com

Bruno Garcia

Bruno Garcia

I’m Bruno, a Senior Engineering Manager at Sentry, leading the teams behind Seer’s AI Code Review and Source Code Management integrations. Previously led Session Replay, bootstrapped Sentry’s gaming team and launched console support, and managed the Mobile SDK team. I still have a soft spot for working on open source projects like NuGet Trends and Code Review Trends.
A Snail.

Pitfalls of Unoptimized NuGet Packages

Summary You might unknowingly be using an unoptimized dependency which could impact the performance of your app. Now, it’s easy to get a warning if that happens, at build time, using the NuGet package UnoptimizedAssemblyDetector: <PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.0"> <PrivateAssets>all</PrivateAssets> </PackageReference> After you add this NuGet package, a warning will be included in your build if any unoptimized assembly is detected. The source code of project is hosted on GitHub ⭐. What’s the pitfall? The default build configuration for dotnet pack and dotnet publish is not Release as you might assume or expect. When publishing NuGet packages to nuget.org, one must explicitly make it a release package, like: dotnet pack -c Release. Without it, the assemblies packed will not be compiled with optimizations. In this blog post you’ll learn that’s not always the case. Even for those who know, accidents happens and a misconfigured build script can result in a Debug build ending up on nuget.org. ...

May 21, 2021 · 11 min · Bruno Garcia
Road with speed limits printed

Hell world

As we buckle up and head into 2021, I took the time to prepare a new place to write my thoughts. The opening theme will be a typo, which I hope is to be the first of many. As it usually goes, a new year comes with new years resolutions. And here are mine: Write a blog post. At least once per year. Console.WriteLine("Hell world."); println!("Hell world."); print('Hell world.'); println("Hell world."); A blog post in 2020: ✔️

December 29, 2020 · 1 min · Bruno Garcia

Move repositories on GitHub without breaking links to PRs

Since it took me way too much time to figure this out, I’ll write it down for future references. I needed to move a git repository from one GitHub repository to another one that already had code, past PRs, etc. It wasn’t a simple rename which would make GitHub redirect everything. It was adding a new history from one repository to another, while not getting rid of the past tags, releases. ...

September 11, 2020 · 1 min · Bruno Garcia

Swift adventures: CocoaLumberjack logger

I haven’t had much contact with Swift other than writing a few unit tests on a project. So when someone asked about sending CocoaLumberjack logs to Sentry on the forum I thought it was a good excuse to write some Swift on the weekend. To create an integration between two libraries written in Objective-C, to make sure you can support the most number of apps and platforms, the choice for a language is obvious: Objective-C. ...

September 6, 2020 · 2 min · Bruno Garcia

NuGetTrends: .NET libraries download trends

I joined sentry.io just over a year ago. Soon after I started, I was tasked with writing a new .NET SDK for Sentry. Throughout the previews, I was always curious if the releases were being downloaded at all. I found myself checking nuget.org and looking at the Statistics for total downloads. It was obvious we in the .NET ecosystem were missing some package download stats website. Welcome NuGet Trends, to the .NET community! NuGet Trends is a website with historical total download count for NuGet packages on nuget.org. ...

July 16, 2019 · 2 min · Bruno Garcia

.NET runtime information in different systems

Edit: I’ve created a repository on GitHub to expose an API which simplifies getting runtime, operating system and other platform information: https://github.com/getsentry/dotnet-sentry-platform-abstractions If you are interested in contributing, please let me know. A few issues were created to discuss API design and features, feel free to drop a message there. There is already code to detect the different installations of the .NET Framework installed and also what runtime the code is running on. Preview versions are available on NuGet.org. ...

April 15, 2018 · 8 min · Bruno Garcia

CI/CD for .NET with GitHub/Travis-CI/AppVeyor/Codecov/NuGet

I recently setup continuous integration for a few open source projects. I used GitHub, AppVeyor, Travis-CI and Codecov. The resulting packages are deployed to NuGet.org. Here I aim to describe the process in an attempt to document it both for myself and hopefully help others in getting started with it. Scenario I have some .NET Core projects on GitHub that are actually just .NET Standard libraries. Ultimately, once they are built and tested on Windows, MacOS and Linux, I want them published to NuGet.org. I also want to use GitHub’s Release feature to document what I am pushing to NuGet. ...

December 2, 2017 · 9 min · Bruno Garcia

Wake on Lan in C# and Windows 8

About 8 years ago I was writing scripts to run on a network with over 130.000 computers (of which 5000 I administered). The scripts ran 24/7, parsing computer’s inventory log files, which they sent to a central server. It was possible to detect and fix a whole bunch of issues, most of the time even before a user would notice something was wrong. Note that most of those computers were running Windows NT 4, including the domain controllers. The task to install application in all those computers and keep their anti-virus signature up-to-date was not as trivial as it is today. There were times we needed to perform tasks on computers that weren’t even switched on. And I must admit, back then I was quite proud of the solution I came up with for this particular case. Although it’s not my goal to go into details on how I managed to get any of those 5000 computers, spread in 130 different offices, powered-on at any time; I want to write a little about the core of the solution: Wake on Lan ...

April 21, 2013 · 4 min · Bruno Garcia

Moq Return method not available after Setup

If you are familiar with the mocking framework Moq, you’re used to call Setup with the overload taking a Func<T, TResult> and expect after that the Return<TResult> method to be available. And it’s normally there. However, I just ran into an interesting scenario, where calling the correct overload did not make available the Return<TResult> method. In my case the code being mocked is a dependency that makes a request on a webservice. A mockup of the wrapper class is created, and the Load method, which returns an XDocument, is setup. ...

March 4, 2013 · 1 min · Bruno Garcia

SignalR: Using a Hub instance not created by the HubPipeline is unsupported

When you need to push data to a SignalR hub from outside the hub (from a Controller for example), don’t try to create a new instance of the Hub, like I did. Otherwise you’ll see this nice exception: Using a Hub instance not created by the HubPipeline is unsupported From Microsoft.AspNet.SignalR.Core Instead, the hub context must be retrieved: var context = GlobalHost.ConnectionManager.GetHubContext<HubType>(); context.Clients.All.Whatever();

February 23, 2013 · 1 min · Bruno Garcia