question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improvements to source control integration

See original GitHub issue

I am part of a team working on TLA+ modelling, using git for coordination. There are a number of things that TLA+ and/or the toolbox do that get in the way of this workflow a bit, which largely boil down to a lack of clean separation between source and generated ones.

This is kind of a meta-issue since it covers a handful of different things. I thought it better to open one issue covering all of the below than four separate issues, because I think subsequent discussion will cut across them all, but I can break it down to separate task-based issues if that’d be preferred.

Source and generated files share directories

We have arrived somewhat empirically at a .gitignore file that works ok as long as all of our models are called model, but it would be much preferable if all the files we did want to ignore were in a single directory.

PlusCal translation modifies its own source file

We don’t always use PlusCal, but when we do it works well to commit just the changes to the PlusCal code meaning that reviewing the commits is easier. This is a bit of a pain at commit time as it requires extra effort to avoid committing unwanted changes. It’s particularly tricky if one changes something below the translated code (e.g. an invariant) as tools like git add --interactive work through the changed hunks in file order.

It is also easy to forget to do the final translation before merging. Ideally we wouldn’t need to commit any translated code, as it would be considered “generated” and stored in the separate directory mentioned above.

Modification history by default

A very minor thing is the Modification History footer comment that’s included by default. Yes, you can delete it and it doesn’t come back, but is it really necessary at all?

Readability of model description

It’s nice that there’s a GUI for defining the model, but when we’re reviewing changes we look at diffs. Fortunately it’s not completely unreadable and a bit of experimentation is enough to work out how to parse the model parameter definitions, but it’d be nice for reviewers if this file were more readable.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:26 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
DaveCTurnercommented, Oct 3, 2018

Generally, the reasoning seems upside-down here. Source control management is an auxiliary tool to simplify the life of software engineers, not dictate how (programming/specification) languages should be designed.

I hold a different viewpoint. SCM is a tool, but so are programming & specification languages; both are important, and neither is above the other in terms of influencing their respective designs. Working as well as possible with other tools in the ecosystem is an important feature to me, which is why I opened this issue instead of just living with it. It is definitely an unusual design to mix source and generated code in a single file (vs, say, combining them in the UI) but it’s not unusable, and I can see why it might be preferred in some workflows.

1reaction
lemmycommented, Oct 3, 2018

For the (common?) case in which the TLA+ is not being modified by hand I would find it very useful if it could just do the transpilation step automatically in this case, rather than raising a warning.

The Toolbox editor supports on-save transpilation since the 1.5.7 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source Control Integration Improvements | Product Roadmap
We've improved UX and stability for the source control integration in Unreal Engine. The new UX is based on a Content Browser-like interaction ......
Read more >
10 Best Source Code Management Tools For Version Control
Here, we review top Source Code Management Tools and determine the best Source Code Management software to track application code changes.
Read more >
Source Control integration - ServiceNow Docs
Enable application developers to integrate with a Git Source Control repository. Save and manage multiple versions of an application from a ...
Read more >
What is Source Control? - Amazon Web Services
Source control (or version control) is the practice of tracking and managing changes to code. Source control management (SCM) systems provide a running...
Read more >
Source Control Integration - MATLAB & Simulink - MathWorks
You can use MATLAB to work with files under source control. You can perform actions such as updating and committing code, merging changes,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found