Page 1 of 1

Source Code to text files

Posted: Sat Apr 30, 2016 3:27 am
by blaynec
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

Re: Source Code to text files

Posted: Mon Jul 18, 2016 1:51 pm
by Stewart Marshall
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

Re: Source Code to text files

Posted: Fri Sep 02, 2016 12:55 am
by atostaine
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

Re: Source Code to text files

Posted: Fri Sep 09, 2016 9:29 am
by MarkDale
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.

Re: Source Code to text files

Posted: Wed Sep 14, 2016 4:19 am
by atostaine
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

Re: Source Code to text files

Posted: Sat Oct 08, 2016 3:41 am
by blaynec
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)

Re: Source Code to text files

Posted: Sun Oct 09, 2016 4:31 pm
by dannyoorburg
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

Re: Source Code to text files

Posted: Thu Dec 01, 2016 6:10 pm
by pauld68
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?

Re: Source Code to text files

Posted: Thu Dec 01, 2016 8:00 pm
by Stewart Marshall
If you're having basic problems with LANSA, the best thing to do is to contact your regional support desk

Regards