microsoft / microsoft/vscode-cmake-tools

[Bug] Incorrect macro expansion during compile task in 1.23.24

Open
#4,798 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug more info needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Hi everyone.
I would like to thank all of yours for your outstanding work.
It seems that in latest version during compile task some kind of incorrect macro expansion was occured.
For example, 1.23.5 expand command line for google log as follows :
/usr/bin/g++ -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DFMT_LOCALE -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" .........
Latest version (1.23.24) produces the followed[after rm -rf ./build, restart ide, clean/configure/build]:
/usr/bin/g++ -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DFMT_LOCALE -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 "-DGOOGLE_GLOG_DLL_DECL=\"\"" "-DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=\"\"" ..........
Please note erroneous extra quotes before -DGOOGLE... .
Version at least 1.23.22 is free from this.
Build the whole source tree is successfull,however.

```shell
There are a lot of internal file system entries which are not relevant but cannot be exposed.
```

### Additional Information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the compile task with the command-line definitions shown in the issue, comparing versions 1.23.22 or 1.23.5 with 1.23.24. Trace the macro-expansion path that generates the g++ arguments; done means the GOOGLE_GLOG definitions are emitted without the extra surrounding quotes. The issue does not name a file, test, or reproducible project.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, typescript
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.