You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p><code>r-install-dir</code> (<code>RIG_R_INSTALL_DIR</code>): the root directory of the R installations, i.e. the directory that holds the directories of the individual R versions. Defaults to the platform’s system-wide location in admin mode (<code>/opt/R</code> on Linux, <code>/Library/Frameworks/R.framework</code> on macOS, <code>C:\Program Files\R</code> on Windows), and to <code>~/.local/share/rig/r</code> (<code>%APPDATA%\rig\data\r</code> on Windows) in user mode. On Windows this entry only applies in user mode; the admin-mode root is fixed, because it also depends on the architecture.</p></li>
566
566
<li><p><code>rtools-install-dir</code> (<code>RIG_RTOOLS_INSTALL_DIR</code>): Windows only, the directory that holds the Rtools installations. Defaults to <code>C:\</code> in admin mode (so Rtools 4.5 goes into <code>C:\rtools45</code>) and to <code>%APPDATA%\rig\data\rtools</code> in user mode.</p></li>
567
567
<li><p><code>download-dir</code> (<code>RIG_DOWNLOAD_DIR</code>): the directory rig downloads the R (and on Windows the Rtools) installers into, before installing them. Defaults to <code>rig-<uid></code> in the system temporary directory, e.g. <code>/tmp/rig-1000</code>, and to <code>rig</code> under <code>%TEMP%</code> on Windows. The user id is part of the default name on purpose: in <ahref="../admin-vs-user-mode.html">admin mode</a> rig downloads as <code>root</code>, in user mode as you, and a directory shared between them would only be writable by whoever created it first. For the same reason rig refuses to use the default directory if it is a symbolic link, or if it is owned by another user, or if other users can write into it. A directory you configure here is created but not checked.</p></li>
568
+
<li><p><code>no-cache</code> (<code>RIG_NO_CACHE</code>): set it to <code>true</code> to stop rig from using its cache, the same as passing <code>--no-cache</code>. rig then neither reads nor writes the cache directory: it downloads the repository metadata, the binary package indices and the package files again, compiles a source package instead of unpacking a build it made earlier, and downloads an R or Rtools installer again instead of reusing the one in the download directory. What it downloads and builds goes into a temporary directory that is removed when rig exits, so the cache is left exactly as it was. Defaults to <code>false</code>. This is meant for debugging and for the occasional run that must not trust anything cached; it makes rig considerably slower, so it is a poor thing to turn on permanently.</p></li>
568
569
<li><p><code>positron-setup</code>: <ahref="../admin-vs-user-mode.html">user mode</a> only. Set it to <code>false</code> to stop rig from updating Positron’s settings: adding its R installation root to <code>positron.r.customRootFolders</code>, and pointing <code>positron.r.interpreters.default</code> at the <ahref="../reference/default.html">default</a> R version. Any other value, and the default, keep the Positron setup on.</p></li>
569
570
<li><p><code>userlibrary</code>: a JSON object that maps R versions to user library paths. rig maintains this entry itself, as a cache for the <code>rig library</code> commands; you don’t normally need to edit or set it.</p></li>
<p>Compiling a package produces exactly what a repository would have served as a binary package, so rig keeps it: a source install is archived into the cache, with the same file name <code>R CMD INSTALL --build</code> would have given it, and installing that package again unpacks the archive instead of compiling it a second time. That covers another library, another project, and <code>--reinstall</code>, which reinstalls a package but does not recompile it.</p>
821
833
<p>A cache entry belongs to one platform, one R minor version, one source tarball, one set of versions of the packages it is compiled against, and one set of <code>~/.R/Makevars</code> files. Change any of those and the package is compiled again. What it does <em>not</em> cover is your compiler, the system libraries the package found when it was configured, and the arguments it was configured with; a machine whose toolchain changed under it can hold an entry that no longer matches, and the way out is to delete it. <code>rig system dirs --cache</code> says where the cache is.</p>
834
+
<p><code>--no-cache</code> turns all of this off for one run: rig then downloads the repository metadata and the package files again, compiles every source package rather than unpacking one it built earlier, and adds nothing to the cache. See <ahref="../reference/config.html"><code>rig config</code></a>.</p>
Library name or path, instead of the default library
883
896
</dd>
897
+
<dt><code>--no-cache</code></dt>
898
+
<dd>
899
+
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
900
+
</dd>
884
901
<dt><code>--platform <platform></code></dt>
885
902
<dd>
886
903
Platform to install binary packages for, e.g. macos, windows, ubuntu-24.04, or a full platform string like aarch64-unknown-linux-gnu-ubuntu-24.04 (default: this machine). Use <code>--platform</code> source to install source packages only.
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
702
+
</dd>
695
703
<dt><code>-r, --recursive</code></dt>
696
704
<dd>
697
705
Show recursive (transitive) dependencies
@@ -716,6 +724,7 @@ <h3 class="anchored" data-anchor-id="source-and-binary-packages">Source and bina
716
724
<p>By default rig solves for the machine it runs on. Use <code>--platform</code> to solve for a different one, e.g. to write a lockfile on macOS for a Linux deployment:</p>
717
725
<divclass="code-copy-outer-scaffold"><divclass="sourceCode" id="cb3"><preclass="sourceCode sh code-with-copy"><codeclass="sourceCode bash"><spanid="cb3-1"><ahref="#cb3-1" aria-hidden="true" tabindex="-1"></a><spanclass="ex">rig</span> proj solve <spanclass="at">--platform</span> ubuntu-24.04</span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
718
726
<p><code>--platform source</code> solves for source packages only, and does not download any binary package metadata. rig also falls back to source packages when there are no binaries for a platform at all. There is then nothing for <code>--prefer-binary</code> to prefer, and rig ignores it.</p>
727
+
<p>rig keeps the repository metadata and the binary package indices it solves from in its cache, and refreshes them once a day. <code>--no-cache</code> downloads them again instead, and writes nothing to the cache, which is the way to solve against a package that was published minutes ago. It is a good deal slower, because the metadata it re-downloads is large. See <ahref="../reference/config.html"><code>rig config</code></a>.</p>
719
728
<p>The <code>pkg.lock</code> file records, for every package, whether it is a source or a binary package and the URL it is downloaded from. It also records where the file is cached, which is per <em>build</em> rather than per version: a repository can offer several binaries of one version for one platform and R version, and they are cached side by side.</p>
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
760
+
</dd>
748
761
<dt><code>--platform <platform></code></dt>
749
762
<dd>
750
763
Platform to solve binary packages for, e.g. macos, windows, ubuntu-24.04, or a full platform string like aarch64-unknown-linux-gnu-ubuntu-24.04 (default: this machine). Use <code>--platform</code> source to solve for source packages only.
0 commit comments