-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(c++): using C++17's nested namespaces #489
fix(c++): using C++17's nested namespaces #489
Conversation
Initial modifications to feat(c++): Use C++17's nested namespaces apache#473 completed, involving content of anonymous namespace and content in result.hpp not changed yet
fix: Corrected minor errors in uri_parser.h
I seem to be ignoring some of the call logic for nested namespaces and I'll fix it myself |
Hi @ywh555hhh, thanks for the work, the CI indicate that the code format check is failed. Please follow the incubator-graphar/.github/workflows/ci.yml Lines 82 to 83 in 87d5eeb
to install clang-format 8.0 and fix the format with
|
@@ -89,7 +89,7 @@ struct Uri { | |||
{} | |||
}; | |||
|
|||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we better to keep the thirdparty code as their origin, not to modify them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
received
I encountered an error when trying to open a project in a container using vscode's remote container plug-in. How can I solve it? Error response from daemon: pull access denied for registry.cn-hongkong.aliyuncs.com/graphscope/graphar-dev, repository does not exist or may require 'docker login': denied: requested access to the resource is denied |
It seems that the image has been expired, I have re-pushed it, can you try again? |
info2.txt |
Hi, @ywh555hhh, the image has been updated, could you rebase the main and try again? sorry for the obstruction. |
I'm happy to contribute to the community, but I also want to know how to solve the formatting problem. If I can't use docker right now, it means I need to fix the problem on macOS |
the clang-format-8 is also available for macos:
or you can edit the code directly and fix the format base on the information provided by CI: |
cpp/src/edges_builder.cc
Outdated
@@ -349,5 +348,4 @@ Result<std::shared_ptr<arrow::Table>> EdgesBuilder::getOffsetTable( | |||
return arrow::Table::Make(schema, arrays); | |||
} | |||
|
|||
} // namespace builder | |||
} // namespace graphar | |||
} // namespace graphar::builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
It's better not to delete the empty line in the end of the source file. FYI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that you have changed the permission of cpp/misc/cpplint.py
, is there a reason to change this?
I had no intention of doing that. Could this have been some kind of operational error that I wasn't aware of. Sorry |
It would make the CI failed. see You can revert it to the original commit with git |
Thanks for the Pointers. I really appreciate you taking the time to mentor me |
You are welcome. We are pleased to have your contribution. |
I'll give clang-format-8 a try |
The version of clang-format I used was wrong and I will try to install the required version myself |
This reverts commit c215171.
yiweihan@yiweihandeMacBook-Air cpp % clang-format --version
clang-format version 8.0.1 (tags/RELEASE_801/final)
yiweihan@yiweihandeMacBook-Air cpp % make clformat
make: *** No rule to make target `clformat'. Stop.
yiweihan@yiweihandeMacBook-Air cpp %
I have successfully installed clang-format but I can't run the clformat command. What is the problem? And the cpp folder that I noticed contains the.clang-format file, which says the format standard |
the command
is run in the build directory if you create a build dir |
Did I misunderstand something? I don't even seem to be looking for the Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, and there have some nits to be fixed
namespace graphar { | ||
|
||
namespace util { | ||
namespace graphar::util { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add an empty line before namespace for code clarity
|
||
namespace graphar { | ||
namespace builder { | ||
namespace graphar::builder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add an empty line before namespace for code clarity
namespace graphar { | ||
namespace ds = arrow::dataset; | ||
namespace detail { | ||
namespace graphar::detail { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here need empty line between header include and implementation
@@ -79,7 +76,9 @@ static Status CastToLargeOffsetArray( | |||
GAR_RETURN_ON_ARROW_ERROR_AND_ASSIGN(out, arrow::ChunkedArray::Make(chunks)); | |||
return Status::OK(); | |||
} | |||
} // namespace detail | |||
} // namespace graphar::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add empty line here for code clarify
you need to run |
tks I've tried it. Can this be merged now? |
ok👌🏻 |
Initial modifications to feat(c++): Use C++17's nested namespaces apache#473 completed, involving content of anonymous namespace and content in result.hpp not changed yet Reason for this PR to slove the issue apache#473 What changes are included in this PR? Most cpp folders need to use cpp17 nested loops Are these changes tested? No local tests Are there any user-facing changes? no
Initial modifications to feat(c++): Use C++17's nested namespaces #473 completed, involving content of anonymous namespace and content in result.hpp not changed yet
Reason for this PR
to slove the issue #473
What changes are included in this PR?
Most cpp folders need to use cpp17 nested loops
Are these changes tested?
No local tests
Are there any user-facing changes?
no