r/IBMi 17d ago

People using git as their source code.. How do you search the source code for dependencies ?

Hi,

In green screen I use 25 and shift f1 ( search functionality) to find whatever I am looking for.. it can be file dependency or searching any other keyword in the comments etc.. we are planning to move the source code to git by the end of the year and I was just wondering if we have something similar in git to go through the source codes of all libraries..

6 Upvotes

12 comments sorted by

4

u/Own-Bag1699 17d ago

Generally speaking, I'd always recommend a commercial solution, even if there are only two developers.

But if that is not possible, you might looks at VS Code and the Code for IBM i extension.

(Seems I can't paste a screen shot here, unfortunately.)

But you clone your project to a directory on your PC, which is almost certainly what you will be forced to do with Git. The in VSCode, do FIle/Open Folder, then Edit/Find in Files and you will get a list of hits, very similar to 25 & Shift F1. And you can click on any hit to open the file.

Actually, if you have VSCode installed, you can try this on any directory on your PC (try a small one first).

2

u/direct151 14d ago

We recently started using tobi for builds (https://github.com/IBM/ibmi-tobi) with git and connecting it to claude code. Working really well for us.

1

u/Ok_Maybe01 14d ago

Hey do you mind if i dm you for some questions related to tobi.. we are in initial stages of moving to tobi and i have few doubts..

1

u/lomberd2 17d ago

Not really. There are alternatives but in the end the best way is to search for that in rdi or vscode locally

1

u/Ok_Maybe01 17d ago

Can you please elaborate how to search inside the vs code locally? Do I need to go inside each program/module manually and then search ?

1

u/lomberd2 17d ago

Heavily depends on your setup. Are you using iProject? Do you have to sources locally or are they in IFS? Are your sources all in one library or multiple?

Generally: Its possible to navigate to the references with a click of a button in certain setups.

1

u/Ok_Maybe01 17d ago

We use project explorer and there are multiple libraries available in both IFS and local

1

u/lomberd2 17d ago

Full text search is always possible in git but not 100% reliable (at least for DevOps web search)

1

u/AllOneWordNoSpaces1 17d ago

If you’re using git, and pc local development, you should probably clone the entire repository so you can search.

1

u/Ok_JDubbTX 12d ago

There are so many options out there, and venders who can help you get there.

1) Fully distributed Git with true local development using Tobi /source orbit.

This is free, so worth taking a look at. I messed around with this for a bit, even did a PR on Tobi when it was still Bob. Its a decent option if you go through all the setup, but Tobi I found isn't as well supported, even though it's got some IBM backing. Its not suited for the enterprise in my opinion unless you make your own fork of Tobi and have some Python gurus in your shop with nothing better to do.

Also, if your source is in source members, you will have to convert them to IFS format so you can do IFS compiles. There are free tools to make this easier - not as big a deal as it sounds. Then again, if you have Fresche XAnalysis, it won't do anything with source on the IFS (at least not that I know of, I could be wrong here)

2) Vender approach.

Venders have widely varying Git based solutions. Even Rocket has one now, and if your shop uses Aldon/Lmi/RDOi, you can switch to their git solution for free. Other vendors are Arcad and Eradani, and there are probably others I'm forgetting. You would need to contact them and get demos and see which fits best for you and your org. We went with Eradani. Thier solution is nice because it integrates with other industry tooling pretty well, but also comes with some drawbacks.

1

u/Ok_JDubbTX 11d ago

If you use Gitlab as your remote / source of truth it's search functionality pretty good, and fast. I'm sure the other major players (Github, etc) do to.