Skip to content

Materialize Nix expressions #2301

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

Merged
merged 24 commits into from
Dec 8, 2020
Merged

Materialize Nix expressions #2301

merged 24 commits into from
Dec 8, 2020

Conversation

ttuegel
Copy link
Contributor

@ttuegel ttuegel commented Dec 7, 2020

In support of runtimeverification/k#1665.

All pull requests and push events will check that the materialization is up-to-date and push to the developer cache. The release job on the master branch will push the smaller dependency footprint to the user-facing cache.

An automatic workflow will update the materialized files on push events.


Review checklist

The author performs the actions on the checklist. The reviewer evaluates the work and checks the boxes as they are completed.

  • Summary. Write a summary of the changes. Explain what you did to fix the issue, and why you did it. Present the changes in a logical order. Instead of writing a summary in the pull request, you may push a clean Git history.
  • Documentation. Write documentation for new functions. Update documentation for functions that changed, or complete documentation where it is missing.
  • Tests. Write unit tests for every change. Write the unit tests that were missing before the changes. Include any examples from the reported issue as integration tests.
  • Clean up. The changes are already clean. Clean up anything near the changes that you noticed while working. This does not mean only spatially near the changes, but logically near: any code that interacts with the changes!

ttuegel and others added 13 commits December 4, 2020 05:35
Local overrides ruin binary caching.
Materialization saves the part of the Nix expression which would be generated
every time the project is built. This part tracks the package description and
dependencies, so it only changes infrequently. Saving the output of this
step (so that we can skip building it) makes the build faster.

The drawback of this approach is that we must periodically run with
checkMaterialization enabled to detect when the materialization needs to be
updated.
The materialization check is moved into the Release workflow.
@ttuegel ttuegel changed the title Nix materialize Materialize Nix expressions Dec 7, 2020
@ttuegel ttuegel marked this pull request as ready for review December 8, 2020 15:44
@ttuegel ttuegel merged commit 3ba6fd3 into master Dec 8, 2020
@ttuegel ttuegel deleted the nix--materialize branch December 8, 2020 22:08
ttuegel added a commit that referenced this pull request Dec 10, 2020
* Remove support for local overrides

Local overrides ruin binary caching.

* Materialize haskell.nix projects

Materialization saves the part of the Nix expression which would be generated
every time the project is built. This part tracks the package description and
dependencies, so it only changes infrequently. Saving the output of this
step (so that we can skip building it) makes the build faster.

The drawback of this approach is that we must periodically run with
checkMaterialization enabled to detect when the materialization needs to be
updated.

* Separate test and release workflows

* Run release workflow only on push to master

* Add nix/rematerialize.sh

* Run Test workflow on pull requests only

* Add a Stack step to Test workflow
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.

1 participant