Do packages replace or supplement toolboxes from R2024b?
In the 2024b release notes: "A package is a collection of MATLAB® code, related files, and a package definition file." There’s a new set of tools to create and manage packages.
On the other hand, from the help center: "You can package MATLAB® files to create a toolbox to share with others. These files can include MATLAB code, data, apps, examples, and documentation. When you create a toolbox, MATLAB generates a single installation file (.mltbx) that enables you or others to install your toolbox." There’s a tool for packaging toolboxes.
These seem remarkably similar concepts, which makes me wonder why both things now exist. Do packages simply replace user-written toolboxes, or do toolboxes retain some useful features which are not shared by packages? Are there situations where I should choose one over the other, or is the newer mechanism superior in general?
It looks like packages can analyse dependencies and pull needed packages along with them, and maybe they integrate with repositories better than toolboxes, but I might have missed something else significant. As far as I can see, the package documentation ignores toolboxes.
It would be nice to understand what is happening here, and which mechanism I should adopt for distributing related code files.
(Note that MATLAB used the term package in a different way in the past, to mean what is now a namespace. I’m asking about the new package mechanism as of 2024b.)In the 2024b release notes: "A package is a collection of MATLAB® code, related files, and a package definition file." There’s a new set of tools to create and manage packages.
On the other hand, from the help center: "You can package MATLAB® files to create a toolbox to share with others. These files can include MATLAB code, data, apps, examples, and documentation. When you create a toolbox, MATLAB generates a single installation file (.mltbx) that enables you or others to install your toolbox." There’s a tool for packaging toolboxes.
These seem remarkably similar concepts, which makes me wonder why both things now exist. Do packages simply replace user-written toolboxes, or do toolboxes retain some useful features which are not shared by packages? Are there situations where I should choose one over the other, or is the newer mechanism superior in general?
It looks like packages can analyse dependencies and pull needed packages along with them, and maybe they integrate with repositories better than toolboxes, but I might have missed something else significant. As far as I can see, the package documentation ignores toolboxes.
It would be nice to understand what is happening here, and which mechanism I should adopt for distributing related code files.
(Note that MATLAB used the term package in a different way in the past, to mean what is now a namespace. I’m asking about the new package mechanism as of 2024b.) In the 2024b release notes: "A package is a collection of MATLAB® code, related files, and a package definition file." There’s a new set of tools to create and manage packages.
On the other hand, from the help center: "You can package MATLAB® files to create a toolbox to share with others. These files can include MATLAB code, data, apps, examples, and documentation. When you create a toolbox, MATLAB generates a single installation file (.mltbx) that enables you or others to install your toolbox." There’s a tool for packaging toolboxes.
These seem remarkably similar concepts, which makes me wonder why both things now exist. Do packages simply replace user-written toolboxes, or do toolboxes retain some useful features which are not shared by packages? Are there situations where I should choose one over the other, or is the newer mechanism superior in general?
It looks like packages can analyse dependencies and pull needed packages along with them, and maybe they integrate with repositories better than toolboxes, but I might have missed something else significant. As far as I can see, the package documentation ignores toolboxes.
It would be nice to understand what is happening here, and which mechanism I should adopt for distributing related code files.
(Note that MATLAB used the term package in a different way in the past, to mean what is now a namespace. I’m asking about the new package mechanism as of 2024b.) package, toolbox MATLAB Answers — New Questions