Community driven shared projects (GIT)

Discussion forum about all things Gupta, OpenText and the community.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3390
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Community driven shared projects (GIT)

Post by Dave Rabelink » 13 Jan 2022, 10:21

It is a good idea to have the community manage shared projects like CDK tools or handy libraries using a version control system.
All developers can participate and contribute to the development.

Besides that the success of such projects depend on participation of developers and active repository reviewers we also have a typical TD related obstacle to overcome.

TD sources are highly linked to specific TD versions. Old source can easily be loaded/ported to newer TD versions.
Backporting is difficult as the original source will be stripped of the source-code structures introduced in newer TD versions.

Also the specific TD file structure is difficult to be used in shared versioning systems. Code reviews using tooling can only be fairly done in indented text format.

So such shared projects need a lot of "rules" to be of any use.

It will not work that a source taken from the repository is ported to a newer TD version and then pushed back to the repo.

I would like to have a discussion how such shared projects could work in practice and which rules should apply.

Some things to consider:

What will the default TD version be for a project? As low as possible? Should TD 5.1 be the minimum? Or should it be ANSI/UNICODE compatible?
Meaning that newer features in later TD versions are not allowed in the shared project.
All files must be in indented text format to be accepted for instance to support easy code review.
Beware that by specifying a specific TD version, you could block other TD developers wanting to participate when they do not own that version.

Code reshuffle is not handy as it will produce a lot of "noise" in code reviews as there are binary HEX blocks in text files which grow and shrink.
Even changing the window layout and toolbar positions will result in huge blocks of changed HEX data which could contain not important settings but can contain settings which are used.

Who has idea's/suggestions on this?

One system I would use is GIT as this is de facto standard nowadays. Over here we use GIT and works fine but it has a few issues concerning the TD source files.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 13 Jan 2022, 12:51

Hi,

at first, I don't think that a tool to find unused source codes should or can be implemented in TD.
I think, it should or must be implemented in C#.
Dr. Livingstone from ITG was such a tool which was usable up to TD 4.2. It was integrated in TD as design hook dll, but it seems that this is not possible any longer in TD 7.4.
The reason why I think it should be implemented in C# is performance and the limited stack/memory size in TD. You cannot implement highly recursive algorithms in TD because of the limited stack size.
We used Dr. Livingstone, which was fast. Less than 30 seconds to read the whole sourcecode and less than 30 seconds to find all unused items.
We also had implemented an own tool written in TD and based on CDK to read the whole sourcecode. This took 15 to 30 minutes.
The tool runs through the sourcecode and searches for some things (like forgetten to call SalSendClassMessage() if a message is overwritten). This took 15 to 30 minuten, too.
We stopped enhancing this tool, because it was not possibe. Due to performance. And more due to instability and/or stack overflow.

At second, I don't think that indended text is a good option. I would prefer text.
In the past we have noticed, that indended text sometimes makes problems and that it can happen, that you cannot open such a file in TD (although it was saved by TD).

In our source code reviews (done for most implementations) we use Visual Studio Code and a local GIT repository to compare different versions of text files.
But this is not so easy to use - especially due to the differences in hex blocks and the fact that TD saves diffent design time layouts and +/- for open/closed source code nodes.

Kind regards,
Rainer

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3390
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Community driven shared projects (GIT)

Post by Dave Rabelink » 14 Jan 2022, 09:30

RainerE wrote:
13 Jan 2022, 12:51
at first, I don't think that a tool to find unused source codes should or can be implemented in TD.
I think, it should or must be implemented in C#.
I agree on that. For the particular case of creating a "unused code" tool we should use existing tools/libraries which are available like lexers/parsers etc.
On that topic, I used all that stuff eons ago in my studies, but at this point need to really catch up on that subject.

But more generally, community driven development like SAL libraries and "ready-to-go" TD tools, components and classes written in TD have the issues I described in the opening post.

So shared development work can be split into pure TD development and development using "other" environments to enhance TD functionality or specific tooling.
At second, I don't think that indended text is a good option. I would prefer text.
In the past we have noticed, that indended text sometimes makes problems and that it can happen, that you cannot open such a file in TD (although it was saved by TD).
Well, that was my opinion most of the time in the early ANSI days. But since we use versioning tools like SVN and GIT and switched to indented text format we never encountered issues with that format.
And we use huge libraries and thousands of files utilizing all kinds of source structures for many many years now. So my opinion has changed on that.

If you have examples of sources or structures going wrong in indented text I would gladly want to know this. Maybe it is a situation which we do not have (yet).

The main reason to use indented text is that using versioning tools/compare tools and tools for code reviews are much easier to use.
Reading indented text is much better than trying to manage all those HEAD. leveling.

It is a shame we still have the TD source file format and also those irritating HEX blocks which change all the time by just changing the TD IDE layout.
Also some "settings" which are coded in those blocks are hard to find using text/merge tools. The .data DT_MAKERUNDLG block even is one of the reasons backported apps will crash upon compilation.
Why those settings are obscured in HEX blocks is a mystery to me.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

a_sivababu
India
Posts: 505
Joined: 10 Mar 2017, 08:46
Location: Chennai,India

Re: Community driven shared projects (GIT)

Post by a_sivababu » 15 Jan 2022, 05:59

may not be much relevant to this topic but just adding my frustration due to this HEX blocks...
It is a shame we still have the TD source file format and also those irritating HEX blocks which change all the time by just changing the TD IDE layout.
Also some "settings" which are coded in those blocks are hard to find using text/merge tools. The .data DT_MAKERUNDLG block even is one of the reasons backported apps will crash upon compilation.
Why those settings are obscured in HEX blocks is a mystery to me.
I face strange issues due to this Hex blocks whenever I migrate Win32 code to TD .NET. I remove this block here and there in the text file then this strange issues get disappeared and also I did not get issues in TD.NET or even Win32 due to this removal. OpenText/Gupta should look into this!

Thanks!
Siva A

TWitte
Germany
Posts: 70
Joined: 06 Nov 2017, 13:07
Location: Unterhaching

Re: Community driven shared projects (GIT)

Post by TWitte » 18 Jan 2022, 07:53

a_sivababu wrote:
15 Jan 2022, 05:59
I face strange issues due to this Hex blocks whenever I migrate Win32 code to TD .NET. I remove this block here and there in the text file then this strange issues get disappeared and also I did not get issues in TD.NET or even Win32 due to this removal. OpenText/Gupta should look into this!
Actually I think the HEX Blocks should be removed and replaced with human readable code. This would help to analyze and prevent problems with it. I go and open a feature request for it.
RainerE wrote:
13 Jan 2022, 12:51
at first, I don't think that a tool to find unused source codes should or can be implemented in TD.
I think, it should or must be implemented in C#.
Agree. Besides the performance we would be more flexible on adapting to TD changes like new features.
Dave Rabelink wrote:
14 Jan 2022, 09:30
But more generally, community driven development like SAL libraries and "ready-to-go" TD tools, components and classes written in TD have the issues I described in the opening post.
So shared development work can be split into pure TD development and development using "other" environments to enhance TD functionality or specific tooling.
Also regarding your opening post, we should not cover to many TD versions or the libraries should be as modular as possible. Every implementation needs a review of the lowest possible TD Version to keep the files backportable. Is it possible to make a poll to get an overview of the most used TD versions?
Timo Witte
BPCS Consulting Services

Michael Ehehalt
Germany
Posts: 73
Joined: 13 Mar 2017, 09:17
Location: Frankfurt, Germany

Re: Community driven shared projects (GIT)

Post by Michael Ehehalt » 18 Jan 2022, 08:57

RainerE wrote:
13 Jan 2022, 12:51
Dr. Livingstone from ITG was such a tool which was usable up to TD 4.2. It was integrated in TD as design hook dll, but it seems that this is not possible any longer in TD 7.4.
Hi Rainer,

are you sure? The "DesignHookDLL"-Entry is still present in the Registry:

Computer\HKEY_CURRENT_USER\SOFTWARE\Gupta\SQLWindows 7.4

but this could be a relict ;-)

Where are your informations from? Release Notes?
Best regards,
Michael Ehehalt

TWitte
Germany
Posts: 70
Joined: 06 Nov 2017, 13:07
Location: Unterhaching

Re: Community driven shared projects (GIT)

Post by TWitte » 20 Jan 2022, 05:47

Next idea would be a testing client for new gupta versions. Looking at the bugs appearing lately, I think it may be useful to check every SalFunction, VisFunction a.s.o. for its functionality and also all actions against databases with different datatypes and szenarios. This will save time for everyone of us.
Timo Witte
BPCS Consulting Services

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 20 Jan 2022, 15:50

Michael Ehehalt wrote:
18 Jan 2022, 08:57
RainerE wrote:
13 Jan 2022, 12:51
Dr. Livingstone from ITG was such a tool which was usable up to TD 4.2. It was integrated in TD as design hook dll, but it seems that this is not possible any longer in TD 7.4.
are you sure? The "DesignHookDLL"-Entry is still present in the Registry:
Computer\HKEY_CURRENT_USER\SOFTWARE\Gupta\SQLWindows 7.4
but this could be a relict ;-)

Where are your informations from? Release Notes?
I have freshly installed TD 7.4.1 and there is no DesignHookDLL in the registry (as it always was with TD 4.2).
So I thought, Gupta/Opentext has removed this. But I do not know...

Rainer

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 20 Jan 2022, 15:53

Dave Rabelink wrote:
14 Jan 2022, 09:30
At second, I don't think that indended text is a good option. I would prefer text.
In the past we have noticed, that indended text sometimes makes problems and that it can happen, that you cannot open such a file in TD (although it was saved by TD).
Well, that was my opinion most of the time in the early ANSI days. But since we use versioning tools like SVN and GIT and switched to indented text format we never encountered issues with that format.
And we use huge libraries and thousands of files utilizing all kinds of source structures for many many years now. So my opinion has changed on that.

If you have examples of sources or structures going wrong in indented text I would gladly want to know this. Maybe it is a situation which we do not have (yet).
I have played around but could not get a not working example.
I don't have the time to convert our 250 files at the moment.
The main reason to use indented text is that using versioning tools/compare tools and tools for code reviews are much easier to use.
Reading indented text is much better than trying to manage all those HEAD. leveling.
That's a good point. Perhaps we should try that too, because we use VS Code to compare/review the code.

Rainer

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1462
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Community driven shared projects (GIT)

Post by Igor Ivanovic » 21 Jan 2022, 10:57

Rainer,

Some time ago I have created a small utility for saving library files in different modes.
That's how I converted all of my library files at once.
I thought I've sent it before but couldn't find it in TD samples here, so let me know if you are interested.
Igor Ivanovic
Image

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 25 Jan 2022, 09:26

Igor,

thx a lot. I have found some apps in the samples and will try them.

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 03 Feb 2022, 16:04

I can confirm, that Indented Text is now usable without problems.

TWitte
Germany
Posts: 70
Joined: 06 Nov 2017, 13:07
Location: Unterhaching

Re: Community driven shared projects (GIT)

Post by TWitte » 21 Mar 2024, 10:27

So. Where are we standing at? :-)
Timo Witte
BPCS Consulting Services

RainerE
Germany
Posts: 2223
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Community driven shared projects (GIT)

Post by RainerE » 25 Mar 2024, 08:03

Hi,

1. we use indented text without problems.
2. for our own source code check tool, we have a tool that converts all ~ 250 files to text. The source code check tool does only a few checks because it is written in TD, not in C#. If we implement more checks, the tool reaches the low stack limit of TD and crashes.
3. we do do check the code for unuses variables, functions, classes any more. We do not have a replacement for Dr. Livingstone.

Rainer

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests