I have watched the Video "Creating Documentation with Wolfram Workbench" several times, but there are some things I still don't understand. In discussion of recommended package organization for large projects it suggests the main .m | .wl file look like:
(* Wolfram Language Package *) BeginPackage["GoodStuff"] Get["GoodStuff
SubPackage1"] Get["GoodStuff
SubPackage2"] ... EndPackage[]
The subfile SubPackage2.m (in the same folder as GoodStuff.m) should look like:
(* Wolfram Language Package *) foo::usage="foo[] is a function that does nothing wrong because it does nothing." Unprotect[foo] Begin["Private``"] foo[___]:=Null End[] SetAttributes[foo,{Protected}]
Here is the issue: suppose SubPackage1 wants to use the function foo defined in SubPackage2. If I The usage message in SubPackage2 will not be encountered before the invocation of foo in SP1, and will thus create a symbol GoodStuff``Private``foo
. What is the proper way to handle such a situation? Should I create a file AllUsageMessages.m and read it in before SP1 and SP2? It might be suggested that one should not use symbols before their containing file is read, but I think sometimes you need subsets that contain functions defined in each other. [Please forgive the " ' `" - I am new to this system...]