-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 Compiler Argument Trait AB Experiment #12979
Conversation
kuchungmsft
commented
Nov 19, 2024
•
edited
Loading
edited
- Depends on cpptools' update to provide ProjectContextResult.
- Send "standardVersion" trait in completion prompt by default.
- Added the following new traits
- intelliSenseDisclaimer: compiler information disclaimer.
- intelliSenseDisclaimerBeginning: to note the beginning 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.
- intelliSenseDisclaimerEnd: to note the end of IntelliSense information.
- A/B Experimental flags
- copilotcppTraits: deprecated, no longer used.
- copilotcppExcludeTraits:: deprecated, no longer used.
- copilotcppIncludeTraits: string array to include individual trait, i.e., compilerArguments.
- copilotcppMsvcCompilerArgumentFilter: map of regex string to absence prompt for MSVC.
- copilotcppClangCompilerArgumentFilter: map of regex string to absence prompt for Clang.
- copilotcppGccCompilerArgumentFilter: map of regex string to absence prompt for GCC.
- copilotcppCompilerArgumentDirectAskMap: map of argument to prompt.
- 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.
92e251b
to
ce1c8fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving, but I haven't been able to test it out and you should probably get another approver.
Pulling this down to test locally now and then I expect to be able to sign off. |
ce1c8fe
to
7a72866
Compare
7a72866
to
4758e15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments, but I don't know if they need to be addressed or not.
@benmcmorran Were you done reviewing? I wanted to get this in on Monday. |
@sean-mcmanus Yes, changes look good to me. |
@sean-mcmanus I need to make some changes for the following requirements.
|
@kuchungmsft I don't understand -- exception handling is enabled by default with MSVC (/EHsc is the default). |
If you don't specify any /EH arguments, it's disabled, see the following. |
Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts
Outdated
Show resolved
Hide resolved
Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts
Outdated
Show resolved
Hide resolved
a1261e5
to
50c3e58
Compare
50c3e58
to
c949ac6
Compare
Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts
Outdated
Show resolved
Hide resolved
Extension/test/scenarios/SingleRootProject/tests/lmTool.test.ts
Outdated
Show resolved
Hide resolved
@kuchungmsft FYI, clang-cl.exe isn't correctly handled -- the compiler is reported as Clang, but the args it excepts are normally msvc args like Oh....but we're not even telling Copilot that clang-cl is being used...hmm...? |
We can have regex strings to filter "/GR-", "-GR-", "-fno-rtti" for Clang compiler and map those arguments to prompt text like "Do not use dynamic_cast". We'll AB with prompt text first without raw argument values. |
73d1d73
to
1182714
Compare
- Depends on cpptools' update to provide ProjectContextResult. - Send "standardVersion" trait in completion prompt by default. - Added the following new traits - intelliSenseDisclaimer: compiler information disclaimer. - intelliSenseDisclaimerBeginning: to note the beginning 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. - intelliSenseDisclaimerEnd: to note the end of IntelliSense information. - A/B Experimental flags - copilotcppTraits: deprecated, no longer used. - copilotcppExcludeTraits:: deprecated, no longer used. - copilotcppIncludeTraits: string array to include individual trait, i.e., compilerArguments. - copilotcppMsvcCompilerArgumentFilter: map of regex string to absence prompt for MSVC. - copilotcppClangCompilerArgumentFilter: map of regex string to absence prompt for Clang. - copilotcppGccCompilerArgumentFilter: map of regex string to absence prompt for GCC. - copilotcppCompilerArgumentDirectAskMap: map of argument to prompt.
1182714
to
42cd504
Compare