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: Remove Nix Flake Checks #87

Merged
5 commits merged into from
Nov 4, 2022
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 3, 2022

While a theoretically awesome tool, Nix has demonstrated a pair of extremely deleterious shortcomings that appear to be not considered important by the Nix Community.

Specifically:

  • Nix relies on the manual entry of input hashes for Cargo dependencies. This is extraordinarily cumbersome, and causes build failures on any dependency change. There was a suggestion to get this information automatically, but this has been stalled since 2019 (over 3 years, at the time of this commit): Cargo build without cargoSha256, use Cargo.lock instead NixOS/nixpkgs#63653

  • Nix appears to be unable to handle multiple versions of Rust packages gracefully. The result is unexpected and uncommunicative failures, such as a failure to generate a symlink. This class of failure was first reported in 2017 (over 5 years ago, at the time of this commit): [replace] doesn't replace in rustBuildPackage NixOS/nixpkgs#22177

As a result, I do not believe that Nix can offer us a reliable platform for CI of Hubris at this time. As observed on #46, attempting to appease Nix can result in significant crate changes to facilitate single revision jumps - consuming days of effort to validate a change that is essentially operational.

While a theoretically awesome tool, Nix has demonstrated a pair of
extremely deleterious shortcomings that appear to be not considered
important by the Nix Community.

Specifically:
- Nix relies on the manual entry of input hashes for Cargo
  dependencies. This is extraordinarily cumbersome, and causes
  build failures on any dependency change. There was a suggestion
  to get this information automatically, but this has been stalled
  since 2019 (over 3 years, at the time of this commit):
  NixOS/nixpkgs#63653

- Nix appears to be unable to handle multiple versions of Rust
  packages gracefully. The result is unexpected and uncommunicative
  failures, such as a failure to generate a symlink. This class of
  failure was first reported in 2017 (over 5 years ago, at the time
  of this commit):
  NixOS/nixpkgs#22177

As a result, I do not believe that Nix can offer us a reliable
platform for CI of Hubris at this time. As observed on #46,
attempting to appease Nix can result in significant crate changes
to facilitate single revision jumps - consuming days of effort to
validate a change that is essentially operational.
@ghost ghost self-requested a review as a code owner November 3, 2022 13:37
@ghost ghost requested review from beezow and furquan-rivos November 3, 2022 13:37
@ghost
Copy link
Author

ghost commented Nov 3, 2022

I've added this as a separate PR to avoid polluting #46 with further non-Supervisor discussion.

I can't see how we land #46 without this change. The required changes to get Nix to play nicely appear to involve forking a number of our indirect dependencies to reduce the number of duplicated versions - but even having done so we're still left with a system that is more clumsy that git submodules (in that we have to not just use VCS commands to manually update a fixed tie, but we have to go hack a central file list of hashes).

Copy link
Collaborator

@beezow beezow left a comment

Choose a reason for hiding this comment

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

Fine with me. No point in keeping if it is causing problems.

@beezow
Copy link
Collaborator

beezow commented Nov 3, 2022

We will need to come up with an alternative for the CI pipelines in gitlab. I use nix to generate various images for running in the simulator. Will probably have to replace it with a bash script or something.

@furquan-rivos
Copy link
Collaborator

We will need to come up with an alternative for the CI pipelines in gitlab. I use nix to generate various images for running in the simulator. Will probably have to replace it with a bash script or something.

I think we might want to do this as part of a separate builder repo and not individual component repos.

@ghost ghost enabled auto-merge (rebase) November 4, 2022 10:36
@ghost
Copy link
Author

ghost commented Nov 4, 2022

This isn't what I expected - the merge is blocked waiting for the tests I'm deleting to report their status - can we circumvent that for this merge?

@beezow
Copy link
Collaborator

beezow commented Nov 4, 2022

This isn't what I expected - the merge is blocked waiting for the tests I'm deleting to report their status - can we circumvent that for this merge?

@FawazTirmizi ?

@FawazTirmizi
Copy link
Collaborator

The required CI checks are done in the GitHub settings. I'll remove them from the list, then this should be fine.

@beezow
Copy link
Collaborator

beezow commented Nov 4, 2022

This isn't what I expected - the merge is blocked waiting for the tests I'm deleting to report their status - can we circumvent that for this merge?

@FawazTirmizi ?

Actually, I found it. Should be good to go.

@ghost ghost merged commit a6b1229 into rivos/main-rv64 Nov 4, 2022
@ghost ghost deleted the dev/tdewey/disable-nix-ci branch November 4, 2022 18:43
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.

3 participants