Group Abstract Group Abstract

Message Boards Message Boards

2
|
11.9K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

What can I do with PacletInfo.m?

Posted 9 years ago

I would like to know what are the possible extensions in PacletInfo.m and what are their arguments. What practical effect does each one have?

I am going to list the ones I know about below, and note the answer when I have it.

"Documentation"

This is the only documented extension, as far as I am aware. The Workbench creates it automatically and it is necessary for integrating the package docs into the Documentation Centre. I won't dwell on this one since it's documented.

"Kernel" and "Application"

I see "Kernel" in GitLink and I see both as completion options in the Workbench. Arguments for Kernel include at least: Root, Symbols, Context.

Setting the Context to the package context allows the >> sign to appear after usage message and link to the appropriate documentation page. It can also have a list of contexts.

What is Root? I saw it set to . or Kernel.

What is Symbols?

What is the difference between the "Kernel" and "Application" extensions?

"LibraryLink"

This is present in GitLink with no arguments. What practical effect does it have without arguments? Can we use arguments, and if yes, which ones? I would expect arguments to specify where the libraries are (LibraryResources directory).


I am primarily interested in the ones above, but there are several other extensions. Is there anything interesting that they can do? I have seen "AutoCompletionData" with "Root" pointing to a directory having specialArgFunctions.tr and .trie files with the completion data. I have also seen "Resource", "FrontEnd",

POSTED BY: Szabolcs Horvát
3 Replies

LibraryResources like Kernel is a magic folder name. This old but useful video by Adam Berry uses this terminology. Using "GeneralUtilities`" on PacletInstall and following the trail will confirm my answer. One reason for including extensions meta data seems to be ensure compatibility of paclets with different versions of Mathematica. The notebook includes details of my spelunking. $basePathMap is very instructive summary of applications related to the paclet system and It shows some of the different extensions in use.

PacletManager`Package`$defaultLibraryRoot

Dataset /@ ((Flatten@*Values@
     PacletManager`Manager`Private`$basePathMap) /. 
   Paclet[x__] :> <|x|>)

This is a list of extensions in use.

{"Application", "AutoCompletionData", "ChannelFramework", 
"Documentation", "FrontEnd", "JLink", "Kernel", "LibraryLink", 
"Path", "Resource"}

Which can be obtained by

extensionslist = 
 Query[Flatten /* Union, "Extensions", All, 1]@((Flatten@*Values@
      PacletManager`Manager`Private`$basePathMap) /. 
    Paclet[x__] :> <|x|>)
Attachments:
POSTED BY: Emerson Willard
Attachments:
POSTED BY: Emerson Willard

Thank you for the comments! This isn't exactly what I was asking for.

You are showing how to create a paclet using the Workbench.

What I am asking is what are the valid extensions in PacletInfo.m, and what are their effects. The Documentation extension is documented in the Workbench help, so there's no difficulty with that one. But what effect does e.g. adding the LibraryLink extension have, as you can see in GitLink's PacletInfo.m? I can of course live without this information, but I am wondering what I can achieve with it.

I believe that your question can be answered by looking at GitLink: it shows how to package up a paclet, how to install it, and how to make it loadable with Needs. All this can be done without the Workbench. If you like, I'll post step-by-step instructions tomorrow. I'm fine with this part, I was simply wondering what different settings I can change in PacletInfo.m.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard