Skip to content

Commit

Permalink
Update grpc version (#1140)
Browse files Browse the repository at this point in the history
* Update grpc version

* Update grpc version

* Add include optional
  • Loading branch information
sacckey authored Sep 25, 2022
1 parent 1a120f7 commit 6e7c327
Show file tree
Hide file tree
Showing 30 changed files with 36 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y \

# install gRPC
RUN cd / && \
git clone --recurse-submodules -b v1.39.0 https://github.com/grpc/grpc && \
git clone --recurse-submodules -b v1.49.1 https://github.com/grpc/grpc && \
cd grpc && \
mkdir -p cmake/build && \
cd cmake/build && \
Expand Down Expand Up @@ -51,4 +51,3 @@ RUN cd /tmp && \
make install && \
ldconfig && \
rm -rf /tmp/googletest

1 change: 1 addition & 0 deletions include/mjx/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <google/protobuf/util/message_differencer.h>

#include <utility>
#include <optional>

#include "mjx/internal/action.h"

Expand Down
1 change: 1 addition & 0 deletions include/mjx/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MJX_PROJECT_ACTION_H

#include "mjx/internal/mjx.grpc.pb.h"
#include <optional>

namespace mjx {
class Action {
Expand Down
2 changes: 1 addition & 1 deletion include/mjx/cmake/downloaded_grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set(FETCHCONTENT_UPDATES_DISCONNECTED ON)
fetchcontent_declare(
grpc
GIT_REPOSITORY https://github.com/grpc/grpc.git
GIT_TAG v1.39.0
GIT_TAG v1.49.1
GIT_PROGRESS TRUE
)
fetchcontent_makeavailable(grpc)
Expand Down
1 change: 1 addition & 0 deletions include/mjx/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <filesystem>
#include <fstream>
#include <utility>
#include <optional>

namespace mjx {

Expand Down
1 change: 1 addition & 0 deletions include/mjx/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "mjx/observation.h"
#include "mjx/seed_generator.h"
#include "mjx/state.h"
#include <optional>

#ifndef MJX_PROJECT_ENV_H
#define MJX_PROJECT_ENV_H
Expand Down
1 change: 1 addition & 0 deletions include/mjx/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <google/protobuf/util/message_differencer.h>

#include <utility>
#include <optional>

#include "mjx/internal/event.h"

Expand Down
1 change: 1 addition & 0 deletions include/mjx/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define MJX_PROJECT_EVENT_H

#include "mjx/internal/mjx.grpc.pb.h"
#include <optional>

namespace mjx {
class Event {
Expand Down
2 changes: 2 additions & 0 deletions include/mjx/internal/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "mjx/internal/mjx.grpc.pb.h"
#include "mjx/internal/utils.h"

#include <optional>

namespace mjx::internal {
mjxproto::Action Action::CreateDiscard(AbsolutePos who, Tile discard,
std::string game_id) {
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <memory>
#include <utility>
#include <optional>

#include "mjx/internal/mjx.pb.h"
#include "mjx/internal/open.h"
Expand Down
2 changes: 2 additions & 0 deletions include/mjx/internal/game_result_summarizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace mjx::internal {
std::recursive_mutex GameResultSummarizer::mtx_;

#include <optional>

int GameResultSummarizer::num_games() const { return num_games_; }

void GameResultSummarizer::Initialize() {
Expand Down
2 changes: 2 additions & 0 deletions include/mjx/internal/game_result_summarizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "mjx/internal/state.h"

#include <optional>

namespace mjx::internal {
class GameResultSummarizer {
public:
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/hand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <numeric>
#include <unordered_map>
#include <utility>
#include <optional>

#include "mjx/internal/open.h"
#include "mjx/internal/utils.h"
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/hand.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <optional>

#include "mjx/internal/open.h"
#include "mjx/internal/tile.h"
Expand Down
2 changes: 2 additions & 0 deletions include/mjx/internal/observation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "mjx/internal/utils.h"
#include "mjx/internal/yaku_evaluator.h"

#include <optional>

namespace mjx::internal {
Observation::Observation(const mjxproto::Observation &proto) : proto_(proto) {}

Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/observation.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <array>
#include <utility>
#include <optional>

#include "mjx/internal/action.h"
#include "mjx/internal/hand.h"
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <google/protobuf/util/message_differencer.h>

#include "mjx/internal/utils.h"
#include <optional>

namespace mjx::internal {
State::State(State::ScoreInfo score_info)
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <string>
#include <utility>
#include <vector>
#include <optional>

#include "mjx/internal/action.h"
#include "mjx/internal/consts.h"
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/win_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <unordered_set>
#include <utility>
#include <vector>
#include <optional>

#include "mjx/internal/open.h"
#include "mjx/internal/tile.h"
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/win_score.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "mjx/internal/win_score.h"

#include <utility>
#include <optional>

#include "mjx/internal/types.h"

Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/win_score.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <array>
#include <map>
#include <utility>
#include <optional>

#include "mjx/internal/types.h"

Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/yaku_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <cassert>
#include <tuple>
#include <vector>
#include <optional>

#include "mjx/internal/types.h"
#include "mjx/internal/utils.h"
Expand Down
1 change: 1 addition & 0 deletions include/mjx/internal/yaku_evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <tuple>
#include <unordered_set>
#include <vector>
#include <optional>

#include "mjx/internal/types.h"
#include "mjx/internal/win_cache.h"
Expand Down
2 changes: 2 additions & 0 deletions mjx/pybind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <optional>

namespace py = pybind11;

// [references]
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
grpcio-tools==1.39.0
grpcio-tools==1.49.1
pytest
black
blackdoc
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
google==3.0.0
protobuf==3.17.3
grpcio==1.39.0
grpcio==1.49.1
numpy
pillow
svgwrite
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def build_extension(self, ext):
install_requires=[
"google==3.0.0",
"protobuf==3.17.3",
"grpcio==1.39.0",
"grpcio==1.49.1",
"numpy",
"pillow",
"svgwrite",
Expand Down
1 change: 1 addition & 0 deletions tests_cpp/internal_hand_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <mjx/internal/tile.h>

#include <array>
#include <optional>

#include "gtest/gtest.h"

Expand Down
1 change: 1 addition & 0 deletions tests_cpp/internal_win_score_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <mjx/internal/win_score.h>

#include "gtest/gtest.h"
#include <optional>

using namespace mjx::internal;

Expand Down
2 changes: 2 additions & 0 deletions tests_cpp/internal_yaku_evaluator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "gtest/gtest.h"

#include <optional>

using namespace mjx::internal;

class YakuTest : public ::testing::Test {
Expand Down

0 comments on commit 6e7c327

Please sign in to comment.