IncludeDefinitions
is an option for cloud and other functions that specifies whether current definitions relevant for the evaluation of an expression should be explicitly included when the expression is deployed.
Details
- With IncludeDefinitions->True, functions such as CloudDeploy[expr,…] and CloudEvaluate[expr] will automatically include all definitions on which expr can lexically be seen to depend, even ones that are associated with held expressions, for example inside APIFunction.
- With IncludeDefinitions->False, deployed expressions are responsible for setting up their own definitions.
Examples
open allclose allBasic Examples (3)
By default, definitions are included:
Do not include definitions from the current kernel session, but load them from a cloud object at the time they are needed:
CloudEvaluate also supports IncludeDefinitions. Compare the behavior of including definitions or not:
Scope (2)
For CloudPut, definitions are not included by default:
Properties & Relations (1)
Use FilePrint to see the definitions that were included:
Possible Issues (2)
When no definitions are associated with a symbol, IncludeDefinitions set to True copies over empty definitions, thus overwriting the ones defined in initialization files:
Set IncludeDefinitions to False in order to avoid overwriting any definitions from initialization files:
Text
Wolfram Research (2019), IncludeDefinitions, Wolfram Language function, https://reference.wolfram.com/language/ref/IncludeDefinitions.html.
CMS
Wolfram Language. 2019. "IncludeDefinitions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IncludeDefinitions.html.
APA
Wolfram Language. (2019). IncludeDefinitions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IncludeDefinitions.html