microsoft / microsoft/vscode-makefile-tools

Compile_commands: add "output" keyword when needed

Open
#176 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Feature: accuracy
Dominant language
TypeScript
Stars
242
Forks
78
PR merge metrics
No merged PRs in 30d

Description

Add the "output" keyword into the compile_commands.json generated by the extension to make sure that the scenario of compiling the same source into multiple outputs is correctly represented.

Note for implementation: use explicit output switches (-o, -out, -Fe, -Fo, etc...), if none present use "Must remake target Target Name" message from dryrun or build log (generated with --debug switch for make). If no such text identified then don't generate "output" keyword at all (it is optional anyway) because there is no information to help me differentiate from the current compilation of the given source file and any other different compilation of that same source file (for example, we don't track yet copy/rename/move operations of the output result).

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

No files or tests are named. Start by locating the TypeScript code that generates compile_commands.json and the handling of explicit compiler output switches, then inspect how dry-run or --debug build output is available. Done means adding an output entry when a reliable switch or target message identifies it, and omitting it when no output can be determined.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.