@bradwilson@mastodon.social
@bradwilson@mastodon.social avatar

bradwilson

@bradwilson@mastodon.social

#Code #Motorcycles #Music #BoardGames #VideoGames #Photography #AntiFascist #AntiRacist #PostTheist #Feminist #EV #GreenEnergy #BlackLivesMatter | https://dotnet.social/@xunit's caretaker | He/him | 0.00115 miles tall

Previously: GitHub, Microsoft, and others.
Now: Living that retired life.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bradwilson, (edited ) to dotnet
@bradwilson@mastodon.social avatar

This is super duper extra important.

C# Nullable Reference Types are a compile-time thing, not a runtime thing. "string?" and "string" are both just "string" at runtime.

This means:

  • Always guard against your users passing null even for types that shouldn't allow it, because it's not a runtime guarantee.

  • You can't create overloads that differ only on nullability (i.e., Method(string) vs. Method(string?)) because they're the same type at runtime.

bradwilson, to random
@bradwilson@mastodon.social avatar

Just a reminder: Voting in the primaries is about trying to find your perfect candidate. Voting in the general is about picking the one that's better than the other.

And in 2024, one is trying to end democracy. You don't get to sit this vote out just because neither is the perfect candidate, because your inaction may mean there are no more votes, ever.

bradwilson, to LEGO
@bradwilson@mastodon.social avatar

A little more than halfway through and it's starting to take shape.

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

Anybody know when we get the 4.10 NuGet packages (like Microsoft.CodeAnalysis)?

I'm assuming they're going to follow the "even" pattern and declare 17.10 as LTSC, which means I will want to officially support Roslyn 4.10. Both of these pages are currently out of date:

https://learn.microsoft.com/en-us/visualstudio/productinfo/vs-servicing

https://learn.microsoft.com/en-us/visualstudio/extensibility/roslyn-version-support?view=vs-2022

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

I've been noticing whole-machine slow downs whenever I heavily use my Dev Drive (for example, building source) that are just unacceptable.

A common example is I'll start a full build in Visual Studio and then go to type in Windows Terminal and everything I type will be delayed by multiple seconds. Even pasting will show only a few characters at a time.

So, back to raw SSD and (sigh) NTFS for now.

bradwilson, to github
@bradwilson@mastodon.social avatar

How do I remove the button from 2022 17.10 menu bar?

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

Pro-tip for the day:

dotnet does not appear to require a trailing backslash when you define a custom NuGet package cache path via env var NUGET_PACKAGES but Visual Studio does.

Good:
NUGET_PACKAGES=X:.nuget\packages\

Bad:
NUGET_PACKAGES=X:.nuget\packages

bradwilson, (edited ) to random
@bradwilson@mastodon.social avatar

I don't understand why @bot exists when you can subscribe to hashtags. What's the value-add?

bradwilson, to random
@bradwilson@mastodon.social avatar

I love TDD but sometimes I hate following the hashtag (purposefully not linked here) because of the posts by Scrum Shills. (Apologies if you're really into Scrum, but from my perspective it's nothing but Agile Amway.)

bradwilson, to TeslaMotors
@bradwilson@mastodon.social avatar
bradwilson, to windows
@bradwilson@mastodon.social avatar

Found my first issue with using a Dev Drive, and wanting to have access to it from WSL: apparently the way Dev Drives mount in Windows is not compatible with the WSL auto-mounting.

Why does this matter? Docker Desktop (in WSL 2 mode) can't mount a Dev Drive folder.

Do I dump WSL 2 mode for Docker? Or do I dump Dev Drive? Tough choice, but I suspect I dump the Dev Drive.

In WSL 2, /mnt/c/Dev gets an I/O error because "cannot read symbolic link".
Trying to mount C:\Dev on Docker in Windows (running in WSL 2 mode) claims it can't create /run/desktop/mnt/host/c/Dev because the file exists (but in reality, the error is that it can't read that folder from WSL).

bradwilson, to github
@bradwilson@mastodon.social avatar

There is something wrong with this that I can't quite understand how to fix, but the problem is this:

Almost 100% of the time when I'm writing a response in a discussion, I want it to be in response to an existing thread, not as a new post. But this UI just screams "new post please!" and relegates the "reply" functionality to visual second class.

bradwilson, to random
@bradwilson@mastodon.social avatar

Windows Terminal seems to have its own font renderer, and sometimes it's just plain worse than what's built in.

Compare these two prompts from CONHOST (darker, left) and Windows Terminal (lighter, right). Same text, same font, but the Windows Terminal rendering frequently gets the shape and size of the diagonal blocks wrong, which causes artifacts like color bleed and/or misaligned edges. Worse, which artifacts you see changes with the font size.

image/png

bradwilson, to ubuntu
@bradwilson@mastodon.social avatar

I've updated my ansible-dev-pc¹ repository to support the recently released Ubuntu 24.04 (hence my discussion on getting .NET to behave). This supports Desktop Ubuntu 22.04/24.04, Pop!_OS 22.04, and Ubuntu 22.04/24.04 in WSL 2.

I'm still waiting for Pop!_OS 24.04 to be released so I can verify it there as well.

¹https://github.com/bradwilson/ansible-dev-pc

bradwilson, to random
@bradwilson@mastodon.social avatar

When opening a bug in an (dev-oriented) project, don't simply say "please do X". Tell them what the problem you're trying to solve is, what methods you've tried, and why that isn't working. You can include history of the paths you've gone down and even suggest a possible answer, but without knowing what problem you're actually trying to solve, project maintainers don't even know what problem your solution is for, and when you even have it.

Agree on a problem first, then a solution.

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

I'm skeptical of the new tight integration of .NET to Ubuntu 24.04. I noticed two things immediately:

  • I don't have access to .NET 6 at all
  • I don't have access to the latest .NET 8 SDK any more (currently 8.0.104, despite latest being 8.0.204).

I assumed using the Microsoft apt feed would allow me to use newer even if Ubuntu's feeds were older, but... not so much.

If .NET 6 is still supported, why isn't it on Ubuntu 24.04? And why are we being held back?

bradwilson, to vscode
@bradwilson@mastodon.social avatar

I am extraordinarily annoyed by the fact that #Copilot appears to be enabled by default now in #VSCode and I can't find any way to turn it off. #dotnet #csharp

bradwilson, to random
@bradwilson@mastodon.social avatar

I've been organizing my dependencies for @xunit v3 so I can minimize them (anything that doesn't ship in .NET itself is a potential compatibility clash with library versions that developers want to use).

I'm not that worried about System.Collections.Immutable or IAsyncDisposable having breaking changes across major versions. System.Text.Json, on the other hand, feels like potential danger territory. The alternative of writing even a very feature-limited JSON parser makes me uncomfortable.

bradwilson, (edited ) to dotnet
@bradwilson@mastodon.social avatar

If I'm writing an analyzer to say "stop doing X in xUnit.net v2 because it's been removed in v3", should that be INFO or WARNING by default?

bradwilson, to random
@bradwilson@mastodon.social avatar

Time to ship a new version of @xunit v2. It's been a month, and (barely) enough has stacked up to warrant it.

bradwilson, to CSharp
@bradwilson@mastodon.social avatar

I want to see if it's possible to replace runtime reflection in @xunit v3 with source generators (for better performance and to support NativeAOT), but I think I've already hit the first blocking point: no support for ? Only and ?

bradwilson, to dotnet
@bradwilson@mastodon.social avatar

I have found a weird "bug" in @xunit that I'm having trouble tracking down.

In 2.7.0 we shifted a SynchronizationContext that was always used to one that's now used conditionally (to support async void unit tests). Two users have come forward saying their tests are now hanging. I've identified deadlocks in one's code, but how strange is it that the removal of a feature surfaces a bug in someone else's code?

1/2

bradwilson, to random
@bradwilson@mastodon.social avatar

I feel like I want to explore enough of Roslyn Source Generators so that we could remove 100% of the reflection code in @xunit.

It could in theory have a massive impact on extensibility, and may require hooks so that 3rd parties can participate in the compile-time generation of the metadata model that would be needed to replace reflection.

I also suspect this would nuke our ability to do source based discovery, though I'm not aware whether anybody is currently using it.

bradwilson, to Powershell
@bradwilson@mastodon.social avatar

I have replaced "cat" with "bat" in PowerShell, and written a "cat" function that makes it more useful to me. Bat is a replacement for cat that syntax highlights the output.

I'm able to support:

$ cat *.cs
$ dir -r -fi *.cs | cat

I have not yet been able to support piping, so that has to stay with invoking bat:

$ curl -ks https://sh.rustup.rs | bat

(I'm not 100% sure if I can support both piping from raw text as well as piping filenames.)

Script: https://gist.github.com/bradwilson/5b6d1ad8f797eee304f7028bf16253b2

bradwilson, to random
@bradwilson@mastodon.social avatar

I'm a little stuck.

The last major thing I need for @xunit v3 is the cross-process protocol for running tests. The VSTest team is taking a stab at one and I'd love to just reuse what they're doing, but I also don't know how long it'll take them, whether it'll be a good fit for what I need, and whether they'll even officially support me being on the "runner" side rather than the "test" side.

Now I'm wondering how long I wait to find out.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • khanakhh
  • kavyap
  • thenastyranch
  • everett
  • tacticalgear
  • rosin
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Youngstown
  • slotface
  • megavids
  • ethstaker
  • ngwrru68w68
  • cisconetworking
  • modclub
  • tester
  • osvaldo12
  • cubers
  • GTA5RPClips
  • normalnudes
  • Leos
  • provamag3
  • anitta
  • lostlight
  • All magazines