Skip to content

imp: soc of eval, modules & options#73

Merged
zhaofengli merged 1 commit intozhaofengli:mainfrom
blaggacao:main
May 22, 2022
Merged

imp: soc of eval, modules & options#73
zhaofengli merged 1 commit intozhaofengli:mainfrom
blaggacao:main

Conversation

@blaggacao
Copy link
Contributor

@blaggacao blaggacao commented Apr 4, 2022

  • the reason for this change is to have more transparent separation
    of concern between effectuations of the module system and pre-module
    system effectuations

  • with improved flakes support down the line, pre-module system
    effectuations will get more complex

  • this also allows to patch the aspects of the evaluation individually while
    tracking other components from upstream. eg. patch options & eval but
    not modules

@blaggacao blaggacao force-pushed the main branch 4 times, most recently from 8742048 to 6aa16af Compare April 4, 2022 00:27
@zhaofengli
Copy link
Owner

Currently, this is problematic because eval.nix is embedded into the binary, with its content written into a temporary file when we want to use it. Instead of force-pushing and waiting for GitHub Actions, you can also run all the unit tests with cargo test inside the shell environment (nix-shell / nix develop / direnv).

@zhaofengli zhaofengli marked this pull request as draft April 4, 2022 01:30
@blaggacao
Copy link
Contributor Author

Ah thanks! that's why it fails 😄 I also want to separate them so as to be able to patch the eval.nix logic. thanks for the pointer...

@blaggacao blaggacao marked this pull request as ready for review April 4, 2022 02:12
@blaggacao blaggacao force-pushed the main branch 2 times, most recently from 8655350 to 613e8ea Compare April 4, 2022 02:21
@blaggacao
Copy link
Contributor Author

blaggacao commented Apr 4, 2022

Based on this I'll protoype a custom flake-only schema for #71 over at https://github.com/divnix/hive -- which I currently refactor to use colmena.

In such projects, I do think it's even a general advantage to keep the evaluator in local code, for documentation purposes.

@blaggacao
Copy link
Contributor Author

@zhaofengli this is ready imo 🚀 🎸

@zhaofengli zhaofengli added this to the 0.4.0 milestone Apr 26, 2022
- the reason for this change is to have more transparent separation
  of concern between effectuations of the module system and pre-module
  system effectuations

- with improved flakes support down the line, pre-module system
  effectuations will get more complex

- this also allows to patch the aspects of the evaluation individually
  while tracking other components from upstream. eg. path options & eval
  but not modules
@zhaofengli
Copy link
Owner

As mentioned on Matrix, I'm still not sure whether I'd like the evaluator to be swappable (#82) or not, but this PR looks fine so let's merge it. There are some small nits which I'll fix later. Thanks!

@zhaofengli zhaofengli merged commit 9bd5e7b into zhaofengli:main May 22, 2022
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.

2 participants