-
Notifications
You must be signed in to change notification settings - Fork 16
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
@source-dependency Problems #343
Comments
Can you help me for this? Tell me something... Do you understand what i mean? |
I'm not sure, I will need to take a look this weekend |
Would implementing this help? |
I've added some code for including references from source-dep files, it is disabled by default but you enable it with setting:
fyi - references were never implemented for source-dep files, as the feature was more concerned with providing navigation to the definition include in the source file. |
ok maybe the solution is to implement the source dependency only to navigate at the declaration in the file referenced but is important to resolve the bugs above. For me could be top if i can go to the declaration in the source dependency file. but with no bugs in the references in the working. Sorry maybe i could tell that before... |
ok with the last update, the references tags seems working correctly in the code, but if i try to see the references in the procedure division with f12, from the declaration, of a variable that is used in both files (source code and source dependency activated with tag @) are always managed not correctly like in the image. NOTE: TO REPEAT THE BUG IS IMPORTANT THAT THE SOURCE DEPENDENCY MUST BE EQUAL TO THE SOURCE FILE, BUT WITH THE ADDING OF A LOT OF STRUCTURES DECLARATIONS PUT BY PREPROCESSOR IN MY CASE. in the image the variable S-INPU-DEPO is used in procedure division both in one file ( source) and in another (source dependency) , can you resolve this showing the using of the variable in each file as well as the declaration that appears now? |
!!!!!!!!!!!!! MAYBE ENDING SOLUTION !!!!!!!!!!!!!!!! Yes this could help, but on the opposite, so the rows with a defined string are analyzed in the source dependency, the others NOT, are ingored. THERE IS AN EXAMPLE OF COMPILED SOURCE (IMAGE 1) THAT I WANT TO INCLUDE IN THE ORIGINAL SOURCE FILE (IMAGE 2) |
With the last commits it seems that you have implented a way to ignore party of source dependency, it'ok but i am not able to modify directly the source dependency if you find way to EXCLUDE ALL rows in the source dependency EXCEPT for the rows that start with a String is the top. |
Please note these changes have not been released and are subject to change/ removal etc, eg if this causes stability or performance issues
|
Thinking about it more, the easiest way is to have a post-build step that takes your listing file and creates a dep file, for example: program-id. fred.
working-storage section.
adecp+ 01 ws-wibble pic x(10).
01 ws-second pic x.
procedure division.
goback.
end program fred. Then using the simpliest of tools: grep -E "^adecp+" fred.cbl >fred.cbl.dep Your get: adecp+ 01 ws-wibble pic x(10). |
Yes, is a solution but everytime i want to modify or analyze a source file, i shoud have to do this and there are problems:
Please, tell me if you can do what I said or not, you can optimize a lot our work. |
1> use a makefile or something, which if done right only does the actions unless it is out of date extensions are available to execute commands on save, so this could be another route to ensure the dep file is always in-sync |
yes of course but i use the remote ssh extension, because we work on server so i cannot create file on the client and or on the client or on the server, there would be the same problem the amount of the genereted files, thousand of files 😖 |
Any news? |
WIP to add regex based inclusion filter and finer grain with lsp on/off comments With docs update |
THANK YOU, YOU'RE THE BEST |
You can try out, the regex is between the two /'s *> @source-dependency /adecp+/ proc.cbl` also you can ignore specific ranges with: *> BEGIN-LS-IGNORE
01 ws-hidden pic x.
*> END-LS-IGNOREc If the semantic token provider is enable, then the tokens are marked as comments. {
"settings": {
"coboleditor.enable_semantic_token_provider": true,
.. |
Thank you for all, this upagrde make us work a lot better. 😊😊 |
I tried to add in a source file, the comment with "@source-dependency" mark and it works correctly:
But there is a problem with the references of the variables in the working and linkage section, they don't work:
BEFORE:
AFTER:
And also if i search the references with F12, it doesn't work properly.
THIS PROBLEM IS TRIGGERED BECAUSE THE FILE THAT I REFER INTO THE SOURCE FILE CONTAINS THE SAME STRUCTURE OF THE SOURCE PLUS THE PRE-PROCESSOR DATA STRUCTURE (THAT ARE VERY IMPORTANT TO READ THE SOURCE FILE AND THEY HAVE TO BE REFERENCED IN THE SOURCE).
CAN YOU DO SOMETHING ?
According to me, we should have the possibility to choice the use of the source dependecy between:
The text was updated successfully, but these errors were encountered: