---
title: Utilities for _basilisk_ installation
author: 
- name: Aaron Lun
  email: infinite.monkeys.with.keyboards@gmail.com
date: "Revised: March 6, 2020"
output:
  BiocStyle::html_document
package: basilisk.utils
vignette: >
  %\VignetteIndexEntry{_basilisk_ installation utilities}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}    
---

```{r, echo=FALSE, results="hide"}
knitr::opts_chunk$set(error=FALSE, warning=FALSE, message=FALSE)
library(basilisk.utils)
library(BiocStyle)
```

# Who is this package for?

This document and package is strictly for the developers of `r Biocpkg("basilisk")`.
If you are a developer of a client package, you probably want to read the `r Biocpkg("basilisk")` vignette instead.
If you are an end-user of some client package, you are better off reading the documentation for that client instead.

# Why does this package exist?

This package centralizes various R functions that are required for installing `r Biocpkg("basilisk")`.
By default, these functions are (potentially) called in `basiliskStart()` during client run-time.
However, under certain conditions, they are called via the `configure` file during `r Biocpkg("basilisk")` installation.

Ideally, we would put these functions inside `r Biocpkg("basilisk")` for use in all situations.
However, this is not possible as `configure` runs before installation, i.e., before any functions are actually available!
The naive option is to simply duplicate the code in both the package and `configure`;
this is unappealing as it requires us to maintain twice as much code and circumvents `R CMD check`'s code quality checks.

The `r Biocpkg("basilisk.utils")` package provides R functions that can be called in both `configure` and `basiliskStart()`.
This allows us to avoid code duplication and enjoy the safety of `R CMD check`.
The consequence of this approach is that `r Biocpkg("basilisk.utils")` has no direct relevance to other packages or end-users,
and thus should never be explicitly loaded into a package namespace or R session.

# Session information

```{r}
sessionInfo()
```