microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

Configuration not parsed for intellisense #561

Open kulhanek-CNGROUP opened 4 months ago

kulhanek-CNGROUP commented 4 months ago

Hello,

I have a project created in CrossStudio for ARM. They offer a feature to generate a makefile, which I am trying to use to build the project in VS Code. The generated makefile has to be slightly modified to work, but I managed to build it using the makefile-tools extension.

The issue I am experiencing is with Intellisense not getting proper configuration from makefile-tools extension and so the code highlighting and references are messed up.

image

I have created this sample repo where the problem can be reproduced. To test it, it would be necessary to install the CrossStudio for ARM - the evaluation version is enough to test it. Also the paths in the makefile should be adjusted or the makefile regenerated in CrossStudio.

I also attach configurationCache.log dryrun.log targets.log for the project in VS code.

I would be very grateful for any help on this.

gcampbell-msft commented 4 months ago

@kulhanek-CNGROUP Thanks for this information and for posting the bug. In order for me to help investigate this, could you give the additional information of what OS you are working on?

Thanks,

kulhanek-CNGROUP commented 4 months ago

@gcampbell-msft sure Edition Windows 10 Enterprise Version 22H2 OS build 19045.4046 Experience Windows Feature Experience Pack 1000.19053.1000.0

gcampbell-msft commented 4 months ago

@kulhanek-CNGROUP Understood. I've marked this as investigation needed and placed it on our backlog. Thank you.

gcampbell-msft commented 1 month ago

@Yingzi1234 Could you help with attempting to reproduce this issue? Thanks.

Yingzi1234 commented 1 month ago

@gcampbell-msft Okay, we're trying to reproduce the user's question. @kulhanek-CNGROUP We are trying to reproduce your issue, the repo we opened after cloning it according to the repo you gave us had the error reported inside the main.c file. The error message says that the 'debugio.h' file was not found, and we really didn't find the 'debugio.h' file inside the 'make-test' folder we already downloaded, could you provide us with a new reproducible file? And we notice that the error slash in the image you provided above does not appear in the second line of code.

Please feel free if you have any doubt! 561

kulhanek-CNGROUP commented 4 weeks ago

@gcampbell-msft @Yingzi1234 Hello, as I mentioned earlier, it is necessary that you install at least the evaluation/trial version of CrossStudio for ARM. The file in question is provided by that platform. With common installation the file should be located at (C:/Program Files/Rowley Associates Limited/CrossWorks for ARM 4.10/include). This should be recognized from the makefile as one of the include paths - see line 6 in the makefile.

What troubles me more is that none of the configuration is being parsed from the makefile. In the configuration cache there is nothing :/ customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}}

kulhanek-CNGROUP commented 4 weeks ago

Also if installing that is an issue then feel free to just remove it from there along with the contents of the main. I don't really care about that, what I care is that none of the defines, include paths or anything gets parsed from that makefile for the configuration provider for intellisense..

Yingzi1234 commented 3 weeks ago

@gcampbell-msft @kulhanek-CNGROUP This issue is not reproduced in the latest version, you can get the details below.

ENV: VScode: 1.89.1 Makefile tools: 0.10.9(Pre-release) C/C++: 1.20.5

More info: No installation CrossStudio for ARM.

Repro steps:

  1. Open VSCode and clone this repo(https://github.com/kulhanek-CNGROUP/make-test.git)
  2. Open main.cpp file
  3. Place the cursor on #include “test_lib.h” and press the shortcut key Ctrl (or Cmd) + Click

Actual result: The intellisence definition is normal it can jump to the test_lib.h file issue561

kulhanek-CNGROUP commented 3 weeks ago

@Yingzi1234 @gcampbell-msft

I pushed a new commit in that repo adding a define to illustrate the issue. Please confirm it is working or not working for you. Could I have something misconfigured?

Here's what it does on my side.

make-test-1717583931069

Yingzi1234 commented 3 weeks ago

@gcampbell-msft @kulhanek-CNGROUP Thank you for your update! we were also able to reproduce your issue in the latest version. Details are as follows.

ENV:

  1. VSCode: 1.89.1
  2. Makefile tools: v0.10.9(Pre-release)
  3. C/C++: v1.20.5

More info: No installation CrossStudio for ARM.

Repro steps:

  1. Open VSCode and clone this repo(https://github.com/kulhanek-CNGROUP/make-test.git)
  2. Open main.cpp file
  3. Place the cursor on #include “test_lib.h” and press the shortcut key Ctrl (or Cmd) + Click
  4. Place the cursor on code “test_lib.h” and click the right mouse button to select “Go to Declaration”.

Actual result: The intellisence declaration shows “No declaration for ‘test_lib’” but “Go to definition” is works (You can get the screenshot from attachment) new561

kulhanek-CNGROUP commented 1 week ago

Actual result: The intellisence declaration shows “No declaration for ‘test_lib’” but “Go to definition” is works (You can get the screenshot from attachment)

@gcampbell-msft @Yingzi1234 Also, could you please address the issue why the body of #ifdef TEST appears as if TEST is not defined? The define is located in the makefile (-DTEST) as shown in my previous post.

Yingzi1234 commented 1 week ago

@kulhanek-CNGROUP Thank you for your reply, our development team is still investigating this issue and will get back to you if we have any updates. Thank you for your support!