Giter VIP home page Giter VIP logo

Comments (14)

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024 1

FWIW There are a lot more things in C++20 and boost that fail in MSVC permissive mode. Permissive mode is deeply broken, but that is why there is strict mode and it is the default when using C++20. I was just starting with C++20 in MSVC so I didn't know. The errors make no sense to me but I have yet to find failures in strict mode.

from redis.

mzimbres avatar mzimbres commented on June 7, 2024

I am also testing with vs 2022 in the CI and it is passing, see

Can you provide me with the example you are trying to compile? Regarding BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT, there was a user having a problem with it, see #110

I have also made some changes in the place you are pointing to after the release, they are still on the develop. You can try using it as I described in #175 (comment)

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

Marcelo, the code I was trying to compile was pretty simple:

//#define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
#include "boost/redis/src.hpp"

I hadn't gotten any further (or I ifdef'ed the rest when this part failed).

Possibly relevant command line options are:

/ifcOutput ".\VS17.0\x64Release" /GS /W4 /Gy /Zc:wchar_t /I"....\esc\boost" /I"....\esc\openssl\include" /Z7 /Gm- /O2 /Ob1 /Fd".\VS17.0\x64Release" /Zc:inline /fp:precise /D "NDEBUG" /D "_CONSOLE" /D "WINNT" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /errorReport:prompt /GF /WX- /Zc:forScope /Gd /MT /std:c++20 /Fa".\VS17.0\x64Release" /EHsc /nologo /Fo".\VS17.0\x64Release" /diagnostics:column

I am generally using static libraries, as I have been successfully doing for quite some time, but this failure is compilation.

I am pulling down a freshest copy of boost includes to see if that makes a difference. I failed to fully follow your instructions on the pull. Retrying.

from redis.

mzimbres avatar mzimbres commented on June 7, 2024

I have merged two PR in the develop branch after Boost. 1.84 was out, one of them changed the connection constructor. Make sure you checkout the develop branch git submodule foreach --recursive git checkout develop as I linked you above.

Otherwise, please provide me with the exact details of the vs version you are using and I will check if it is not already being tested in CI and whether github actions supports it.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

I successfully transferred your changes.

No change in the errors.

Line 22 in connection.ipp where the error occurs was changed by your changes, but the first argument and the type of the first argument were not changed, which is what causes the error, only the second and third argument were changed.

Here is the version of my VS:

Microsoft Visual Studio Enterprise 2022
Version 17.8.3
VisualStudio.17.Release/17.8.3+34330.188
Microsoft .NET Framework
Version 4.8.09037

click to expand

Installed Version: Enterprise

Visual C++ 2022 00476-80000-00000-AA536
Microsoft Visual C++ 2022

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 17.8.358.6298
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.8.358.6298
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio 2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 17.8.358.6298
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter 17.0.23262.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Microsoft Azure Hive Query Language Service 2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio 2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Node.js Tools 1.5.50908.1 Commit Hash:c294679b821c4b8f7f9c6db3827b7655db80fc28
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager 6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Python - Profiling support 17.0.23262.1
Profiling support for Python projects.

Python with Pylance 17.0.23262.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Razor (ASP.NET Core) 17.8.3.2358002+8c7fb27bf8e8d4f9ff8080b624b35bca5e812e97
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.8.119.0
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android) 15.0.34205.153
Visual C++ for Cross Platform Mobile Development (Android)

Visual F# Tools 17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

I might be able to run the CI tests on my version of VS, but I first need to study the tests so I understand how and what it means if they pass or fail.

I can also try compiling src.hpp on VS version 19 to see if that works.

from redis.

mzimbres avatar mzimbres commented on June 7, 2024

I might be able to run the CI tests on my version of VS, but I first need to study the tests so I understand how and what it means if they pass or fail.

IIUC, we must first understand why you cannot build, running the tests are not necessary.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

I thought I had tested C++17 mode before, but I just retested.

Now when I flip the standard to C++17 instead of C++20, it compiles src.hpp . I flip back to C++20 and it stops compiling with the stated error. (That would mean no co routines).

[I added clickable expansions to some of the lengthy details above to make it more readable.]

Let me know if there is more required from me in reproducing this issue.

from redis.

mzimbres avatar mzimbres commented on June 7, 2024

Hi, are you using cmake? Can you copy here the exact command you are using to generate the cmake files? I had a look in the CI and the tools you are using a covered, for example

** Visual Studio 2022 Developer Command Prompt v17.8.3

###
### Using 'vc143' toolset.
###

I don't see what can be causing your issue.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

I am not using cmake. I downloaded the prebuilt Windows binaries, and added the boost include path to the include path of the project in question, at which point it fails if I have the language set to C++20, but not if I have the language set to C++17. It never gets close to linking when it fails. It fails during compilation due including src.hpp, the only thing being compiled.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

boostissue.zip
If you unzip this file it creates the directory boostissue which has boostredisfailure that contains Visual Studio 2022 solution/project and a single source file that #include's "boost/redis/src.hpp".

If you check out the latest version of boost into a boost directory in the boostissue directory, the rest of the dependencies are satisfied. I added the individual paths under libs to the include path until they were all satisfied, as well as the include directory of openssl.

If you compile this, as-is, you get the compiler error I reported above and one other I never saw before.

If you change the compiler to c++17 instead of c++20, then you see link errors, which is success because it means that the compilations succeeded and I didn't provide libraries to link against.

The error also seems to go away if you put it in non-permissive mode, which is an impossibility for large projects without many thousands of difficult fixes. I guess I will look at the option of compiling different files with different switches.

from redis.

RayDavidWhitmer avatar RayDavidWhitmer commented on June 7, 2024

Thanks.

I suppose this should be an issue for Microsoft, why are (incorrect?) errors raised when setting permissive mode, which should create fewer errors, not more. Unfortunately our experience with Microsoft Support is that it is generally not usable.

Now that I have provided the simple reproduction, I can understand if no one outside Microsoft chooses to do anything about this compilation failure. At the moment I have the work-around that I can set the one or multiple files in the project that call redis into strict/non-permissive mode which is good enough for now until we can migrate to a better platform.

from redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.