reactorlabs/rir

Dynamically reload RIR from R

開放

#264 建立於 2018年11月13日

 (0 則留言) (0 個反應) (0 位負責人)C++ (19 個分叉)github user discovery
enhancementgood first issue

倉庫指標

星標
 (61 顆星)
PR 合併指標
 (平均合併 1分鐘) (30 天內合併 1 個 PR)

描述

RIR is implemented as a shared library (e.g. librir.so) that GNU R loads, along with rir.R which defines the R functions for the RIR API. (See the rir/tools/R load script.)

Imagine the following work flow:

  • I start GNU R with RIR loaded, and hack on some code.
  • I realize that I need to make a change to RIR, so I edit the C++ files and recompile.
  • But to use those changes, I have to close the current R session and restart, losing my work.

It would be nice if I could force a reload of librir.so (or whatever the extension is on macOS), or have something that does it automatically, or have something trigger a RIR build and reload.

Our current approach of using environment variables might not work, maybe take a look at how our test infrastructure loads with dyn.load(librir.so) and sys.source('rir/R/rir.R').

Or maybe we should use the "save current workspace" feature more frequently.

貢獻者指南