Diff-able fileformat in Version 8

Use this forum to post Vensim related questions.
Post Reply
Travis
Senior Member
Posts: 137
Joined: Tue Jul 15, 2008 8:42 pm

Diff-able fileformat in Version 8

Post by Travis »

I see that there is going to be a new file format in Version 8.

If you're touching the file format(s), please me them more easily diffable with standard tools. We use `git` and it is hard to see the differences between version.

Please note that I'm not asking for 100% complete source control compatibility. I understand that collaboration and model merges likely wouldn't be supported.

What I would like to see is that every time a model gets saved and written out, the order of the equations is always the same. Right now, I feel this isn't always the case. I suggest that, if you're touching the file format at all, that you force models to always be written out in the same way, not matter the order that the model was built, etc.

If a model was always written out the same way, then it could more easily be diff'd, instead of false positives just because people's computers saved things differently.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Diff-able fileformat in Version 8

Post by Administrator »

Vensim has a model compare tool, I'd suggest using that. Or use XMILE, but you lose the sketch with Vensim.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Travis
Senior Member
Posts: 137
Joined: Tue Jul 15, 2008 8:42 pm

Re: Diff-able fileformat in Version 8

Post by Travis »

Compare in Vensim isn't sufficient -- too cumbersome to use and a poor diff UI. XMILE doesn't work either, if you can't share files with others and have the UI included. Too laborious to export to XMILE every time, just to diff, and then throw that file away because it doesn't have the UI information. Also, does exporting to XMIlE **always** output in the same variable order? If so, why not just use that for the MDL version?

Why not implement the feature request to allow for modern workflows? Vensim already has the means to do clean a MDL file, right?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Diff-able fileformat in Version 8

Post by tomfid »

Regular diff tools are dumb too, because they don't understand order-independent nonprocedural code. It would be cool if we could make Model>Compare into a diff client. Supporting merge would probably be hard though.

An "always order" preference that would force Reform & Clean alphabetical by group for every save would be nice.
Travis
Senior Member
Posts: 137
Joined: Tue Jul 15, 2008 8:42 pm

Re: Diff-able fileformat in Version 8

Post by Travis »

I agree -- regular diff tools are "dumb", but they work because the structure of programming source files generally don't change significantly.

Wouldn't an "Always order" preference make them MDL files keep the structure of the MDL mostly the same, making it more like programming source files? A small step toward making it more version control (git) friendly. I think you're comment means you agree with this already, but checking that I understand Reform & Clean correctly.
Travis
Senior Member
Posts: 137
Joined: Tue Jul 15, 2008 8:42 pm

Re: Diff-able fileformat in Version 8

Post by Travis »

the more that I use Vensim with my MDL in a git repository, the more that I really wish Reform and Clean were enabled by default.

I suggest turning it on by default, using the "Alphabetical by Group" and "Terse" settings. Or maybe "As originally entered" by default, but Terse is pretty nice.

If anything, it could be added to the Model Settings, where Reform and Clean can be turned on/off per model.

Using Alphabetical and Terse with git is actually pretty useful. You can easily see the differences in "dumb" diff clients, they are meaningful differences and easy to compare, and makes the process much smoother.
Post Reply