8

The package I'm developing is getting hard to navigate as it gets larger. I've started experimenting with using the new-style package format described in this question to break it up to subfiles. But now I'm worried: is this format compatible with the even-newer Wolfram Paclet Repository, particularly in light of @ItaiSeggev's comment?

Chris K
  • 20,207
  • 3
  • 39
  • 74
  • (+1) Is there a new version of your package available now, @Chris K? – E. Chan-López Jan 26 '24 at 02:24
  • 1
    @E.Chan-López No, just working on one and thought it might be a good time to reorganize, but not if it is incompatible with the Paclet Repository! – Chris K Jan 26 '24 at 02:30
  • Your question seems interesting to me. I'm moving forward with a package, but now that I see your question, I would like someone to answer in detail if there are any incompatibility issues for the package repository. Thanks for your response, @Chris K! – E. Chan-López Jan 26 '24 at 02:35
  • 2
    why do you need to change to new style of packaging in order to split your large m file to smaller number of m files? You can do that and still use the original package style. See this note as an example. – Nasser Jan 26 '24 at 06:53
  • 3
    I also would not use new packaging style without having an official documentation about it at Wolfram web site. I have not seen such document so far. – Nasser Jan 26 '24 at 06:55
  • to break it up to subfiles You can also see Declaring Package with dependencies in multiples files – Nasser Jan 26 '24 at 12:37
  • @Nasser Thanks for the info on splitting up packaged code. Maybe my question still applies, are these compatible with the WPR? – Chris K Jan 26 '24 at 21:05
  • @ChrisK I never done a paclet before myself. I am still at the stage of learning how to make a Mathematica package right :). May be someone else would know. I would think it should work in paclet if you split the files. I've seen number of packages using paclet which has many files in it. See MaTeX package for example. – Nasser Jan 26 '24 at 21:11
  • 1
    Same, very interested in the answer to this question. I am building a paclet for my company and it is now too big for a single package file and i need to split it. Which one is the best approach and compatible with new paclet system. – user13892 Jan 29 '24 at 05:26
  • 1
    @user13892 - you should definitely use the existing and documented method of making a multi-file package. Here is a basic example of a multi-file paclet using the documented package format: https://github.com/antononcube/WL-AssociationRuleLearning-paclet – Jason B. Feb 01 '24 at 19:49

1 Answers1

7

The "new" package format does seem to be supported by the paclet repository:

In[1]:= PacletInstall["WolframInstitute/Hypergraph"];

In[2]:= ReadLine@FindFile["WolframInstituteHypergraph"]

Out[2]= "Package["WolframInstituteHypergraph"]"

I have to mention that splitting a package into multiple files is very possible using the normal documented package format (the one that uses BeginPackage instead of Package).

Jason B.
  • 68,381
  • 3
  • 139
  • 286