Rumchiller

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • in reply to: Clang, the 8192nd #24134
    Rumchiller
    Participant

    Hello!

    Sorry for the long absence.

    Seems that I have the same problem like described in this post: https://sysprogs.com/w/forums/topic/intellisense-bug-vs-2017/ . I will also try the new build.

    in reply to: Clang, the 8192nd #23652
    Rumchiller
    Participant

    I am very sorry for the bad formatted post. But this post editor is very very ….. bad 😉

    in reply to: Clang, the 8192nd #23651
    Rumchiller
    Participant

    Please try reproducing the original problem with the missing headers when including them from a source file, not another header file.

    Ok, this is the behaviour:

    1. My “generic-lib” contains one dummy.cpp file and apart from that is a header only library. All properties of this CMake target (sources, include-dirs) have public scope.
    2. All my other libraries have mixed private and public scope properties.
    3. I created two files, “file1.cpp” (private scope) und “file2.cpp”(public scope) and added them as sources to my library “lib”.
    4. Now <generic.hpp> can be only found in “file1.cpp”, but not in “file2.cpp” (???).
    5. Now just setting “file2.cpp” to private scope: et voila, <generic.hpp> can be found.
    6. Now setting both files to public scope, that clang shouldn’t find the headers anymore: That’s right, clang can not find them. BUT:
    7. After project clean and rebuild, <generic.hpp> is always found in both source files, whether they have public or private scope. This behaviour is ok for me.

    There was no include of <generic.hpp> inside any of my source files. I included it in two source files in each library (one in a public scoped source, one in a private scoped source). First there was no effect. After a rebuild no effect to. Buf after a VS-restart a few clang errors regarding the missing header file were gone.

    When there is a file, that I leave opened in the editor and the header cannot be found in it, I restart VS and now it can be found. It’s a very strange behaviour.

    My project has an out of source build, but looks as follows:

    – project

    • build
    • CodeDB
    • src
    • VisualGDBCache
    • CMakeLists.txt (main cmake-file)
    • Other VGDB-Files like .mak, .sln, .xml, .vgdbcmake

    In the whole project there is no such file.

    Another thing: Is it possible to deactivate the jumps inside the project explorer when changing the active file inside the editor? It’s clear, that the engine can not know at which library I am working at, so it jumps to the first one in the list. This makes the navigation really, really bad on big projects, due to the fact, that all folders become elapsed after the jump.

    • This reply was modified 5 years, 3 months ago by support. Reason: formatting
    • This reply was modified 5 years, 3 months ago by support. Reason: formatting
    in reply to: Clang, the 8192nd #23592
    Rumchiller
    Participant

    So now the problem is getting bigger. In some file clang cannot find the headers. It’s undefined behavior, because when I restart VS the headers in one file are found, in another not. Another problem is, that VGDB shows some header files twice in project explorer.

    Please see the attached image and clang log dump.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Clang, the 8192nd #23572
    Rumchiller
    Participant

    Hi,

    the second problem gone with the new build 2765, thanks for that.

     

    Regarding the first problem:

    1. I create a new file inside one of my library targets and include that header file in my target_sources (not necessary but my I prefer this way because of my CMake script)
    2. The include path was already set and working
    3. I rebuild the project
    4. I open the new header file (test.hpp), an already existing header file (drivers.hpp) and getting the beheavior like in the attached image.

    Then I followed your guide:

    1. I located the header (test.hpp) inside the Clang Intellisense Diagnostics Console. It has a red cross and no CFLAGS. The header drivers.hpp also has a red cross. There are a many files with a red cross. It seems that all header files have a red cross. Maybe this is related to the fact, that I include the header files in target_sources?
    2. The projects CFLAGS shows the correct include directory “C:\EasyMachines\EasyRotorBalancer\firmware\src\modules\system\inc”.
    3. I have no CodeModel.json file inside my project. The only existant json-Files are “VSWorkspaceState.json” and “ProjectSettings.json” inside the .vs-directory.

     

    Thanks in advance!

    Attachments:
    You must be logged in to view attached files.
    in reply to: Clang, the 8192nd #23562
    Rumchiller
    Participant

    Regarding the first problem, I forgot to mention, that generic.hpp belongs to a interface library.

    in reply to: Clang, the 8192nd #23559
    Rumchiller
    Participant

    The 8193rd 😉

    When opening VisualStudio and loading a project (same env. like in my first post), some files are still opened in the editor. It happens, that some files will not be parsed by clang:

    [+0:18:24.560] Starting operation: Parse – HighlightBraces
    [+0:18:24.560] Cannot retrieve source backend for C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:18:24.560] Operation completed: Parse – HighlightBraces [0 msec]

    After closing the file and reopen it, clang works as expected:

    [+0:21:23.378] C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp belongs to a compatible project (C:\EasyMachines\EasyRotorBalancer\firmware\vgdb.vgdbcmake) and will be handled by our engine
    [+0:21:23.378] C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp belongs to a compatible project (C:\EasyMachines\EasyRotorBalancer\firmware\vgdb.vgdbcmake) and will be handled by our engine
    [+0:21:23.405] Indentation size: 4, will insert tabs
    [+0:21:23.409] Starting operation: Determining code formatting settings for C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.409] Operation completed: Determining code formatting settings for C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp [0 msec]
    [+0:21:23.427] Active document changed to C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.428] Active source file for header discovery changed to C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp.
    [+0:21:23.428] Checking C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp for missing headers…
    [+0:21:23.428] Updating CodeJumps labels for 0 objects…
    [+0:21:23.428] No CodeJumps labels need updating. Cancelling aggregate search.
    [+0:21:23.428] No missing headers for C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp.
    [+0:21:23.428] Starting operation: Parse – Check
    [+0:21:23.428] Starting operation: Reparsing C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.430] C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp has not changed since last build. Doing a quick recheck…
    [+0:21:23.434] Found an outdated PSF 0 due to C:\EasyMachines\EasyRotorBalancer\firmware\src\modules\os\inc\thread.hpp (expected 885/1548354330, got 885/1548354829) during initial check. It will be re-built.
    [+0:21:23.435] Rebuilding PSF 0 (normal preamble)…
    [+0:21:23.435] Starting fpsBuildingPreamble on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.757] Completed fpsBuildingPreamble on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.757] Successfully rebuilt PSF 0 (normal preamble)…
    [+0:21:23.757] Saving PSF 0 (normal preamble) to C:\EasyMachines\EasyRotorBalancer\firmware\CodeDB\vgdb.vgdbcmake-Debug\app.npd…
    [+0:21:23.757] Starting fpsSavingPSF on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.759] Completed fpsSavingPSF on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.759] Successfully saved PSF 0 (normal preamble)…
    [+0:21:23.759] Starting fpsParsingFileBody on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.817] Starting fpsAnalyzingReferencesLightweight on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.824] Completed fpsAnalyzingReferencesLightweight on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.827] Completed fpsParsingFileBody on C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp
    [+0:21:23.827] Checking C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp for missing headers…
    [+0:21:23.827] No missing headers for C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp.
    [+0:21:23.830] Starting operation: Exporting parse results
    [+0:21:23.831] Operation completed: Exporting parse results [0 msec]
    [+0:21:23.831] Checked C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp: 0 error records
    [+0:21:23.831] Operation completed: Reparsing C:\EasyMachines\EasyRotorBalancer\firmware\src\app\app.cpp [403 msec]
    [+0:21:23.831] Operation completed: Parse – Check [403 msec]
    [+0:21:23.891] Starting operation: Parse – HighlightBraces
    [+0:21:23.891] Operation completed: Parse – HighlightBraces [0 msec]

     

    Greetings!

    in reply to: CMake 3.13 #23516
    Rumchiller
    Participant

    Thanks for that fast response and solving the problem!

    in reply to: formatting with visualGDB 5 is REALLY crap! (sorry..) #12100
    Rumchiller
    Participant

    With preview 6 it’s now working perfectly 🙂

    Thanks!

    Rumchiller
    Participant

    I think I found the problem:

     

    Uart(Interface interface,
    uint32_t baudrate,
    StopBit s);

    -> comment after this moves to the right.

     

    Uart(Interface interface, uint32_t baudrate, StopBit s);

    -> after that the formatting behaves normally.

     

    It’s maybe not too much work to correct this. And I also think, most problems I got with autoformatting are caused by this.

    • This reply was modified 6 years, 9 months ago by Rumchiller.
    Rumchiller
    Participant

    Yeah, when the indentation is resetted, a single reformat is working. But I have to reset the indentation each time before reformating.

    Regarding the native IntelliSense engine, working with it is impossible due to the errors of it.

    Rumchiller
    Participant

    Why VisualGDB has its own Formatter? Does the VisualStudio Formatter not working properly?

    Rumchiller
    Participant

    Is it proper that the comments are not collapesable?

    Rumchiller
    Participant

    Found another problem:

    When autoformatting it also opens the closed brackets, e.g. when Uart1 class is closed, then autoformat opens it again.

    Rumchiller
    Participant

    I am having big problems with auto formatting the whole code. Sometimes all is fine, but most of the time I have to do “format selected text”.  The behaviour is the same with hokey or  Edit->Advanced->Format Document.

     

    I attached an example code.

     

    An option in a future version of VisualGDB to deactivate the formatting of comments would be absolutley sufficient for my purposes.

     

    PS: I had to rename .hpp to .h for the upload. But it makes no difference for formatting.

    • This reply was modified 6 years, 9 months ago by Rumchiller.
    • This reply was modified 6 years, 9 months ago by Rumchiller.
    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 39 total)