You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/28 00:18:28 UTC

[GitHub] [arrow] anjakefala opened a new pull request, #14260: ARROW-17753: [Python] document cleaning for fixing build environment issues

anjakefala opened a new pull request, #14260:
URL: https://github.com/apache/arrow/pull/14260

   ![Screenshot from 2022-09-27 17-18-05](https://user-images.githubusercontent.com/7489659/192659718-b4f77e41-8b00-48f3-bc1b-cfdaa36e31da.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r982101900


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build

Review Comment:
   @anjakefala to clarify: in practice it doesn't matter how many spaces you are using here (the above also works perfectly fine), but the rest of this file is consistently using 3 spaces for the initial indentation in code blocks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r982104392


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .
+
+If using a Conda environment, there are some build artifacts that get installed in
+``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``.

Review Comment:
   I think it is useful to mention this at least that you can clean manually, as is done right now. The last weeks I had to remove the cmake files several times (also from switching between (older) branches); if I would have created a new conda env each time, that would have become annoying.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] anjakefala commented on pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
anjakefala commented on PR #14260:
URL: https://github.com/apache/arrow/pull/14260#issuecomment-1261479340

   Good to know about the `setup.py clean`! I removed it. It was the first cleaning step I learned, which was why it was part of my process. =)
   
   I also clarified the conda env files can be manually removed, but did not extensively list all of them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r982114159


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean

Review Comment:
   Now you mention to use both `python setup.py clean` and `git clean -Xfd .` from within the python directory. I think only mentioning the git way is sufficient? 
   Higher up in this file, we also only mention git clean (this was changed from setup.py to git clean in https://github.com/apache/arrow/pull/11505). And additionally, it's actually deprecated to call setup.py directly like that (https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html, although we still use it for `python setup.py build_ext` anyway .. but we can at least not mention it for cleaning)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r983320780


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,46 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility"".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+   $ rm -rf arrow/cpp/build
+
+To delete stale Pyarrow build artifacts:
+
+.. code-block::
+
+   $ git clean -Xfd .

Review Comment:
   ```suggestion
      $ git clean -Xfd python
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche merged pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche merged PR #14260:
URL: https://github.com/apache/arrow/pull/14260


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #14260:
URL: https://github.com/apache/arrow/pull/14260#issuecomment-1263754653

   Benchmark runs are scheduled for baseline = b3b304636172c217ed55e7326913257caeafe6c9 and contender = 7b44e6140bb35f3fb45fb32d439f0fff360509d6. 7b44e6140bb35f3fb45fb32d439f0fff360509d6 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/ceff06be03c347fe98df87c787bc2eee...e3e4f54a8f414b3d82892da59d76794f/)
   [Finished :arrow_down:0.44% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/a1ae89cb516649b0b449d1cf5e1a9efc...d09c477ed5b6487f80c8b148fade8c16/)
   [Failed :arrow_down:0.55% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b6bb61cfcb4b40aea12f4d16710e6134...b4a44a568f914999862069ad46148918/)
   [Finished :arrow_down:0.04% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/1b09f8ca67fe451daa75258778cb8384...9b68ff5983e94727abfb2c77516d8f16/)
   Buildkite builds:
   [Finished] [`7b44e614` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1604)
   [Finished] [`7b44e614` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1622)
   [Failed] [`7b44e614` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1605)
   [Finished] [`7b44e614` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1617)
   [Finished] [`b3b30463` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/1603)
   [Finished] [`b3b30463` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/1621)
   [Failed] [`b3b30463` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/1604)
   [Finished] [`b3b30463` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/1616)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] anjakefala commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
anjakefala commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r981842463


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .
+
+If using a Conda environment, there are some build artifacts that get installed in
+``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``.

Review Comment:
   That is why I provided that recommendation! It is a bigger thing to remove and reinstall, but it makes for cleaner, simpler advice. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] anjakefala commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
anjakefala commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r981842463


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .
+
+If using a Conda environment, there are some build artifacts that get installed in
+``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``.

Review Comment:
   That is why I provided that recommendation! It is a bigger thing to remove and reinstall, but it makes for cleaner, simpler advice. I thought the best compromise was "if you know what to look for, you can simply remove that. If you do not, reinstall the Conda environment.
   



##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .
+
+If using a Conda environment, there are some build artifacts that get installed in
+``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``.

Review Comment:
   That is why I provided that recommendation! It is a bigger thing to remove and reinstall, but it makes for cleaner, simpler advice. I thought the best compromise was "if you know what to look for, you can simply remove that. If you do not, reinstall the Conda environment".
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r983320116


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean

Review Comment:
   One small follow-up comment: I would keep the `pushd python` when doing `git clean`, so it only cleans the python build artifacts, and not everything else (eg at this points in the explanation, you could first rebuild arrow cpp after cleaning that up, and then at that point you don't want to remove that again before doing a clean rebuild of pyarrow)
   
   Or I suppose doing `git clean -Xdf python` works as well, instead of pushd/popd to python



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] anjakefala commented on pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
anjakefala commented on PR #14260:
URL: https://github.com/apache/arrow/pull/14260#issuecomment-1262617952

   As a meta question @jorisvandenbossche is my committing strategy of adding `fixup` commits the better approach than rebasing as I go?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
jorisvandenbossche commented on PR #14260:
URL: https://github.com/apache/arrow/pull/14260#issuecomment-1263576830

   > As a meta question @jorisvandenbossche is my committing strategy of adding `fixup` commits the better approach than rebasing as I go?
   
   It's perfect! ;) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on a diff in pull request #14260: ARROW-17753: [Python][Docs] Document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
kou commented on code in PR #14260:
URL: https://github.com/apache/arrow/pull/14260#discussion_r981833265


##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".

Review Comment:
   ```suggestion
      Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility"".
   ```
   
   Or we can use a ReST markup instead of `"..."`.



##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd

Review Comment:
   ```suggestion
      $ pushd python
      $ python3 setup.py clean
      $ popd
   ```



##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .

Review Comment:
   ```suggestion
      $ git clean -Xfd .
   ```



##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build

Review Comment:
   ```suggestion
      $ rm -rf arrow/cpp/build
   ```



##########
docs/source/developers/python.rst:
##########
@@ -636,6 +636,52 @@ Caveats
 
 The Plasma component is not supported on Windows.
 
+Deleting stale build artifacts
+==============================
+
+When there have been changes to the structure of the Arrow C++ library or Pyarrow,
+a thorough cleaning is recommended as a first attempt to fixing build errors.
+
+.. note::
+
+   It is not necessarily intuitive from the error itself that the problem is due to stale artifacts.
+   Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility".
+
+To delete stale Arrow C++ build artifacts:
+
+.. code-block::
+
+  $ rm -rf arrow/cpp/build
+
+To delete stale PyArrow build artifacts:
+
+.. code-block::
+
+  $ pushd python
+  $ python3 setup.py clean
+  $ popd
+
+To delete misc build artifacts that are hidden from ``git``:
+
+.. code-block::
+
+  $ git clean -Xfd .
+
+If using a Conda environment, there are some build artifacts that get installed in
+``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``.

Review Comment:
   We may want to remove `$ARROW_HOME/include/{arrow,gandiva,plasma}`, `$ARROW_HOME/lib/lib{arrow,gandiva,plasma}*` and so on but we will not be able to maintain the file lists to be removed...
   
   So recreating a new Conda environment will be better.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #14260: ARROW-17753: [Python] document cleaning for fixing build environment issues

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14260:
URL: https://github.com/apache/arrow/pull/14260#issuecomment-1260226458

   https://issues.apache.org/jira/browse/ARROW-17753


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org