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

WIP: deterministic evaluation of expressions/derivations #709

Closed
wants to merge 20 commits into from

Commits on Jan 21, 2016

  1. WIP

    Daniel Peebles authored and fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    7705822 View commit details
    Browse the repository at this point in the history
  2. WIP2

    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    f3df86a View commit details
    Browse the repository at this point in the history
  3. MOAR WIP

    Daniel Peebles authored and fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    239043f View commit details
    Browse the repository at this point in the history
  4. working version

    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    d0bda8f View commit details
    Browse the repository at this point in the history
  5. hey, the LAST bug fixed!

    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    f3b593e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    946b76a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e2498d9 View commit details
    Browse the repository at this point in the history
  8. first version of working constants (currently fails when constants ch…

    …ange because the result included in the primop argument)
    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    b895063 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cf8b63b View commit details
    Browse the repository at this point in the history
  10. fix bug that toJSON/fromJSON wasn't inverse because the content got c…

    …opied to the store.
    
    Well, they're still not inverse because a path gets converted to a string, but that doesn't seem
    to be a problem so far
    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    b14a68c View commit details
    Browse the repository at this point in the history
  11. also write information into the json file, so the command can be repl…

    …ayed
    
    currently only supported for nix-instantiate (and thus probably also nix-build), not yet nix-env
    add --playback option to play back the exact command
    
    So the interface is now:
    "NIX_RECORDING=filename nix-instantiate ..." to record the nix-instantiate command
    and
    "nix-instantiate --replay filename" to play it back
    
    commands in file
    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    46520da View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9c7dfec View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a838853 View commit details
    Browse the repository at this point in the history
  14. add integration to nix-build/nix-shell

    fix json encoding
    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    92d9e1b View commit details
    Browse the repository at this point in the history
  15. if import is in nix store, add package instead of individual files

    In combination with nix channels (or the newer http download), the whole channel is treated as one input
    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    1e69a65 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    075869e View commit details
    Browse the repository at this point in the history
  17. more robust escaping

    fkz committed Jan 21, 2016
    Configuration menu
    Copy the full SHA
    955e81e View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2016

  1. don't write a json, but write nix files

    we write 3 files to the nix closure:
    -> default.nix: just imports the other two and can be imported to get the exact reproducable output we want to have
    -> nix-support/recording.nix: recordings of all impurities i. e. function calls and imported files
    -> nix-support/expressions.nix: the expression that will be executed
    
    for the expression, a primop __findAlongAttrPath that does the supplies
    the autobindings along the attrpath.
    
    for the playback, a new primop prim_playback has been introduced. It's first parameter
    is a description of all impurities (as written to expression.nix).
    After this function is invoked, all subsequent calls can use the functions introduced here.
    
    In general, we allow multiple prim_playback when they don't conflict (not in all cases conflicts are found yet)
    
    It would also be cool to make the prim_playback more local, e. g. it should only apply
    to a specific term, but it's unclear to me how this can be achieved in a lazy language.
    fkz committed Jan 22, 2016
    Configuration menu
    Copy the full SHA
    eca9dec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec0748b View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2016

  1. cleaning up, lower interference with normal nix-instantiate, save lin…

    …k to recorded source closure (not registered in garbage collection)
    fkz committed Jan 23, 2016
    Configuration menu
    Copy the full SHA
    c1eddb1 View commit details
    Browse the repository at this point in the history