As outline previously, updating RStan on CRAN is difficult due to having StanHeaders (includes Stan-math) and RStan (includes the parser) in separate packages. In the long run it would be much preferable to have everything in a single R package RStan. However, this would leave StanHeaders essentially defunct, but that is something we can’t afford as this would mean that all depending packages must change, which is unlikely given the inertia in all of this.
Instead we are considering to make StanHeaders a “proxy” package which essentially forwards the includes of Stan-math to respective includes contained in RStan. This would mean that in the future we have
- StanHeaders with a dependency on RStan
- RStan without a dependency on StanHeaders
Packages including things from StanHeaders a given file xyz.hpp would then get a forwarded xyz.hpp file living inside RStan.
Now… the difficult thing coming into play here is the license: Right now StanHeaders is BSD licensed while RStan is GPL licensed. In this new setup it’s not clear if StanHeaders can stay BSD. Despite the fact that any program which compiles wrt to Stan-math (contained in StanHeaders) will only contain BSD licences source code… the actual Stan-math sources would be pulled from within RStan, which itself is GPLed.
In short: StanHeaders might have to be re-licensed under the GPL. What exactly the situation is from a legal perspective is unclear at this stage, but we would need to find this out, possibly with the support of NumFOCUS? The question is if a proxy StanHeaders can possibly stay BSD or not. The “easy” solution is to re-license the proxy StanHeaders under the GPL (in this case anyone requiring BSD style Stan-math could just copy it from our GitHub and include a copy in his/her own package).
Sebastian, Ben, Hamada, Steve, Andrew J