Giter Site home page Giter Site logo

Comments (5)

krishnan-chandra avatar krishnan-chandra commented on August 22, 2024 1

Hey there! It looks like --in-place is applied inline as part of the docformatter backend.

Some work may be needed to allow running docformatter in both check and format modes through Pants. If you'd like to contribute it, that'd be most welcome! You can find a similar PR for Ruff here.

from pants.

benjyw avatar benjyw commented on August 22, 2024

Presumably we add --in-place so we can capture the outputs easily.

Yeah, running as a checker would require a little work, but probably not much, if you'd like to take it on!

from pants.

totaln avatar totaln commented on August 22, 2024

hi @benjyw , @krishnan-chandra! Is there any happy path (except docs) to run pants locally on the MacOS (M-chip)?
I've been trying for a few days but facing multiple errors with libiconv, tokio, and other libs repeatedly...

from pants.

benjyw avatar benjyw commented on August 22, 2024

It should just work and indeed works fine on my M1 by cloning the repo and running pants.

It will be difficult to provide further help without a lot more detail on what you're doing and the exact errors you're seeing...

from pants.

totaln avatar totaln commented on August 22, 2024

I understand.

So I just follow the pants local development guide (installed python3.9, nix-shell, rustup, updated openssl, etc., so it's not just to clone repo and run pants), then under nix-shell running pants, and after some time of compiling it throws different errors:

1. the first error

error[E0432]: unresolved import `tokio::task::Id`
   --> task_executor/src/lib.rs:14:19
    |
14  | use tokio::task::{Id, JoinError, JoinHandle, JoinSet};
    |                   ^^ no `Id` in `task`
    |
note: found an item that was configured out
   --> /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.32.0/src/task/mod.rs:321:40
    |
321 |         pub use crate::runtime::task::{Id, id, try_id};
    |                                        ^^

error[E0599]: no method named `join_next_with_id` found for struct `JoinSet` in the current scope
   --> task_executor/src/lib.rs:324:44
    |
324 |               next_result = inner.task_set.join_next_with_id() => {
    |                                            ^^^^^^^^^^^^^^^^^
    |
help: there is a method `join_next` with a similar name
    |
324 |               next_result = inner.task_set.join_next() => {
    |                                            ~~~~~~~~~

error[E0599]: no method named `id` found for struct `tokio::task::AbortHandle` in the current scope
   --> task_executor/src/lib.rs:291:35
    |
291 |         inner.id_to_name.insert(h.id(), name.to_string());
    |                                   ^^ method not found in `AbortHandle`

error: unused import: `itertools::Itertools`
  --> task_executor/src/lib.rs:11:5
   |
11 | use itertools::Itertools;
   |     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_imports)]`

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `task_executor` (lib) due to 4 previous errors

2. I tried to change lib.rs to fix it, then this error appeared:

   error: linking with `cc` failed: exit status: 1
  = note: ld: warning: directory not found for option '-L/usr/local/opt/libiconv/lib'
          ld: framework not found DiskArbitration
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          
          error: could not compile `sysinfo` (lib) due to 1 previous error

I tried to run pants both from my terminal and from nix-shell
I have the following paths in my zshrc, but not sure they are correct

export HOMEBREW_PREFIX=$(brew --prefix)
export LIBICONV_PREFIX="$HOMEBREW_PREFIX/opt/libiconv"
export LIBRARY_PATH="$LIBICONV_PREFIX/lib:$LIBRARY_PATH"
export LDFLAGS="-L$LIBICONV_PREFIX/lib $LDFLAGS"
export CPPFLAGS="-I$LIBICONV_PREFIX/include $CPPFLAGS"
export RUSTFLAGS="-L $LIBICONV_PREFIX/lib $RUSTFLAGS"
export SDKROOT=$(xcrun --show-sdk-path)
export PATH="/opt/homebrew/opt/libiconv/bin:$PATH"

so for me, this doesn't seem to be straightforward...sorry if I missed something.

thanks!

from pants.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.