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

just: 0.4.5 -> 0.5.10 #84770

Merged
merged 1 commit into from
Apr 10, 2020
Merged

just: 0.4.5 -> 0.5.10 #84770

merged 1 commit into from
Apr 10, 2020

Conversation

xrelkd
Copy link
Contributor

@xrelkd xrelkd commented Apr 9, 2020

Motivation for this change

Update just to the latest release.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@CloudArtAdmins
Copy link
Contributor

CloudArtAdmins commented Apr 9, 2020

This one didn't work for me.
error:

builder for '/nix/store/zl9q5z3rpan48lcz7ad4d9msa3mhrd68-just-0.5.10.drv' failed with exit code 101; last 10 log lines:
  thread 'flag' panicked at 'Box<Any>', test-utilities/src/lib.rs:14:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  
  
  failures:
      flag
  
  test result: FAILED. 0 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out
  
  error: test failed, to rerun pass '--test shell'
cannot build derivation '/nix/store/ms8218lg0lwzdh4d5vk1i2mbwbjkm1aq-env.drv': 1 dependencies couldn't be built

@CloudArtAdmins
Copy link
Contributor

Alright... New error...

builder for '/nix/store/gcfkyy9nf40wkvpvybya4amgb2rlg18s-just-0.5.10.drv' failed with exit code 101; last 10 log lines:
  thread 'justfile::tests::run_shebang' panicked at 'Unexpected run error: Shebang { recipe: "a", command: "/usr/bin/env", argument: Some("sh"), io_error: Os { code: 2, kind: NotFound, message: "No such file or directory" } }', src/justfile.rs:309:3
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  
  
  failures:
      justfile::tests::run_shebang
  
  test result: FAILED. 359 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
  
  error: test failed, to rerun pass '--lib'
cannot build derivation '/nix/store/vxay8cr5rqv3vv50jqsq5288gnzqdhgi-env.drv': 1 dependencies couldn't be built

Maybe add a WIP to the title of the pull request?

@xrelkd xrelkd changed the title just: 0.4.5 -> 0.5.10 [WIP] just: 0.4.5 -> 0.5.10 Apr 9, 2020
@xrelkd xrelkd changed the title [WIP] just: 0.4.5 -> 0.5.10 just: 0.4.5 -> 0.5.10 Apr 9, 2020
@xrelkd
Copy link
Contributor Author

xrelkd commented Apr 9, 2020

@GrahamcOfBorg build just

@xrelkd
Copy link
Contributor Author

xrelkd commented Apr 9, 2020

@privateseabass, Thanks for the review!
Hi @marsam, could you review this PR? Thank you!

Copy link
Member

@Br1ght0ne Br1ght0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff - changes requested
built with nixpkgs-review
just --help works

https://github.com/NixOS/nixpkgs/pull/84770
1 package built:
just

Comment on lines 35 to 52
# Run "cargo test" without test case "edit",
# since test case "edit" needs "cat".
checkPhase = ''
runHook preCheck
echo "Running cargo cargo test
--lib
--test completions
--test init
--test integration
--test interrupts
--test invocation_directory
--test readme
--test search
--test shell
--test working_directory
-- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"

cargo test \
--lib \
--test completions \
--test init \
--test integration \
--test interrupts \
--test invocation_directory \
--test readme \
--test search \
--test shell \
--test working_directory \
-- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}
runHook postCheck
'';
Copy link
Member

@Br1ght0ne Br1ght0ne Apr 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just skip the two failing cases, instead of enumerating all the working ones?

Suggested change
# Run "cargo test" without test case "edit",
# since test case "edit" needs "cat".
checkPhase = ''
runHook preCheck
echo "Running cargo cargo test
--lib
--test completions
--test init
--test integration
--test interrupts
--test invocation_directory
--test readme
--test search
--test shell
--test working_directory
-- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test \
--lib \
--test completions \
--test init \
--test integration \
--test interrupts \
--test invocation_directory \
--test readme \
--test search \
--test shell \
--test working_directory \
-- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}
runHook postCheck
'';
checkPhase = ''
runHook preCheck
echo "Running cargo test --
--skip edit
--skip run_shebang
''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test -- \
--skip edit \
--skip run_shebang \
''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
runHook postCheck
'';

@@ -20,22 +20,50 @@ rustPlatform.buildRustPackage rec {
export USER=just-user
export USERNAME=just-user

sed -i tests/integration.rs \
sed -i tests/*.rs \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sed -i tests/*.rs \
sed -i src/justfile.rs tests/*.rs \

Then the sed -i src/justfile.rs block can be removed.

@xrelkd
Copy link
Contributor Author

xrelkd commented Apr 9, 2020

@filalex77, Thanks for the suggestions!!

@Mic92 Mic92 merged commit 70d6f5c into NixOS:master Apr 10, 2020
@xrelkd
Copy link
Contributor Author

xrelkd commented Apr 10, 2020

@privateseabass, @filalex77, @Mic92 Thank you!!

@xrelkd xrelkd deleted the update/just branch April 10, 2020 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants