Skip to content

Instantly share code, notes, and snippets.

@ckipp01
ckipp01 / helpMeUnderstand.md
Created September 2, 2022 12:30
A mental model to help understand Mill Tasks

Some notes on understanding Mill tasks

Using Mill is incredibly simple to get started with, but if you reach a point where you're defining your own tasks and/or writing plugins you're likely to hit on some instances where you'll encounter an error like this:

Target#apply() call cannot use `value X` defined within the T{...} block
@ckipp01
ckipp01 / selectionRanges.md
Last active July 15, 2021 06:10
The confusion around `textDocument/selectionRange`.

While implementing textDocument/selectionRange support in Metals, the Scala Language Server I found that one of the hardest parts of implementing it was simply understanding how a client is correctly supposed to use it. If you look at the spec you'll notice that the confusion starts on the client side with the initial request is sent it. The spec allows for more than a single position to be sent in, but doesn't specify in what scenarios multiple positions should be sent it. This wouldn't be the worse if there was consensus about how clients handle this, but from my initial tests

@ckipp01
ckipp01 / function-examples.js
Last active August 22, 2019 07:23
Javascript function examples
'use strict'
/*
This is meant to be a concise explanation on the difference between
functions declaration, function expressions, and es6 fat arrow functions
You should be able to just clone this or paste it in a file and run `node <filname>`
*/
/*