Comments (5)
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.
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.
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.
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.
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)
- Support exporting downloaded external tools HOT 1
- method to align install_requires of python_distribution with locked depdencies
- scala reproducibility is broken somwhere between 2.14.2 to 2.20.2 HOT 1
- Hard native parser errors cause 2.22 to fail to start, ignores `native_option_validation=warning`
- Rust options parser fails to parse 1 as float, different to legacy parser HOT 2
- Link to slack does not work HOT 4
- Using poetry as a build tool with python_distribution does not work HOT 3
- docker buildx bake support HOT 1
- pants 2.21: XML files for unit tests executed with pytest are no longer generated HOT 1
- poetry_requirement defined by relative path generates a lockfile with absolute path HOT 8
- pants fails to download golang module from private repo due to missing git binary HOT 2
- Better shell completions HOT 2
- Cannot upgrade Pants from 2.19 due to `ModuleNotFoundError` for `pex`. HOT 1
- python.invalid_lockfile_behavior = "ignore" or "warn" does not ignore sha256 mismatches for stale dependencies HOT 4
- Conflicts between architecture of image present on system when building PEX with `docker_environment`
- Docker containers used by a docker_environment are not cleaned when using `--no-pantsd` HOT 1
- macOS 12 GitHub-hosted runners will stop working from 2024-12-03
- native options parser mismatch with quoted strings in env vars. HOT 3
- Consider using executable_search_path in go backend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pants.