# What is the purpose of the Kernel and Application extensions in PacletInfo.m?

Wolfram Workbench has a graphical editor for PacletInfo.m files. It is possible to add a "Kernel" extension with Symbols, Root and Context keys.

What is the purpose of each of these? Where is the documentation for this (if it exists)?

Sometimes it is also possible to add an Application extension with Root and Context keys:

It is not yet clear to me when the Workbench offers adding "Application" and when it offers "Kernel". I believe I created a "Mathematica Application" in both cases, but I'm not yet experienced with the Workbench ...

What is the difference between them?

Based on this comment by Teake Nutma, setting the "Context" allows usage message to have the little >> sign at the end. Clicking it opens the Documentation Centre. I tried this and it worked both in the Kernel and Application extensions (within two separate projects).

• Related comment re Context. – Michael E2 Nov 6 '16 at 10:32
• @MichaelE2 I tried it and setting Context either in Kernel or Application does cause the >> sign to appear at the end of the usage messages. – Szabolcs Nov 6 '16 at 11:50

Update:

This answer is now mostly superseded by:

I am not sure about the difference between "Kernel" and "Application", but I was able to gather the following information:

Adding the "Kernel" extension to PacletInfo.m allows the paclet to provide a package that is loadable with Needs. (I have not tried if "Application" works too).

In order for this to work, it seems to be necessary to set the Context and Root arguments, like so:

Paclet[
Name -> "MyPack",
Version -> "0.0.1",
MathematicaVersion -> "10.0+",
Description -> "My Mathematica Application",
Creator -> "John Johnson",
Extensions ->
{
{"Kernel", Root -> ".", Context -> "MyPack"}
}
]


Effects of setting Context -> "MyPack":

• FindFile["MyPack"] will resolve to the correct location so that the package can get loaded by Needs or Get.

• If the "Documentation" extension is also present, then symbol usage messages will get a little >> sign at the end. Clicking it will open the correct documentation page.

• The value can also be a list of contexts.

Effects of setting Root:

• FindFile["MyPack"] will search in the location that Root points to in the usual manner: it will resolve either to init.m, to Kernel/init.m, to MyPack.m (or I assume to the other usual possibilities such as .mx files within directories having names agreeing \$SystemID—but I haven't tried this one)

The usual setting would be Root -> "." when the package root coincides with the paclet root, but we can also put all the package files and an init.m in a subdirectory and point to that instead.

• Where can I find more information about what Root -> "." does? Thanks – QuantumDot Nov 14 '16 at 15:24
• @QuantumDot I listed all my references ... the rest is experimentation. If you find out more, let me know! I just updated the answer. I believe that it works like this: if we set Context to something, then FindFile with that context will first go to Root, then keep searching from there for Contextname.m, init.m, Kernel/init.m and perhaps other standard thing. Sorry about responding late, I had to do a few more experiments. – Szabolcs Nov 15 '16 at 16:46