diff --git a/.github/workflows/ci-conan-msvc.yml b/.github/workflows/ci-conan-msvc.yml index 68ad381..43ce0fa 100755 --- a/.github/workflows/ci-conan-msvc.yml +++ b/.github/workflows/ci-conan-msvc.yml @@ -19,7 +19,7 @@ jobs: version: [cci.20230615] build_type: [Debug, Release] profile: [msvc17] - compiler_version: [191, 192, 193] + compiler_version: [192, 193] channel: ["${{ (github.head_ref || github.ref_name) == 'master' && 'stable' || 'testing' }}"] steps: - uses: actions/checkout@v4 diff --git a/conanfile.py b/conanfile.py index f30c1c6..d319311 100644 --- a/conanfile.py +++ b/conanfile.py @@ -37,8 +37,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "Visual Studio": "15.7", - "msvc": "14.1", + "msvc": "14.2", "gcc": "7", "clang": "6", "apple-clang": "10", diff --git a/test_package/test_package.cpp b/test_package/test_package.cpp index 3e21df0..995ce61 100644 --- a/test_package/test_package.cpp +++ b/test_package/test_package.cpp @@ -8,9 +8,18 @@ using namespace eprosima::xtypes; int main() { + try { std::string idl_spec = "struct InnerType { uint32 im1; float im2; };"; - idl::Context context = idl::parse(idl_spec); + idl::Context context; + context.print_log(true); + context.preprocess = false; // Preprocessor requires build environment with access to cl, not needed here + context.log_level(eprosima::xtypes::idl::log::LogLevel::xDEBUG); + + context = idl::parse(idl_spec, context); + + if(!context.success) { throw std::runtime_error("Unable to parse idl spec"); } + StructType inner = context.module().structure("InnerType"); StructType outer("OuterType"); @@ -24,12 +33,12 @@ int main() submod_b.structure(inner); /* - root - \_a - | \_ a _ OuterType - | - \_b _ InnerType - */ + root + \_a + | \_ a _ OuterType + | + \_b _ InnerType + */ std::cout << std::boolalpha; std::cout << "Does a::a::OuterType exists?: " << root.has_structure("a::a::OuterType") << std::endl; @@ -46,6 +55,10 @@ int main() DynamicData inner_data(root.structure(scope_inner_type)); inner_data["im1"] = 32u; inner_data["im2"] = 3.14159265f; + } catch (const std::runtime_error& err) { + std::cerr << "Caught exception: " << err.what() << std::endl; + return EXIT_FAILURE; + } - return EXIT_SUCCESS; + return EXIT_SUCCESS; }