Skip to content
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

Support User Defines and Macro References AB Experiment #12844

Draft
wants to merge 2 commits into
base: kuchung/SupportCompilerArgumentAB
Choose a base branch
from

Conversation

kuchungmsft
Copy link
Contributor

@kuchungmsft kuchungmsft commented Oct 17, 2024

Support A/B Compiler Arguments Traits

  • Depends on Support Compiler Argument Trait AB Experiment #12979 to merge first.
  • copilotcppMacroReferenceFilter: regex string to filter macro reference for telemetry.
  • Telemetry related to user defines and macro references.
  • Added new trait compilerUserDefines to note the relevant user defines to

@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from 830f513 to 9357de0 Compare October 17, 2024 00:39
Extension/src/LanguageServer/copilotProviders.ts Outdated Show resolved Hide resolved
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from 9357de0 to 2516fa6 Compare October 19, 2024 00:29
Extension/src/LanguageServer/client.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/copilotProviders.ts Outdated Show resolved Hide resolved
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from 2516fa6 to 3560e44 Compare October 25, 2024 22:17
@kuchungmsft kuchungmsft changed the title Add Compiler Command Line Defines and Arguments Traits to Completions Prompt Support A/B Compiler Arguments Traits to Completions Prompt Oct 25, 2024
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from 3560e44 to e6721bd Compare October 25, 2024 22:25
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from e6721bd to c03a944 Compare October 25, 2024 23:14
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from c03a944 to 2d50ccb Compare October 28, 2024 20:43
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch 2 times, most recently from cf72c95 to f449793 Compare November 12, 2024 22:31
telemetryProperties["compilerArgumentCount"] = projectContext.result.fileContext.compilerArgs.length.toString();
telemetryProperties["filteredCompilerArgumentCount"] = filteredcompilerArguments.length.toString();
telemetryProperties["compilerUserDefinesRelavantCount"] = projectContext.result.fileContext.compilerUserDefinesRelavant.length.toString();
telemetryProperties["targetArcompilerOriginalUserDefineCounthitecture"] = projectContext.result.fileContext.compilerOriginalUserDefineCount.toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: compilerOriginalUserDefineCount

telemetryProperties["filteredCompilerArgumentCount"] = filteredcompilerArguments.length.toString();
telemetryProperties["compilerUserDefinesRelavantCount"] = projectContext.result.fileContext.compilerUserDefinesRelavant.length.toString();
telemetryProperties["targetArcompilerOriginalUserDefineCounthitecture"] = projectContext.result.fileContext.compilerOriginalUserDefineCount.toString();
telemetryProperties["targetArchmacroReferenceCountitecture"] = projectContext.result.fileContext.macroReferenceCount.toString();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: macroReferenceCount

@sean-mcmanus
Copy link
Contributor

@kuchungmsft FYI, you should have permissions now to create a branch in our repo instead of from a fork (you may not have had that at the time of this PR creation though).

@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch 2 times, most recently from bd47d76 to caa3897 Compare November 19, 2024 20:15
@kuchungmsft kuchungmsft marked this pull request as draft November 19, 2024 20:15
- Depends on cpptools' update to provide ProjectContextResult.
- Added the following new traits
  - intellisense: compiler information disclaimer.
  - intellisenseBegin: to note the begin of IntelliSense information.
  - compilerArguments: a list of compiler command arguments that could affect Copilot generating completions.
  - directAsks: direct asking Copilot to do something instead of providing an argument.
  - intellisenseEnd: to note the end of IntelliSense information.
- A/B Experimental flags
  - copilotcppTraits: boolean flag to enable cpp traits
  - copilotcppExcludeTraits: string array to exclude individual trait, i.e., compilerArguments.
  - copilotcppMsvcCompilerArgumentFilter: regex string to match compiler arguments for GCC.
  - copilotcppClangCompilerArgumentFilter: regex string to match compiler arguments for Clang.
  - copilotcppGccCompilerArgumentFilter: regex string to match compiler arguments for MSVC.
  - copilotcppCompilerArgumentDirectAskMap: a stringify map string to map arguments to direct ask statements.
- Depends on microsoft#12979 to merge first.
- copilotcppMacroReferenceFilter: regex string to filter macro reference for telemetry.
- Telemetry related to user defines and macro references.
- Added new trait compilerUserDefines to note the relevant user defines to the editing file.
@kuchungmsft kuchungmsft force-pushed the kuchung/ProvideCompilerDefinesArgumentsTrait branch from caa3897 to 2672a83 Compare November 19, 2024 23:45
@kuchungmsft kuchungmsft changed the title Support A/B Compiler Arguments Traits to Completions Prompt Support User Defines and Macro References AB Experiment Nov 19, 2024
@kuchungmsft kuchungmsft changed the base branch from main to kuchung/SupportCompilerArgumentAB November 19, 2024 23:47
@kuchungmsft kuchungmsft force-pushed the kuchung/SupportCompilerArgumentAB branch 3 times, most recently from 7a72866 to 4758e15 Compare November 22, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pull Request
Development

Successfully merging this pull request may close these issues.

5 participants