Skip to content

0.12.0

Compare
Choose a tag to compare
@Anton-Latukha Anton-Latukha released this 04 Jan 23:12
· 1499 commits to master since this release

(diff) 0.12.0 (2020-01-05)

  • Disclaimer: Current derivationStrict primOp implementation and so every evaluation of a derivation into a store path currently relies on the hnix-store-remote, which for those operations relies on the running nix-daemon, and so operations use/produce effects into the /nix/store. Be cautious - it is effectful.

  • Introduction:

    • New module Nix.Effects.Derivation.
    • Operations on derivations:
      • old got principled implementations.
      • also new operations got introduced.
    • Implementation of the derivationStrict primOp.
  • Breaking:

    • (link) Nix.Effects: class MonadStore got principled implementation.
      • addPath' got principled into addToStore.
      • toFile_ got principled into addTextToStore'.
      • For help & easy migration you may use addPath & toFile_ addTextToStore standalone functions in the module.
    • (link) Nix.Effects.Basic: defaultDerivationStrict got reimplemented & moved into Nix.Effects.Derivation.
    • (link) Nix.Standard: instance for MonadStore (Fix1T t m) got principled accoding to class MonadStore changes.
    • (link) Nix.Fresh.Basic: instance for MonadStore (StdIdT m) got principled.
  • Additional:

    • (link) New module Nix.Effects.Derivation: HNix(0.12.0):Nix.Effects.Derivation documentation.
    • (link) Nix.Convert: Principled NVPath -> NixString coercion.
      • In a form of principled instance FromValue NixString m (NValue' t f m (NValue t f m)).
    • (link) Nix.String: Allow custom computations inside string contexts.
      • By providing runWithStringContext{T,}' methods into the API.
    • (link) Includded support for new base16-bytestring, which advertices 2x-4x speed increase of its operations.
    • (link) Nix.Effects: addPath & toFile_ standalone functions got principled implementation through the internal use of the new MonadStore type class implementation.
    • (link) Nix.Effects: added addTextToStore, parseStoreResult implementations.
    • (link) Nix.Effects: added type synonyms {RecursiveFlag, RepairFlag, StorePathName, FilePathFilter, StorePathSet}.
    • (link) Nix.Exec: Fixed the rendering of internal Frames.
      • Which is an internal mechanism of a project to passing around messages with their context, still to be used internally).
    • (link) HNix / Nix: The library now also uses hnix-store-remote.
    • (link) cabal.project: project uses cryptohash-sha512 override, the hnix-store-core requires it from hnix and uses that override also. Detailed info. We promise to attend to this issue, probably by migrating to cryptonite in the nearest releases.

Future note: The HNix is a big project. During the initial development and currently the API for simplicity exposes allmost all functions, types, etc. Big open API means a big effort to create/maintain a quite noisy changelog and you parsing through it, and also creates a frequent requirements to mark releases as major and bother you due to some type changes in some parts that may not be used or applicable to be public API.

This year the most gracious API clean-up would happen, we would check and keep open what Hackage projects are using from the API, and the other parts would be open on the request by a way of rapid minor releases. That clean-up is also a work toward splitting the project into several packages some time in the future (split would be into something like Expressions, Evaluation, Executable, Extra), which migration also would be done most thoughful and graceful as possible, with as much easiness and automation provided for migration downstream as possible. If all goes as planned - all downstream would need to do is to get and run our script that would migrate our old map of module imports to new ones, and maybe manually add those newly formed packages into .cabal description.

If it is possible, please, try to switch & use the higher-level API functions where it is applicable. Thank you.