mlapp being a binary is a pain point for source control. It means that you either have to:
- have hooks in your source control system to zip/unzip a mlapp. However, The Mathworks have informed users not to rely on this as the mlapp format may change.
- do all your source control in MATLAB. This is non standard behaviour. Source code and source control should be independent of each other. Web front-ends to source control systems, 3rd party source control apps, CI/CD systems and much more are extremely limited in what they can do with mlapps.
I wish an mlapp could just be a directory full of the required text/other files.
3 Comentarios
Tiempo descendenteHi Steven,
Thanks for providing the third option - I didn't know about that. Sadly, it only works on your local cloned copy, though. Diff on github website and probably CI/CD systems still just see mlapp as a binary. So merging from the github is still not possible as far as I know, as well as other CI/CD workflows.
There is a third option: configure your SCM to use a MATLAB "plugin" to diff and merge file formats like MLAPP, MLX, MAT, etc. [At least I assume these plugins work for MLAPP files; the page doesn't explicitly list them, but I'd expect them to work. I have not tried it myself, though.]
.mlx file have also hard to source control, new plain .m file(intruduced in R2025a) is alternativatioin.
Inicie sesión para participar