Calls to other functions in the global environment did not work when executed in the platform environment (#194). This is because the binding environment of all functions was globalenv(). The binding environment is where the function looks for values, and it is set when the function is created.
When the expression is evaluated within the future environment on platform, the binding environment of all top level functions is still globalenv (it's just a pointer). But in the platform environment, globalenv is empty.
To solve the problem, we can simply attach the future environment.
It was hard for me to test this in the unit tests, so I added the previously failing case to the nightly integration tests.
Calls to other functions in the global environment did not work when executed in the platform environment (#194). This is because the binding environment of all functions was
globalenv()
. The binding environment is where the function looks for values, and it is set when the function is created.When the expression is evaluated within the future environment on platform, the binding environment of all top level functions is still
globalenv
(it's just a pointer). But in the platform environment,globalenv
is empty.To solve the problem, we can simply attach the future environment.
It was hard for me to test this in the unit tests, so I added the previously failing case to the nightly integration tests.
Fixes #194.