Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/client-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ runs:
if: runner.os == 'Windows'
shell: bash
env:
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was because of a change in the github runner image.

OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL'
BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1
- uses: ./.github/actions/ci
env:
OPENSSL_ROOT_DIR: ${{ env.OPENSSL_ROOT_DIR }}
OPENSSL_ROOT_DIR: 'C:\Program Files\OpenSSL'
BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
with:
Expand Down
4 changes: 3 additions & 1 deletion libs/common/include/launchdarkly/attributes_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class AttributesBuilder final {
AttributesBuilder& operator=(AttributesBuilder const&) = delete;
AttributesBuilder& operator=(AttributesBuilder&&) = delete;

AttributesBuilder(AttributesBuilder&& builder) noexcept = default;
// This cannot be noexcept because of:
// https://developercommunity.visualstudio.com/t/bug-in-stdmapstdpair-implementation-with-move-only/840554
AttributesBuilder(AttributesBuilder&& builder) = default;
~AttributesBuilder() = default;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <string>

/**
* Interface for a data store that holds feature flag data and other SDK
* properties in a serialized form.
Expand Down
8 changes: 5 additions & 3 deletions libs/common/include/launchdarkly/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,11 @@ class Value final {
enum Type type_;

// Empty constants used when accessing the wrong type.
inline static const std::string empty_string_;
inline static const Array empty_vector_;
inline static const Object empty_map_;
// These are not inline static const because of this bug:
// https://developercommunity.visualstudio.com/t/inline-static-destructors-are-called-multiple-time/1157794
static const std::string empty_string_;
static const Array empty_vector_;
static const Object empty_map_;
static const Value null_value_;
};

Expand Down
8 changes: 7 additions & 1 deletion libs/common/src/config/app_info_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ tl::expected<std::string, Error> AppInfoBuilder::Tag::Build() const {
}

bool ValidChar(char c) {
return std::isalnum(c) != 0 || c == '-' || c == '.' || c == '_';
if(c > 0 && c < 255) {
// The MSVC implementation of isalnum will assert if the number it outside
// its lookup table.
// iswalnum would not, but is less restrictive than desired.
return std::isalnum(c) != 0 || c == '-' || c == '.' || c == '_';
}
return false;
}

std::optional<Error> IsValidTag(std::string const& key,
Expand Down
3 changes: 3 additions & 0 deletions libs/common/src/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

namespace launchdarkly {

const std::string Value::empty_string_;
const Value::Array Value::empty_vector_;
const Value::Object Value::empty_map_;
const Value Value::null_value_;

Value::Value() : type_(Value::Type::kNull), storage_{0.0} {}
Expand Down