sam 0.2.0 released
👋 This page was last updated ~12 years ago. Just so you know.
Thanks to my sponsors: xales, Josiah Bull, Paige Ruten, Max von Forell, Yves, Elnath, David E Disch, Christoph Grabo, Thor Kamphefner, Philipp Hatt, Colin VanDervoort, Henrik Tudborg, Tiziano Santoro, Seth, Astrid, Lucille Blumire, Yann Schwartz, Michael Alyn Miller, callym, Matthew T and 261 more
Today I decided to release sam 0.2.0. There are only a handful of new features in there but it’s still releaseworthy! See the previous sam announcement for more information on the tool itself.
Source path and lib folders
Let’s take a look at what sam tells us when launching it.
sam version 0.2.0
Usage: sam [update|get|status|promote]
Commands
* update: update sam's grimoir of formulas
* get [USEFILE]: clone and/or pull all dependencies
* status [USEFILE]: display short git status of all dependencies
* promote [USEFILE]: replace read-only github url with a read-write one for given use file
* clone [--no-deps] [REPONAME]: clone a repository by its formula name
Note: All USEFILE arguments are optional. By default, the
first .use file of the current directory is used
Copyleft 2013 Amos Wenger aka @nddrylliog
Changes to “clone”
One thing that’s new is that sam clone
will now also clone
dependencies by default. So if you do sam clone dye
by example,
you’ll get a copy of my graphics framework and all its dependencies.
In my case, because I already have dye, it’ll only update:
$ sam clone dye
[dye:master]
Repository /Users/amos/Dev/dye exists already. Pulling...
> Current branch master is up to date.
[sdl2:master] (<= dye)
> Current branch master is up to date.
[stb-image:master] (<= dye)
> Current branch master is up to date.
[freetype2:master] (<= dye)
> Current branch master is up to date.
[deadlogger:master] (<= dye)
> Current branch master is up to date.
If you want to only clone or update one the formula you specify
and none of its dependencies, you can use the --no-deps
option.
Changes to “update”
Previously, sam update
only updated its library of formulas
(also called grimoir). Now it also recompiles it. It’s still
pretty fast though:
$ sam update
Pulling repository /Users/amos/Dev/sam
> Current branch master is up to date.
Recompiling sam
> Cleaning up outpath and .libs
> Build order: [sam, sdk]
> [ OK ]
This takes around 6s on my system - and most of that is spent waiting for SSL negotiation with GitHub!
So there you have it, from now on you’ll be able to sam update
to keep both your grimoir up-to-date and sam itself.
Here's another article just for you:
Abstracting away correctness
I’ve been banging the same drum for years: APIs must be carefully designed.
This statement doesn’t resonate the same way with everyone. In order to really understand what I mean by “careful API design”, one has to have experienced both ends of the spectrum.
But there is a silver lining - once you have experienced “good design”, it’s really hard to go back to the other kind. Even after acknowledging that “good design” inevitably comes at a cost, whether it’s cognitive load, compile times, making hiring more challenging, etc.