Skip to content
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

ci: some meta files may not be respected #4138

Closed
Xuanwo opened this issue Feb 4, 2024 · 4 comments
Closed

ci: some meta files may not be respected #4138

Xuanwo opened this issue Feb 4, 2024 · 4 comments

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Feb 4, 2024

          I found a new issue that some meta files may not be respected:
  • rust-toolchain.toml
  • rustfmt.toml
  • deny.toml

... when run cargo xxx for a specific package now; due to the change of folder structure?

Originally posted by @tisonkun in #4134 (comment)

@Xuanwo
Copy link
Member Author

Xuanwo commented Feb 4, 2024

Hi, @tisonkun

Config files like rust-toolchain.toml are often finding from current dir to the root.

The toolchain is chosen in the order listed above, using the first one that is specified. There is one exception though: directory overrides and the rust-toolchain.toml file are also preferred by their proximity to the current directory. That is, these two override methods are discovered by walking up the directory tree toward the filesystem root, and a rust-toolchain.toml file that is closer to the current directory will be preferred over a directory override that is further away.

ref: https://rust-lang.github.io/rustup/overrides.html

Can you show the cargo command and the specific package you check?

@tisonkun
Copy link
Member

tisonkun commented Feb 4, 2024

Make sense. I should get a wrong understanding about the compilation failure -

$ ./scripts/workspace.py cargo build 
Executing 'cargo build' in core
    Finished dev [unoptimized + debuginfo] target(s) in 0.45s
Executing 'cargo build' in bin/oli
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Executing 'cargo build' in bin/oay
   Compiling ahash v0.8.7
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling ring v0.17.7
   Compiling num-integer v0.1.45
   Compiling tinyvec v1.6.0
   Compiling tiny-keccak v2.0.2
   Compiling httparse v1.8.0
   Compiling pem-rfc7468 v0.7.0
   Compiling tokio-util v0.7.10
   Compiling getrandom v0.2.12
   Compiling ryu v1.0.16
error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/tison/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:24
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/tison/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:35
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                                   ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/tison/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:24
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/tison/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:36
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                                    ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ahash` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
Traceback (most recent call last):
  File "/Users/tison/Brittani/opendal/./scripts/workspace.py", line 31, in <module>
    subprocess.run(
  File "/opt/homebrew/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cargo build' returned non-zero exit status 101.

How about rustfmt.toml and deny.toml?

@Xuanwo
Copy link
Member Author

Xuanwo commented Feb 5, 2024

For rustfmt.toml:

You can create a TOML file called rustfmt.toml or .rustfmt.toml, place it in the project or any other parent directory and it will apply the options in that file.

ref: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=

For deny.toml:

https://github.com/EmbarkStudios/cargo-deny/blob/3afa5e50698271eab5fee24e841de3e81cbe1771/src/cargo-deny/common.rs#L69-L104

deny will find till root.

@Xuanwo
Copy link
Member Author

Xuanwo commented Feb 23, 2024

Confirmed it works, let's close.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants