-
Notifications
You must be signed in to change notification settings - Fork 384
Removing hardcoded hashes from Nix flake. #2985
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
base: master
Are you sure you want to change the base?
Removing hardcoded hashes from Nix flake. #2985
Conversation
@donn any concerns here? Nix support is for OL2 so I have none. |
8c358e8
to
d306893
Compare
My apologies, forgot to update the workflows. Any time the submodules update the |
It would also appear that despite trying to make sure that EDIT: Never mind, something was just odd when I cloned it to another machine - it didn't get the right submodule commits for some reason. In the morning I'll rebase on master to ensure that it works with the project in its current state. |
This is ORFS, not OpenROAD, but the changes look broadly fine |
I'm aware, yes. What do you mean by that, though? |
I think he is pointing out the OL2 only uses the nix file from OR and not ORFS. |
@vvbandeira do you understand the scan's error |
Forgive my ignorance here, but OL2? If this is in reference to the fact that I added inputs to all the submodules for OpenROAD and YoSys, that's just for reasons of Nix flakes are... interesting at times, to put it kindly. It's a workaround for an issue with submodules in flake dependencies. |
OL2 = OpenLane2 (https://github.com/efabless/openlane2) |
Oh, should I have included that instead of or in addition to OpenROAD in this? If so, I can work on that. |
@rslawson ORFS and OpenLane 2 are two different implementations of the OpenROAD flow. You're contributing to ORFS right now, so you don't need to worry about OpenLane 2. If you were contributing to OpenROAD's Nix file, I would indeed need to take a look at that. |
Ah, undersood. Thank you for clearing that up for me (: |
I think it might be missing the |
Co-authored-by: max <[email protected]> Signed-off-by: Ryan Slawson <[email protected]>
d306893
to
47709e3
Compare
Hmm, was hoping something would change with rebasing onto current master, but unfortunately no. |
I added an exclusion for checking flake.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there changes to this action and .github/workflows/github-actions-cron-update-yosys.yml ? I don't think they have anything to do with nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because if any of the submodules change, so do their hashes. Then it won't match the one in flake.lock
, and so trying to open a dev shell will fail. Users can rectify this by running nix flake update
, but I thought it might be nice to update the file automatically in CI whenever OR or Yosys are updated. I have assumed, though, that none of their submodules (both abc submodules, OpenSTA, cxxopts) will never be updated independently of their parents. If that's a bad assumption it may be necessary to add more CI actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vvbandeira does this make sense to include? My interest is spending any effort on nix is quite low so this should be zero hassle to adopt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not add Nix to the existing GHAs; this will add a dependency we do not officially support. I am okay with adding a new GHA to test Nix, but it should be noted that it will be the responsibility of Nix users to maintain it, and we do not intend to offer any support for Nix-related problems at this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair enough, I'll revert those changes and write up something to test the Nix flake. I'll also include an update to documentation somewhere that indicates what to do if building the flake fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, additional question: when you say it's okay to add a new GHA to text Nix, do you mean specifically only that? As in I should not use it to update flake.lock
, and instead instruct users to do so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rslawson, apologies for the long delay.
You can create a new GHA that creates a draft PR to update the flake.lock
; we would accept it.
My concern with adding to the existing PRs is that there could be a case where we want to merge the PR that automates the OR submodule, but for some reason, the GHA is not working/failing due to Nix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vvbandeira No worries at all, I've had very little time to work on personal projects for a bit now. I'll see about making those changes as soon as I am able.
Previously the flake would require periodically updating the commit hashes for the submodules (and their submodules, etc.). However, the flake should now handle changes to those without direct user interaction.