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

nushell: fix darwin build #122144

Merged
merged 2 commits into from May 12, 2021
Merged

Conversation

happysalada
Copy link
Contributor

@happysalada happysalada commented May 8, 2021

Motivation for this change

darwin build is broken

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.

The dependency is building but I'm getting some failing tests

failures:

---- shell::environment::configuration::config_path stdout ----
thread 'shell::environment::configuration::config_path' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: /private/tmp/nix-build-nushell-0.30.0.drv-0/.tmp8A0jFC/config_path_test/config.toml

', tests/shell/environment/configuration.rs:116:9

---- shell::environment::configuration::clears_the_configuration stdout ----
thread 'shell::environment::configuration::clears_the_configuration' panicked at 'assertion failed: nu.pipeline(\"config clear\").execute().is_ok()', tests/shell/environment/configuration.rs:23:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- shell::environment::configuration::removes_config_values stdout ----
thread 'shell::environment::configuration::removes_config_values' panicked at 'assertion failed: nu.pipeline(\"config remove skip_welcome_message\").execute().is_ok()', tests/shell/environment/configuration.rs:136:9

---- shell::environment::configuration::retrieves_config_values stdout ----
thread 'shell::environment::configuration::retrieves_config_values' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: yellow

', tests/shell/environment/configuration.rs:44:9

---- shell::environment::configuration::sets_a_config_value stdout ----
thread 'shell::environment::configuration::sets_a_config_value' panicked at 'assertion failed: nu.pipeline(\"config set nu.meal \'arepa\'\").execute().is_ok()', tests/shell/environment/configuration.rs:67:9

---- shell::environment::configuration::sets_config_values_into_one_property stdout ----
thread 'shell::environment::configuration::sets_config_values_into_one_property' panicked at 'assertion failed: nu.pipeline(&input(r#\"\n            echo [\"amarillo\", \"blanco\"]\n            | config set_into arepa_colors\n        \"#)).execute().is_ok()', tests/shell/environment/configuration.rs:86:9

---- shell::environment::in_sync::environment_values_present_in_configuration_overwrites_inherited_environment_values stdout ----
thread 'shell::environment::in_sync::environment_values_present_in_configuration_overwrites_inherited_environment_values' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: /usr/bin/you_already_made_the_nu_choice

', tests/shell/environment/in_sync.rs:74:9

---- shell::environment::in_sync::inherited_environment_path_values_not_present_in_configuration_should_pick_up_into_in_memory_environment stdout ----
thread 'shell::environment::in_sync::inherited_environment_path_values_not_present_in_configuration_should_pick_up_into_in_memory_environment' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: /Users/andresrobalino/.volta/bin-/Users/mosqueteros/bin-/path/to/be/added

', tests/shell/environment/in_sync.rs:108:9

---- shell::environment::in_sync::inherited_environment_values_not_present_in_configuration_should_pick_up_into_in_memory_environment stdout ----
thread 'shell::environment::in_sync::inherited_environment_values_not_present_in_configuration_should_pick_up_into_in_memory_environment' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: NUNO

', tests/shell/environment/in_sync.rs:53:9

---- shell::environment::in_sync::setting_environment_value_to_configuration_should_pick_up_into_in_memory_environment_on_runtime stdout ----
thread 'shell::environment::in_sync::setting_environment_value_to_configuration_should_pick_up_into_in_memory_environment_on_runtime' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: NUNO

', tests/shell/environment/in_sync.rs:27:9

---- shell::runs_configuration_startup_commands stdout ----
thread 'shell::runs_configuration_startup_commands' panicked at '
Expected: play
    but: not equal:
    actual: Error loading keybindings: ShellError { error: UntaggedRuntimeError { reason: "Couldn\'t create config path:\nOperation not permitted (os error 1)" }, cause: None }Welcome to Nushell 0.30.0 (type 'help' for more info)
  expected: Nu World

', tests/shell/mod.rs:21:9


failures:
    shell::environment::configuration::clears_the_configuration
    shell::environment::configuration::config_path
    shell::environment::configuration::removes_config_values
    shell::environment::configuration::retrieves_config_values
    shell::environment::configuration::sets_a_config_value
    shell::environment::configuration::sets_config_values_into_one_property
    shell::environment::in_sync::environment_values_present_in_configuration_overwrites_inherited_environment_values
    shell::environment::in_sync::inherited_environment_path_values_not_present_in_configuration_should_pick_up_into_in_memory_environment
    shell::environment::in_sync::inherited_environment_values_not_present_in_configuration_should_pick_up_into_in_memory_environment
    shell::environment::in_sync::setting_environment_value_to_configuration_should_pick_up_into_in_memory_environment_on_runtime
    shell::runs_configuration_startup_commands

test result: FAILED(B. 102 passed; 11 failed; 1 ignored; 0 measured; 0 filtered out; finished in 24.04s

error: test failed, to rerun pass '--test main'
error: builder for '/nix/store/wnbg5k8xdiw6s3nzzxa46vsxna6642sq-nushell-0.30.0.drv' failed with exit code 101;
       last 10 log lines:
       >     shell::environment::configuration::sets_config_values_into_one_property
       >     shell::environment::in_sync::environment_values_present_in_configuration_overwrites_inherited_environment_values
       >     shell::environment::in_sync::inherited_environment_path_values_not_present_in_configuration_should_pick_up_into_in_memory_environment
       >     shell::environment::in_sync::inherited_environment_values_not_present_in_configuration_should_pick_up_into_in_memory_environment
       >     shell::environment::in_sync::setting_environment_value_to_configuration_should_pick_up_into_in_memory_environment_on_runtime
       >     shell::runs_configuration_startup_commands
       >
       > test result: FAILED(B. 102 passed; 11 failed; 1 ignored; 0 measured; 0 filtered out; finished in 24.04s
       >

it looks like a matter of having a writable home. However since HOME=$TMPDIR cargo test is in the check phase I'm not sure why it fails. If you have ideas to try, I'm open.

@Br1ght0ne @JohnTitor @marsam

@happysalada
Copy link
Contributor Author

I have just marked tests as broken on darwin.
I think it's still better for end users to be able to have nushell.
I came here because nushell was marked as broken on darwin in hydra.
Let me know if there is anything else I can do.
Otherwise if you don't think that is valuable, I can close this PR, no worries.

@happysalada
Copy link
Contributor Author

ok I will merge this for now.

@happysalada happysalada merged commit 4d8dd0a into NixOS:master May 12, 2021
@happysalada happysalada deleted the nushell_fix_darwin_build branch May 12, 2021 06:23
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.

None yet

1 participant