Source Code to text files

Please log all suggestions for improvements and enhancements to Visual LANSA here. All entries will be acknowledged and added to the list for possible inclusion in later releases of Visual LANSA.
Post Reply
blaynec
Posts: 7
Joined: Wed Dec 09, 2015 3:55 am

Source Code to text files

Post by blaynec » Sat Apr 30, 2016 3:27 am

I would like a way to extract our Lansa source code and save it as text files.

Currently we are using an IBMi as our Master repository and PCs as Slave computers. We have 6 Lansa developers and quite a bit of code to manage. The reason I want to extract to text files is to run some external tools on our source code:
+ Store source code in SVN or git repository (for change management and code review)
+ Run something like NaturalDocs on the source to generate code documentation from source comments

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Source Code to text files

Post by Stewart Marshall » Mon Jul 18, 2016 1:51 pm

Version 13 introduced the option to configure VL as an independent installation using a version control system.

http://www.lansa.com/support/v13news/install/vcs.htm

This configuration turns the slave PCs in to independent master systems, leaving the IBM i as little more than a deployment target, accessible via the Deliver To option in the IDE.

Individual repository objects are saved in the VL database and as text files that can be managed with the version control software of your choice, allowing you to store complete history's of object changes, merge concurrent source changes and so on. We use SourceGear Vault for our internal VL development.

Version control is covered in the LANSA administration guide.

http://docs.lansa.com/14/en/lansa011/in ... 2_0010.htm

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

atostaine
Posts: 394
Joined: Wed Jan 20, 2016 7:38 am

Re: Source Code to text files

Post by atostaine » Fri Sep 02, 2016 12:55 am

Is it not possible to have an option that archives the source in the slave repository to the hard drive every time a component is checked out?

The VLF does this when you save the XML files.

This would be ideal for us. We aren't a big enough shop to require additional change control, but we would love to be able to archive all versions of our component source on another server (likely the system i)

Art
Art Tostaine

MarkDale
Posts: 102
Joined: Wed Dec 02, 2015 10:06 am

Re: Source Code to text files

Post by MarkDale » Fri Sep 09, 2016 9:29 am

You might be able to achieve something simple like that by using the lansa user exits on the IBMi. There is one called IJDT (I Just Did This) that I think gets run when someone checks something out for update.

The user exit is just a CL program that receives information about the action, such as an id for the kind of action, and the name of the component being checked out.

I suppose that CL program could get a copy of the source data for just that component (from DC@FRD), and put it somewhere, keyed by the component name and a date-time.

atostaine
Posts: 394
Joined: Wed Jan 20, 2016 7:38 am

Re: Source Code to text files

Post by atostaine » Wed Sep 14, 2016 4:19 am

Thanks for your reply.

I've been looking at the exits per a suggestion from someone off list.

I guess if I archived the records from DC@FRD I could make a reasonably human readable copy of the source, but if I ever wanted to revert the entire component back to a previous version that wouldn't be possible.

Art
Art Tostaine

blaynec
Posts: 7
Joined: Wed Dec 09, 2015 3:55 am

Re: Source Code to text files

Post by blaynec » Sat Oct 08, 2016 3:41 am

Thanks Lansa!

In June we moved our Lansa development setup from the IBMi master to a VCS master. (VCS = Version Control System; like SVN or Git)
There are some quirks to work around. However, it is one of the best things we have done for our Lansa development.

Our team was familiar with SVN, but when we switched to a VCS master we decided to go with Git (why not just change everything at once, right). However I don't think it matters which VCS system is used. I do want to say, Thanks Lansa for providing this functionality!

If you are looking for suggestions on VCS clients...
We currently use SmartGit - it's a graphical interface that makes using Git easier for us (removes any need for command line).
http://www.syntevo.com/

For SVN we have used free tools like TortoiseSVN and WinMerge.
https://tortoisesvn.net/


Once your source is in a VCS you can do other things with it too - like connect it to something like Redmine, Trac, or Mantis. (Bug tracking and Project Management software)

dannyoorburg
Posts: 152
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: Source Code to text files

Post by dannyoorburg » Sun Oct 09, 2016 4:31 pm

Hard to imagine how you ever lived without isn't it....

I understand it is a bit quirky because Lansa still needs the Repository tables. And you can still do imports /exports even though you should probably just use the VCS files to propagate changes...

But I'm happy to hear more people are starting to use it. I wouldn't be able to write the simplest bit of RDML without anymore.

:)

Danny

pauld68
Posts: 1
Joined: Thu Dec 01, 2016 6:02 pm

Re: Source Code to text files

Post by pauld68 » Thu Dec 01, 2016 6:10 pm

Hi, new here and I am hard to understand the online shopping website database tables are crashed and my hosting is not taking any responsibility and I am just putting questions to get helpful answer, what to do next?
Best place for Online Shopping In Australia @ 50% OFF.

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Source Code to text files

Post by Stewart Marshall » Thu Dec 01, 2016 8:00 pm

If you're having basic problems with LANSA, the best thing to do is to contact your regional support desk

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

Post Reply