Skip to content

Instantly share code, notes, and snippets.

View fwcd's full-sized avatar

fwcd fwcd

  • Germany
View GitHub Profile
@fwcd
fwcd / parse-xctest-output
Created August 10, 2021 12:57
Automatic color diffs for XCTest output
#!/usr/bin/env python3
# A small script that parses the output of `swift test`
# and emits colored diffs for failed XCTAssertEquals.
import difflib
import fileinput
import re
import subprocess
@fwcd
fwcd / gsoc-2021.md
Last active August 26, 2022 22:25
Google Summer of Code 2021

Overview

My Google Summer of Code 2021 project focused on improving developer tooling for the Swift programming language, including contributions to SourceKit-LSP, a language server for Swift, and to the Swift compiler itself.

Diagnostic Tags

Diagnostic tags let editors stylize warnings about unused or deprecated editors, e.g. using strikethrough or in a different color:

Example

@fwcd
fwcd / building-mixxx-arm64-macos.md
Last active December 2, 2023 01:50
Building Mixxx for ARM64 macOS (Apple Silicon)

Warning

These are not official build instructions. No guarantees that these will work! In particular the dependencies may change at any time and you might have to check the CI builds to find out what to install.

Note

For (unofficial) binaries and scripts that simplify this build process, check out m1xxx.

Building the dependencies

To build Mixxx for ARM64 macOS, we will need to build the dependencies including Qt 6. This can conveniently be done using vcpkg, a package manager for C++ libraries. First clone the vcpkg fork which includes the relevant patches:

@fwcd
fwcd / gsoc-2022.md
Last active March 17, 2023 12:20
Google Summer of Code 2022

Overview

My Google Summer of Code 2022 project mainly focused on rewriting parts of the SwiftSyntax library using its own SwiftSyntaxBuilder DSL, more specifically, porting the gyb templates in SwiftSyntaxBuilder to type-safe Swift code, written using the library itself. During this bootstrapping process, many improvements to the DSL were added, inconveniences in the (quite large) API surface fixed and thoroughly tested. The result is a robust and ergonomic API for generating Swift code that has proven to be useful in the context of a medium-sized codebase.

The Project: Bootstrapping SwiftSyntaxBuilder

The first step was to set up the build infrastructure. In particular this required adding a new target that, when executed, produced the generated Swift files in SwiftSyntaxBuilder/generated:

flowchart LR