ned14 / pcpp

A C99 preprocessor written in pure Python
Other
215 stars 39 forks source link

error : Could not evaluate expression due to SyntaxError("around token '<' type CPP_LESS") (passed to evaluator: '!__has_include(<variant>)') #56

Closed QuellaZhang closed 3 years ago

QuellaZhang commented 3 years ago

Hi All,

Outcome build failed on MSVC, this issue can be reproduced on latest version https://github.com/ned14/outcome/commit/a853fc09bb9590204a33c62bd3fd32f9b212c69f on VS2019 16.7.6, can you help look?

repro steps:

  1. git clone --recursive https://github.com/ned14/outcome.git Outcome
  2. mkdir outcome\build_amd64 && cd outcome\build_amd64
  3. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 .. > cmake.log
  4. set CL=/D_HAS_DEPRECATED_IS_LITERAL_TYPE=1 /D_SILENCE_CXX17_IS_LITERAL_TYPE_DEPRECATION_WARNING /Zc:externC-
  5. msbuild /m /p:Platform=x64 /p:Configuration=Release ALL_BUILD.vcxproj /t:Rebuild > build.log

Build.log: build.log

Error info: "F:\gitP\ned14\outcome\build_amd64\outcome_hl-pp-experimental.vcxproj" (default target) (22:117) -> include/outcome/config.hpp : 128 error : Could not evaluate expression due to SyntaxError("around token '<' type CPP_LESS") (passed to evaluator: '!has_include()') [F:\gitP\ned14\outcome\build_amd64\outcome_hl-pp-experimental.vcxproj] include/outcome/config.hpp : 288 error : Could not evaluate expression due to SyntaxError("around token '<' type CPP_LESS") (passed to evaluator: 'has_include()') [F:\gitP\ned14\outcome\build_amd64\outcome_hl-pp-experimental.vcxproj] include/outcome/experimental/status_result.hpp : 52 error : Could not evaluate expression due to SyntaxError("around token '/ Do NOT enable weakened implicit construction for these types/' type CPP_COMMENT1") (passed to evaluator: '0 / Do NOT enable weakened implicit construction for these types/') [F:\gitP\ned14\outcome\build_amd64\outcome_hl-pp-experimental.vcxproj]

ned14 commented 3 years ago

This should have been fixed since. Can you confirm?

QuellaZhang commented 3 years ago

Thanks for the quick fix, verified that the following error can still be reproduced.

F:\gitP\ned14\outcome\build_amd64>C:\Python\Python37\python.exe F:/gitP/ned14/outcome/build_amd64/quickcpplib/repo/cmakelib/../pcpp/pcpp/pcmd.py -o F:/gitP/ned14/outcome/single-header/outcome-experimental.hpp F:/gitP/ned14/outcome/include/outcome/experimental/status_outcome.hpp F:/gitP/ned14/outcome/include/outcome/try.hpp -I ../quickcpplib/include --passthru-defines --passthru-unfound-includes --passthru-unknown-exprs --passthru-comments --line-directive --compress -U QUICKCPPLIB_ENABLE_VALGRIND -U DOXYGEN_SHOULD_SKIP_THIS -U DOXYGEN_IS_IN_THE_HOUSE -U STANDARDESE_IS_IN_THE_HOUSE F:\gitP\ned14\outcome\include\outcome\experimental\status_result.hpp:52 error: Could not evaluate expression due to SyntaxError("around token '// Do NOT enable weakened implicit construction for these types' type CPP_COMMENT2") (passed to evaluator: '0 // Do NOT enable weakened implicit construction for these types')

ned14 commented 3 years ago

Confirmed. Relocating to the pcpp issue tracker, as the cause is there.

ned14 commented 3 years ago

This should now be fixed completely. Thanks for the BR!