IBM / ibmi-bob

A build system for creating IBM i-native objects using GNU Make.
https://ibm.github.io/ibmi-bob
Apache License 2.0
48 stars 21 forks source link

TRG object have no output when running makei b #328

Open irfanshar opened 5 months ago

irfanshar commented 5 months ago

For our CL pseudo source, we expect output like the following

=== Creating BND from [SAMPLE.BNDDIR]
!DLTOBJ OBJ(bobirfan/SAMPLE) OBJTYPE(*BNDDIR)
CRTBNDDIR BNDDIR(bobirfan/SAMPLE)
 ADDBNDDIRE BNDDIR(bobirfan/SAMPLE)  OBJ((*LIBL/XML *SRVPGM) (*LIBL/ORDER *SRVPGM) (*LIBL/TXT *SRVPGM)  (*LIBL/XSS *SRVPGM) (*LIBL/FARTICLE *SRVPGM)  (*LIBL/FCUSTOMER *SRVPGM) (*LIBL/FFAMILLY *SRVPGM)  (*LIBL/FPARAMETER *SRVPGM) (*LIBL/FPROVIDER *SRVPGM) (*LIBL/FVAT *SRVPGM) (*LIBL/LOG *SRVPGM))

✓ SAMPLE.BNDDIR was created successfully!

We don't see that for TRG objects.

@edmundreinhardt does this have to do with the fact that these files use ADDPFTRG instead of CRTxxx like our other CL pseudo-source

edmundreinhardt commented 5 months ago

It seems to fail at irregulat times

Running Action: /QOpenSys/pkgs/bin/makei build (4:11:23 PM)
Working directory: /home/REINHARD/builds/bob-recursive-example
Commands:
    /QOpenSys/pkgs/bin/makei build

> /QOpenSys/pkgs/bin/make -k BUILDVARSMKPATH="/tmp/tmph6pebp52" -k BOB="/QOpenSys/pkgs/lib/bob" -f "/QOpenSys/pkgs/lib/bob/src/mk/Makefile" all
make: Warning: File '/home/REINHARD/builds/bob-recursive-example/QSQLSRC/ORD701.SQLTRG' has modification time 14091 s in the future
=== Creating SQL TRIGGER in from Sql statement [ORD701.SQLTRG]
RUNSQLSTM srcstmf('/home/REINHARD/builds/bob-recursive-example/QSQLSRC/ORD701.SQLTRG') DBGVIEW(*SOURCE) TGTRLS() OUTPUT(*PRINT) MARGINS(1024) COMMIT(*NONE )
/QOpenSys/pkgs/bin/bash: line 1: /home/REINHARD/builds/bob-recursive-example/.logs/ORD701.splf: No such file or directory
✕ Failed to create ORD701.PGM!

make: warning:  Clock skew detected.  Your build may be incomplete.
Objects:             1 failed 0 succeed 1 total
 > Failed objects:    ORD701.PGM
Build Completed!

Fetching errors from .evfevent.
Failed to download a file after Action: No such file

What I notice is that 1) there is a time skew on p8adt05 that makes BOB this that this source is new when it is not make: Warning: File '/home/REINHARD/builds/bob-recursive-example/QSQLSRC/ORD701.SQLTRG' has modification time 14091 s in the future 2) At random times we get the message /QOpenSys/pkgs/bin/bash: line 1: /home/REINHARD/builds/bob-recursive-example/.logs/ORD701.splf: No such file or directory

The problem occurs for both BUild and Compile modes The second message does not appear when it succeeds

edmundreinhardt commented 5 months ago

That message is happening when the standard out is being written to the output at https://github.com/IBM/ibmi-bob/blob/6310de2028d6ea01147ff300843cdcbbfb46df7f/src/mk/def_rules.mk#L1256

The problem is that somebody deleted the ".logs" directory and then didn't recreate it. Please investigate this. @irfanshar

irfanshar commented 4 months ago

@edmundreinhardt What steps can I take to reproduce this?

I am not seeing the original issue anymore (where there is no output when running makei b).

I also am not seeing the message /QOpenSys/pkgs/bin/bash: line 1: /home/REINHARD/builds/bob-recursive-example/.logs/ORD701.splf: No such file or directory that you get randomly, after attempting to build the object multiple times.

I have attempted both build and compile modes.

I also manually removed the .logs directory and then tried to build and still did not see the message

AIforIBMi commented 4 months ago

As discussed, let's modify the extensions to NOT delete .evfevent and .logs

irfanshar commented 4 months ago

Modification to clear .evfevent and .logs is being tracked here https://github.com/IBM/vscode-ibmi-projectexplorer/issues/538