Hi all,
Matlab is officially still lacking a proper package manager like npm or pip. I do not understand how people structure projects with dependencies. I understand, there are
- ML projects
- ML toolboxes
- several mpm versions
Toolboxes have a version number attached, projects have not. Both can be shared as a package. Projects can reference other projects, but that 1. requires the same folder structure on every developer PC and 2. requires that the correct version is checked out from the VCS (which is GIT in our case). There's no way to define "project abc@v1.2.0" as a dependency. Just folders/prj files.
How do you do complex app developments? Like a frontent GUI app that needs several self-created toolboxes and projects? The only way is to use GIT (submodules in worst case) to do dependency managment, and that's definitely a red flag.
Then, it seems like there's another mpm built-in in ML 2022b that mentions a Matlab -packages flag which is very interesting:
mpm
Error using mpm
This command is not supported when the packages feature is not enabled. Start MATLAB with the -packages command line switch.
There's no information about that. Starting ML with -packages reveals more:
Which seems to support different versions. But there's no documentation anywhere, and it's a built-in function © 2022.
What does that mean? Will there be a Mathworks' supported package manager? What exactly is a package by the way in ML? So far, packages were a synonym to namespaces, using the +package folders. How does that work together with ML projects?
I'm in the process of re-structuring code due to a migration from Bitbucket to Gitlab and I'm at a point where a proper dependency management must take place, and that must work in CI/CD, too.
Would be very happy to hear your thoughts.
Thanks,
Jan