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

starship: update to 0.50.0 #6432

Closed
wants to merge 2 commits into from
Closed

starship: update to 0.50.0 #6432

wants to merge 2 commits into from

Conversation

kidonng
Copy link
Contributor

@kidonng kidonng commented Feb 21, 2021

No description provided.

@vladimyr
Copy link
Contributor

vladimyr commented Mar 8, 2021

Can we retry this with libc updated to the latest version which should fix the process_control crate compilation?

diff --git a/Cargo.lock b/Cargo.lock
index c7bedf1..286fb92 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -559,9 +559,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
 
 [[package]]
 name = "libc"
-version = "0.2.84"
+version = "0.2.88"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cca32fa0182e8c0989459524dc356b8f2b5c10f1b9eb521b7d182c03cf8c5ff"
+checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a"
 
 [[package]]
 name = "libdbus-sys"

Patch download: http://sprunge.us/YAcduC

@Grimler91
Copy link
Member

@vladimyr still fails, but in open:

[...]
   Compiling which v4.0.2
   Compiling open v1.5.1
error[E0425]: cannot find function `that` in this scope
  --> /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/open-1.5.1/src/lib.rs:74:22
   |
74 |     thread::spawn(|| that(path))
   |                      ^^^^ not found in this scope

error[E0425]: cannot find function `with` in this scope
  --> /home/builder/.cargo/registry/src/github.com-1ecc6299db9ec823/open-1.5.1/src/lib.rs:83:22
   |
83 |     thread::spawn(|| with(path, app))
   |                      ^^^^ not found in this scope

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0425`.
error: could not compile `open`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `starship v0.50.0 (/home/builder/.termux-build/starship/src)`, intermediate artifacts can be found at `/home/builder/.termux-build/starship/src/target`

Caused by:
  build failed

@vladimyr
Copy link
Contributor

@Grimler91 Thx for trying it out!

Reading through your build log I noticed it tried compiling open crate v1.5.1 while Cargo.lock mandates using v1.4.0 https://github.com/starship/starship/blob/0558b38e/Cargo.lock#L782-L786

I successfully compiled it inside Termux using:

cargo build --locked --no-default-features --features http

Disabling default features is necessary due to the battery crate that is unsupported on Android.

@vladimyr
Copy link
Contributor

Am I reading this correctly? It seems that by default Cargo.lock isn't really respected? 🤔

https://github.com/termux/termux-packages/blob/ac2ec67/scripts/build/termux_step_make_install.sh#L14-L22
There should be a --locked flag present to prevent the exact thing that broke your build. ⚠️

@vladimyr
Copy link
Contributor

vladimyr commented Mar 10, 2021

It is quite weird it didn't cause other problems apart from this ripgrep-all report: #6209 (comment)

@Grimler91
Copy link
Member

I opened a new PR so we can see what the CI says: https://github.com/termux/termux-packages/pull/6501/files. I tested the build locally (cross compilation in our docker image), and got that error. Have not touch the open version so seems weird that it tried using 1.5.1 instead of 1.4.0

@vladimyr
Copy link
Contributor

so seems weird that it tried using 1.5.1 instead of 1.4.0

That happens because cargo install will only consult manifest and completely ignore Cargo.lock unless --locked flag is used (see docs). ⚠️

This really has to get applied repo-wide ASAP otherwise all Termux builds of Rust packages aren't deterministic/reproducible! ⚠️

For example here is how Homebrew ensures reproducible builds: https://rubydoc.brew.sh/Formula.html#std_cargo_args-instance_method

Grimler91 added a commit that referenced this pull request Mar 10, 2021
Otherwise build tries to use newest dependency versions which might
cause problems. See
#6432
amuramatsu pushed a commit to amuramatsu/termux-packages that referenced this pull request Jun 26, 2021
Otherwise build tries to use newest dependency versions which might
cause problems. See
termux#6432
This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

3 participants