-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed-off-by: Cristian Rivera [email protected] #48
Conversation
81d3007
to
7eedd68
Compare
Hi @crisrivlop! First off, thanks so much for your PR! Your change makes sense at a glance and was a complete oversight to me. Here is my review:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my above comment. Thank you!
Signed-off-by: crisrivlop <[email protected]>
Signed-off-by: crisrivlop <[email protected]>
Signed-off-by: crisrivlop <[email protected]>
Signed-off-by: crisrivlop <[email protected]>
Signed-off-by: crisrivlop <[email protected]>
Hi @worksofliam! Thanks for your quick response. I made all the requested changes.
so -bf imd -sa -l qddssrc/employee.table I appreciate your help with your feedback! |
…rategy Signed-off-by: crisrivlop <[email protected]>
@crisrivlop Great work here! Thank you greatly for your test case! I am also finding additional edge cases that I have not covered (my bad!), so with your permission do you mind if I also add some commits to your PR? I also think there are ways to make it simpler. Let me know if you're okay with that. |
Hi! @worksofliam, yes sure it is ok for me :) |
Signed-off-by: worksofliam <[email protected]>
I have made my commit. Do a pull and let me know what you think. Here is the gist of my changes:
|
It seems to be a better solution and is solving more issues than SQL references. So we can continue with the change :) |
Thanks @crisrivlop ! I will publish a new version of the CLI today with this fix. I am grateful for your PR! |
Resume
Here is an small change for SQLReference detection. Actually SQLReference is only read in the main scope of programs and modules. If there are SQL Sentences called in procedures without any other native sentence (for example: DCL-F or DLC-DS xxx EXTNAME(xxxx)) there is no detection of those SQL sentences. That's why there is a concatenation between the cache.sqlReferences and the sqlReferences from cache.procedures.scope.
Test Repo
I am using the following repo to test this new functionality: Example using source orbit, from this repo the following 2 impact analysis were extracted.
Impact Analysis from main
Impact Analysis
Touched objects:
EMPLOYEE.FILE
:qddssrc/employee.table
EMPLOYEE.FILE
Click to expand
EMPLOYEE.FILE
(qddssrc/employee.table
)Changes to this object have no impact.
Messages
No messages to show.
Project Listing
Click to expand
qddssrc/depts.table
qddssrc/employee.table
qrpglesrc/empsel.bnd
1
$(APP_BNDDIR).BNDDIR1
EMPSEL.MOD.MODULEqrpglesrc/empsel.mod.sqlrpgle
1
EMPSEL.SRVPGMqrpglesrc/mypgm.pgm.sqlrpgle
1
PGM2.PGMqrpglesrc/pgm2.pgm.sqlrpgle
1
MYPGM.PGMImpact Analysis from pull request changes
Impact Analysis
Touched objects:
EMPLOYEE.FILE
:qddssrc/employee.table
EMPLOYEE.FILE
Click to expand
EMPLOYEE.FILE
(qddssrc/employee.table
)EMPSEL.MOD.MODULE
(qrpglesrc/empsel.mod.sqlrpgle
)EMPSEL.SRVPGM
(qrpglesrc/empsel.bnd
)$(APP_BNDDIR).BNDDIR
(no source)PGM2.PGM
(qrpglesrc/pgm2.pgm.sqlrpgle
)MYPGM.PGM
(qrpglesrc/mypgm.pgm.sqlrpgle
)Messages
No messages to show.
Project Listing
Click to expand
qddssrc/depts.table
1
EMPSEL.MOD.MODULEqddssrc/employee.table
2
EMPSEL.MOD.MODULE, PGM2.PGMqrpglesrc/empsel.bnd
1
$(APP_BNDDIR).BNDDIR1
EMPSEL.MOD.MODULEqrpglesrc/empsel.mod.sqlrpgle
1
EMPSEL.SRVPGM2
EMPLOYEE.FILE, DEPTS.FILEqrpglesrc/mypgm.pgm.sqlrpgle
1
PGM2.PGMqrpglesrc/pgm2.pgm.sqlrpgle
1
MYPGM.PGM1
EMPLOYEE.FILE