You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2019/12/16 13:00:00 UTC
[jira] [Commented] (ARROW-7401) [Dev] "archery lint" outputs
unapplicable patch file
[ https://issues.apache.org/jira/browse/ARROW-7401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997261#comment-16997261 ]
Antoine Pitrou commented on ARROW-7401:
---------------------------------------
It seems there is an obscure incantation to work around the issue:
https://unix.stackexchange.com/questions/167216/how-can-i-apply-a-p0-patch-from-any-working-directory
> [Dev] "archery lint" outputs unapplicable patch file
> ----------------------------------------------------
>
> Key: ARROW-7401
> URL: https://issues.apache.org/jira/browse/ARROW-7401
> Project: Apache Arrow
> Issue Type: Bug
> Components: Developer Tools
> Reporter: Antoine Pitrou
> Priority: Major
>
> {code}
> INFO:archery:Running r linter
> /home/antoine/arrow/dev/r/src/py-to-r.cpp had clang-format style issues
> --- /home/antoine/arrow/dev/r/src/py-to-r.cpp
> +++ /home/antoine/arrow/dev/r/src/py-to-r.cpp (after clang format)
> @@ -21,16 +21,15 @@
>
> // [[arrow::export]]
> std::shared_ptr<arrow::Array> ImportArray(uintptr_t array, uintptr_t schema) {
> - return VALUE_OR_STOP(arrow::ImportArray(
> - reinterpret_cast<struct ArrowArray*>(array),
> - reinterpret_cast<struct ArrowSchema*>(schema)));
> + return VALUE_OR_STOP(arrow::ImportArray(reinterpret_cast<struct ArrowArray*>(array),
> + reinterpret_cast<struct ArrowSchema*>(schema)));
> }
>
> // [[arrow::export]]
> std::shared_ptr<arrow::RecordBatch> ImportRecordBatch(uintptr_t array, uintptr_t schema) {
> - return VALUE_OR_STOP(arrow::ImportRecordBatch(
> - reinterpret_cast<struct ArrowArray*>(array),
> - reinterpret_cast<struct ArrowSchema*>(schema)));
> + return VALUE_OR_STOP(
> + arrow::ImportRecordBatch(reinterpret_cast<struct ArrowArray*>(array),
> + reinterpret_cast<struct ArrowSchema*>(schema)));
> }
>
> // [[arrow::export]]
> @@ -56,23 +55,22 @@
>
> // [[arrow::export]]
> void ExportSchema(const std::shared_ptr<arrow::Schema>& schema, uintptr_t ptr) {
> - STOP_IF_NOT_OK(arrow::ExportSchema(*schema, reinterpret_cast<struct ArrowSchema*>(ptr)));
> + STOP_IF_NOT_OK(
> + arrow::ExportSchema(*schema, reinterpret_cast<struct ArrowSchema*>(ptr)));
> }
>
> // [[arrow::export]]
> void ExportArray(const std::shared_ptr<arrow::Array>& array, uintptr_t ptr,
> uintptr_t schema_ptr) {
> - STOP_IF_NOT_OK(arrow::ExportArray(*array,
> - reinterpret_cast<struct ArrowArray*>(ptr),
> + STOP_IF_NOT_OK(arrow::ExportArray(*array, reinterpret_cast<struct ArrowArray*>(ptr),
> reinterpret_cast<struct ArrowSchema*>(schema_ptr)));
> }
>
> // [[arrow::export]]
> -void ExportRecordBatch(const std::shared_ptr<arrow::RecordBatch>& batch,
> - uintptr_t ptr, uintptr_t schema_ptr) {
> +void ExportRecordBatch(const std::shared_ptr<arrow::RecordBatch>& batch, uintptr_t ptr,
> + uintptr_t schema_ptr) {
> STOP_IF_NOT_OK(
> - arrow::ExportRecordBatch(*batch,
> - reinterpret_cast<struct ArrowArray*>(ptr),
> + arrow::ExportRecordBatch(*batch, reinterpret_cast<struct ArrowArray*>(ptr),
> reinterpret_cast<struct ArrowSchema*>(schema_ptr)));
> }
>
> {code}
> If I try to apply the patch file using {{patch -p0}}:
> {code}
> Ignoring potentially dangerous file name /home/antoine/arrow/dev/r/src/py-to-r.cpp
> can't find file to patch at input line 3
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |--- /home/antoine/arrow/dev/r/src/py-to-r.cpp
> |+++ /home/antoine/arrow/dev/r/src/py-to-r.cpp (after clang format)
> --------------------------
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)