1. Ross Wood
  2. PowerBuilder
  3. Wednesday, 3 April 2024 12:56 PM UTC

Hi,

When I delete objects from the source code, and then start a build, I find that after the build the PBL still contains those deleted objects.

I tried the build from OracScript, PBC220 or the PBautobuild220, none of those helped.

If I refresh the library in the IDE, then the objects are gone.

Or, if I delete the pbl completely before I start the build then the PBL is done correctly.

Looks like a bug to me. 

What is the right way to handle this situation?

Thanks

Accepted Answer
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 4 April 2024 06:17 AM UTC
  2. PowerBuilder
  3. # Permalink

No specific reason. I was already using pbc before I created the orca script.

For the issue, I believe you should open a support case. This seems to be a bug and should be fixed.

Anyway, I believe that the new compiler (PB 2025) will be "free" from such issues...

Andreas.

Comment
  1. Ross Wood
  2. Monday, 8 April 2024 18:26 PM UTC
Thank you Andreas,

Actually, I didn't bother with opening a bug, I'll wait for 2025.

In the mean time, I committed the PBL and went on with my day.

Have a great day
  1. Helpful
There are no comments made yet.
Ross Wood Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 17:32 PM UTC
  2. PowerBuilder
  3. # 1

BTW Andreas, I was wondering why you use the pbc after the OrcaScript? Doesn't the OrcaScript take care of the compilation already?

Comment
There are no comments made yet.
Ross Wood Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 16:03 PM UTC
  2. PowerBuilder
  3. # 2

Tried RefreshPbl : true again, no luck, the deleted files remain.

Regarding first deleting the pbl files, I tried this with PBautobuild220 and PBautobuild220 had a hissy fit, so like you said, that's also a no no.

Not being able to delete is a bit contradictory because based on the documentation:

Setting "RefreshPbl" to true if you want to refresh the PBL files by deleting and then generating the PBL files again.

So they can delete but we can't, I suspect that they collect the library structure from the pbl file before deleting...

I tried SCC refresh full, this didn't delete the files from the library.

Comment
There are no comments made yet.
Ross Wood Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 14:29 PM UTC
  2. PowerBuilder
  3. # 3

Ah, okay, well, you're right that I shouldn't need to do this. Seems to have worked with SCC though. When I deleted the PBL, they were recreated after the build and the deleted files were gone like the wind

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 14:18 PM UTC
  2. PowerBuilder
  3. # 4

I was wrong about "you can delete the pbls". You should not need to do that. The Merging part or your json will make the utility do what is needed.

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 14:15 PM UTC
  2. PowerBuilder
  3. # 5

Take a look at the following link: Working with a PowerClient project - - Users Guide (appeon.com).

While it's about PowerClient, the logic for the json is the same for Powerbuilder Client Server applications.

Andreas.

Comment
There are no comments made yet.
Ross Wood Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 14:14 PM UTC
  2. PowerBuilder
  3. # 6

I believe that I've already tried RefreshPbl : true. I will try again and let you know.

When you say that you were wrong, what are you referring to?

I haven't tried scc refresh target full, but I've tried 3pass.

I will also try refresh full and let you know the result

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 13:56 PM UTC
  2. PowerBuilder
  3. # 7

Well, I checked, and I am wrong.

What you have to do for pbautobuild220 is to set:

            "Merging": [
                {"Target": "","LocalProjectPath": "","RefreshPbl": true}
            ],

Have you configured the above section in your json file?

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 13:45 PM UTC
  2. PowerBuilder
  3. # 8

As you are using PB 2022, I guess that with PBautobuild220 you can delete the pbls. They should be recreated (but I never tested, I believe it would because the pbls should not be in your source control for PB 2022)...

Here is the orca script I use in PB 2019 R3 to achieve the same result.

start session 
scc set connect property localprojpath "C:\ProjectBuild\PB2019Src\<MY PROJECT>" 
;localprojpath must point to the parent directory of ws_objects folder
scc set connect property logfile  "C:\ProjectBuild\PB2019Src\<MY PROJECT>\<MY PROJECT>.log" 
scc set connect property logappend false
scc set connect property deletetempfiles "true"
scc connect offline
scc set target "C:\ProjectBuild\PB2019Src\<MY PROJECT>\Common\<MY PROJECT>.pbt" "refresh_all importonly"
scc refresh target "full"
scc refresh target "3pass" 
scc close
end session

After the above script, I do the compilation using pbc190...

Before running the orca script i have already pulled all changes using Git.

@echo This is part of a Batch File that pulls changes.
:UPDATE
echo "GIT FETCH Changes"
cd C:\ProjectBuild\PB2019Src\%1
git fetch origin master
git checkout origin/master
cd c:\_build
rem pause
echo "GIT FETCH Complete"
goto :ORCA

Depending on how large is your project, the orca script may take some time to complete.

Andreas.

Comment
There are no comments made yet.
Ross Wood Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 13:31 PM UTC
  2. PowerBuilder
  3. # 9

Hi Andreas,

Thank you so much for your quick answer.

Yes, true, if I'm interested in the IDE, then indeed I can refresh and solve the problem.

The point of my question is that I delete the source file, commit to GIT and start a build, I'm not really interested in even opening the IDE. (you can call me a notepad++ monkey).

Hopefully that clarifies my question further.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 13:21 PM UTC
  2. PowerBuilder
  3. # 10

Hi.

The right way to handle this situation is to do what you did. Refresh. This is documented! It's stated:

After the object is loaded into the PowerBuilder IDE, it might be changed outside of the PowerBuilder IDE, for example, the developer merges the changes from the other version using a Git client, and such changes will not be detected by the PowerBuilder IDE, you will need to right click the object and select Refresh from the pop-up menu to reload the object in the PowerBuilder IDE.

Whenever something changes outside from pb, you need to perform a refresh.

Andreas.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.