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

msCompile problem matcher does not match note: lines which are important for context #210560

Open
bradphelan opened this issue Apr 17, 2024 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues

Comments

@bradphelan
Copy link

Type: Bug

If the following c++ compile output is generated

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(145): error C2672: 'std::construct_at': no matching overloaded function found
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2006): note: see reference to function template instantiation 'void std::_Construct_in_place<_Ty,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(_Ty &,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &) noexcept(false)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2725): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\memory(2726): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
        with
        [
            _Ty=mw::Rotary::SlicerResult
        ]
D:\\checkouts\\moduleworks\\worktrees\\wt2\\dev\\libraries\\ToolpathStrategies\\Rotary\\src\\Slicer.cpp(134): note: see reference to function template instantiation 'std::shared_ptr<mw::Rotary::SlicerResult> std::make_shared<mw::Rotary::SlicerResult,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(145): error C2783: '_Ty *std::construct_at(_Ty *const ,_Types &&...) noexcept(<expr>)': could not deduce template argument for '<unnamed-symbol>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(134): note: see declaration of 'std::construct_at'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\xutility(149): error C2661: 'mw::Rotary::SlicerResult::SlicerResult': no overloaded function takes 2 arguments     
[4/87] Building CXX object libraries\ToolpathStrategies\Rotary\CMakeFiles\Rotary.dir\src\ConfigFactory.cpp.obj
FAILED: libraries/ToolpathStrategies/Rotary/CMakeFiles/Rotary.dir/src/ConfigFactory.cpp.obj

only

[{
	"resource": "/c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include/xutility",
	"owner": "msCompile",
	"code": "C2783",
	"severity": 8,
	"message": "'_Ty *std::construct_at(_Ty *const ,_Types &&...) noexcept(<expr>)': could not deduce template argument for '<unnamed-symbol>'",
	"source": "cpp",
	"startLineNumber": 145,
	"startColumn": 1,
	"endLineNumber": 145,
	"endColumn": 2147483647
},{
	"resource": "/c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/include/xutility",
	"owner": "msCompile",
	"code": "C2672",
	"severity": 8,
	"message": "'std::construct_at': no matching overloaded function found",
	"source": "cpp",
	"startLineNumber": 145,
	"startColumn": 1,
	"endLineNumber": 145,
	"endColumn": 2147483647
}]

is returned to the problems window. However the critical context of the error is

D:\\checkouts\\moduleworks\\worktrees\\wt2\\dev\\libraries\\ToolpathStrategies\\Rotary\\src\\Slicer.cpp(134): note: see reference to function template instantiation 'std::shared_ptr<mw::Rotary::SlicerResult> std::make_shared<mw::Rotary::SlicerResult,const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>>,const mw::Rotary::ConeLayer::CPtr&>(const std::vector<mw::Rotary::LayerLoopWrapped2D,std::allocator<mw::Rotary::LayerLoopWrapped2D>> &&,const mw::Rotary::ConeLayer::CPtr &)' being compiled

which is where the true error occurs. The problem matcher should match note: tags as well to collect this

VS Code version: Code 1.87.2 (863d258, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 5900X 12-Core Processor (24 x 3700)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.93GB (43.09GB free)
Process Argv ..\dev\ --crash-reporter-id 8e0f3da2-bd7f-4547-b593-29b86ad0a63e
Screen Reader no
VM 0%
Extensions (57)
Extension Author (truncated) Version
Bookmarks ale 13.5.0
vite ant 0.2.5
ast-grep-vscode ast 0.0.9
vscode-django bat 1.14.0
doxdocgen csc 1.4.0
vscode-eslint dba 2.4.2
python-environment-manager don 1.2.4
python-extension-pack don 1.7.0
gitlens eam 14.4.0
vscode-npm-script eg2 0.3.29
prettier-vscode esb 10.1.0
dotnet-test-explorer for 0.7.8
copilot Git 1.177.0
copilot-chat Git 0.13.1
vscode-test-explorer hbe 2.21.1
debug-visualizer hed 2.4.0
better-cpp-syntax jef 1.17.2
vsc-python-indent Kev 1.18.0
vscode-docker ms- 1.29.0
csharp ms- 2.7.25
vscode-dotnet-runtime ms- 1.8.1
isort ms- 2023.10.1
python ms- 2023.22.1
vscode-pylance ms- 2023.11.10
jupyter ms- 2023.9.1102792234
jupyter-keymap ms- 1.1.2
remote-containers ms- 0.338.1
remote-ssh ms- 0.106.5
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.8
vscode-remote-extensionpack ms- 0.24.0
cmake-tools ms- 1.17.17
cpptools ms- 1.20.1
cpptools-extension-pack ms- 1.3.0
makefile-tools ms- 0.7.0
powershell ms- 2023.8.0
remote-explorer ms- 0.4.1
remote-server ms- 1.4.3
test-adapter-converter ms- 0.1.8
vscode-speech ms- 0.6.0
vsliveshare ms- 1.0.5905
autodocstring njp 0.6.1
parse-tree pok 0.28.1
svelte-extractor pro 0.0.3
vscode-xml red 0.26.1
code-spell-checker str 3.0.1
svelte-vscode sve 108.2.2
textual-syntax-highlighter Tex 1.1.0
msbuild-project-tools tin 0.4.9
cmake twx 0.0.17
vscode-lldb vad 1.10.0
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
vim vsc 1.26.2
debug web 0.26.1
jinja who 0.0.8
markdown-all-in-one yzh 3.6.2

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
jchc7451:30973076
gee8j676:31009558
dsvsc021:30996838
9c06g630:31013171

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@bradphelan
Copy link
Author

I updated to 1.88.1 and the issue remains

@meganrogge
Copy link
Contributor

pls create an issue for the c++ extension

@bradphelan
Copy link
Author

Hi @meganrogge If you are going to close an issue and suggest migrating it then please provide the link to the project you think it should be migrated to and if there is an automatic way to do the migration suggest how to do that. I created the issue using the automatic interface via vscode that was suggested. However I think you will find that the problem exists in the core project not in some extension.

regexp: /^(?:\s*\d+>)?(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+((?:fatal +)?error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/,

The mscompile problem matcher is defined in this repo. It may well also be defined in other extension projects but some coordination looks to be required.

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Apr 17, 2024
@meganrogge meganrogge reopened this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues
Projects
None yet
Development

No branches or pull requests

3 participants