nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

WIP: remove virtualNodeFunctionDefinitions #1451

Closed paciorek closed 4 months ago

paciorek commented 4 months ago

This investigates NCT issue 500 in which we're discussing whether the virtual nodeFunction definitions in the user global environment (for user-defined functions) and in the nimble namespace (for nimble's distribution functions) are needed.

This passes test-user.R when run manually. I am opening this PR to run full tests.

paciorek commented 4 months ago

@danielturek @perrydv this PR is the 'nuclear' option to address minor NCT issue 500. On the one hand, feels like we might as well remove cruft, OTOH, this is longstanding code, so I am wary of breaking something. But testing passes. It's hard to believe we need these various node_stoch_dfoo functions if all the various uses of nimble- and user-defined distributions are fine without them.

danielturek commented 4 months ago

@paciorek I'm a little torn, but given the testing, I feel like it has to be an unused relic.

I'm ok if you remove it; on the small chance that something breaks, we'd probably remember this.

paciorek commented 4 months ago

I'm going to hide the definition creation behind a nimble option and then remove in next release. Doing on a different branch/PR.