Open strophy opened 2 weeks ago
Thanks for reporting this! Do master and the latest released version, 1.34, fail with the same error? That test tries to interactively make sure that bash completions are working, so it's probably sensitive to which version of bash is installed.
The error building 1.34.0 appears in the middle of the test output rather than the end, but other than that is identical:
test fmt::recipe_parameter_conditional ... ok
test fmt::recipe_parameter_default ... ok
test fmt::recipe_parameter_concat ... ok
test fmt::recipe_parameter_default_envar ... ok
test_complete_all_recipes: failed! Completion for `just` does not match.
test fmt::recipe_parameter_envar ... ok
test fmt::recipe_parameter_in_body ... ok
--- expected
+++ actual
@@ -1 +1 @@
-declare -a COMPREPLY=([0]="deploy" [1]="install" [2]="publish" [3]="push" [4]="test")
+declare -a COMPREPLY=()
test fmt::recipe_parameters ... ok
test fmt::recipe_parameters_envar ... ok
test fmt::recipe_quiet ... ok
test fmt::recipe_quiet_command ... ok
test_complete_recipes_starting_with_i: failed! Completion for `just i` does not match.
test fmt::recipe_positional_variadic ... ok
--- expected
+++ actual
@@ -1 +1 @@
-declare -a COMPREPLY=([0]="install")
+declare -a COMPREPLY=()
test fmt::recipe_quiet_comment ... ok
test fmt::recipe_several_commands ... ok
test_complete_recipes_starting_with_p: failed! Completion for `just p` does not match.
test fmt::recipe_variadic_plus ... ok
test fmt::recipe_variadic_default ... ok
test fmt::unstable_not_passed ... ok
--- expected
+++ actual
@@ -1 +1 @@
-declare -a COMPREPLY=([0]="publish" [1]="push")
+declare -a COMPREPLY=()
test fmt::unstable_passed ... ok
test fmt::separate_recipes_aliases ... ok
test fmt::recipe_with_docstring ... ok
test fmt::recipe_with_comments_in_body ... ok
test fmt::recipe_variadic_star ... ok
test fmt::set_false ... ok
test fmt::set_true_explicit ... ok
test fmt::set_shell ... ok
test_complete_recipes_from_subdirs: failed! Completion for `just subdir/` does not match.
test fmt::set_true_implicit ... ok
test functions::broken_directory_function2 ... ok
test functions::broken_directory_function ... ok
--- expected
test functions::broken_file_stem_function ... ok
+++ actual
@@ -1 +1 @@
-declare -a COMPREPLY=([0]="subdir/special" [1]="subdir/surprise")
+declare -a COMPREPLY=([0]="subdir/")
test functions::broken_extension_function2 ... ok
Some test[s] failed.
test functions::broken_extension_function ... ok
test functions::broken_without_extension_function ... ok
test functions::broken_file_name_function ... ok
test fmt::subsequent ... ok
test fmt::write_error ... ok
test completions::bash ... FAILED
test functions::choose_bad_alphabet_empty ... ok
test functions::blake3 ... ok
test functions::choose_bad_length ... ok
test functions::blake3_file ... ok
........
........
test working_directory::working_dir_applies_to_backticks ... ok
test unstable::set_unstable_true_with_env_var ... ok
test working_directory::working_dir_applies_to_shell_function ... ok
test working_directory::working_dir_applies_to_backticks_in_submodules ... ok
test working_directory::setting ... ok
test working_directory::working_dir_applies_to_shell_function_in_submodules ... ok
test working_directory::working_dir_in_submodule_is_relative_to_module_path ... ok
test readme::readme ... ok
failures:
---- completions::bash stdout ----
thread 'completions::bash' panicked at tests/completions.rs:26:3:
assertion failed: status.success()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
completions::bash
test result: FAILED. 795 passed; 1 failed; 7 ignored; 0 measured; 3 filtered out; finished in 1.43s
I think it's just due to Rust parallelism and waiting for all jobs to finish. I'm not sure how to build from master unfortunately due to the way abuild works. The bash version in use is shown while setting up the environment as (12/28) Installing bash (5.2.26-r0)
.
I tried manually running the build in the build environment, and then manually running the test:
/home/builder/package/just-1.34.0 # target/release/just --completions bash > completions.bash
/home/builder/package/just-1.34.0 # tests/completions/just.bash /home/builder/package/just-1.34.0/completi
ons.bash
warning: /home/builder/package/just-1.34.0/Cargo.toml: unused manifest key: lints.rust.unexpected_cfgs.check-cfg
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
fatal: not a git repository (or any parent up to mount point /home/builder)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
test_complete_all_recipes: ok
test_complete_recipes_starting_with_i: ok
test_complete_recipes_starting_with_p: ok
test_complete_recipes_from_subdirs: ok
All tests passed.
Maybe something related to temp file handling when running in abuild? I'm starting to think we can disable this test like the three others already disabled for Alpine builds, the output itself is correct I think.
Hmm, interesting. Can you try with an older version of bash? The tests are passing for me on a Debian box with bash 5.1.4.
It's really difficult to inject packages from older releases of Alpine during the build process unfortunately. I think I'll just add it to the skipped tests with a brief explanation, given that I was able to pass the test successfully by running it manually. We can add it to the (for now) short list of tests that don't work on Alpine for whatever reason, and someone with more skill with abuild can maybe resolve them one day:
cargo test --frozen -- \
--skip choose::default \
--skip edit::editor_precedence \
--skip functions::env_var_functions \
--skip completions::bash
Is that ok with you, should I go ahead and open a MR and see what the Alpine maintainers think about it?
That sounds pretty reasonable to me! I think this is something going on with Alpine, since tests are passing on other Linux distros, so there's probably not much to do on the just
side.
Hi, I started using
just
recently and absolutely love it. I'm trying to update the package for Alpine to the latest, since it is currently at 1.26.0. I'm able to build 1.27.0, but 1.28.0 fails with the following error during tests:I suspect it is probably related to #2104 or #2120, unless that .git error is the underlying cause? Thought I would post here to see if anyone has come across this before digging deeper. My APKBUILD file for 1.28.0 currently looks like this:
Thanks for any help!