Commit Graph

88 Commits

Author SHA1 Message Date
Richard Marko
3470625581 core: add lower bound to base16-bytestring, remove CPP
Related to #175
2023-11-20 09:22:05 +01:00
Richard Marko
49dc678060 bump core version to 0.8, add lower bound to db & test
bump for remote
2023-11-20 09:22:05 +01:00
Richard Marko
42f56f504f hnix-store-tests: init
Split from `-core` so it doesn't depend on quickcheck,
generic-arbitrary and quickcheck-instances that could propagate downstrem.
Also allows users to defined their own.

With all roundtrip property tests.

Later this should also absorb test nix-store/daemon harness from
`-remote` so it can be reused by others.
2023-11-20 09:22:05 +01:00
Richard Marko
30e7f18008 core: remove duplicate StandaloneDeriving 2023-11-19 15:12:08 +01:00
Richard Marko
8ccc703478 core: allow dependent-sum-template 0.2.0.0 2023-11-19 08:57:22 +01:00
Richard Marko
e8474eebf7 core: add roundtrip prop for DerivedPath 2023-11-19 07:07:41 +01:00
Cale Gibbard
d832d9a622 core: add System.Nix.DerivedPath
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-19 07:07:41 +01:00
John Ericson
ce0b3606f0 Replace SomeNamedDigest with DSum HashAlgo Digest
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-18 18:45:42 +01:00
Richard Marko
6160cfd523 core: StorePathMetadata -> StorePath.Metadata 2023-11-18 18:44:44 +01:00
John Ericson
7186850478 core: System.Nix.Hash add HashAlgo
prereq for replacing SomeNamedDigest
with (DSum HashAlgo Digest)
2023-11-18 13:02:55 +01:00
Richard Marko
bb2184f5e0 ContentAddressableAddress -> ContentAddress, separate module 2023-11-18 11:19:07 +01:00
Richard Marko
2fbb602896 core: move default-language to common stanza 2023-11-18 09:22:34 +01:00
Richard Marko
894db979db core: move extensions to common stanza
Sensibly
2023-11-17 19:59:34 +01:00
Richard Marko
86a7b58620 core: drop relude
I prefer explicit imports vs magic and this causes
an unused packages warning to pop (with no workaround or fix in sight).
2023-11-17 19:55:26 +01:00
John Ericson
a2f35861da Squash away internal
Closes #234
2023-11-17 19:55:26 +01:00
Richard Marko
2e1cab22b3 move ContentAddressableAddress builder and parser to core, add roundtrip prop 2023-11-17 08:03:40 +01:00
Richard Marko
b80ee47f6a Add Default StoreDir instance 2023-11-16 13:25:20 +01:00
Richard Marko
3e26a0dd2f core: add GenericArbitrary derived instances
for `Build` and `Derivation` modules.

Switch derivation path parser to use
`Nix.Derivation.textParser` like `nix-derivation` does.
2023-11-15 18:36:28 +01:00
Richard Marko
34e788e312 core: add RecordWildCards, ScopedTypeVariables to default-extensions 2023-11-15 18:36:28 +01:00
Richard Marko
82fc838af0 ChangeLog.md -> CHANGELOG.md, add README.lhs for remote 2023-11-15 08:42:56 +01:00
Richard Marko
5dc1802665 core: move Arbitrary instances near their types
This allows us to use them in remote serialization
round trip props.

Couple of them are not needed anymore (`NixLike` is the
default now) so whole `tests/Arbitrary` is gone.
2023-11-15 08:29:49 +01:00
Richard Marko
f9edde00ca core: add case-conflict.nar fixture to extra-source-files 2023-11-15 07:46:29 +01:00
Richard Marko
242c475993 Bump core to 0.7
Related to #227
2023-11-14 09:31:04 +01:00
Sander
0092a2952f
Implement case-insensitive hack 2023-11-13 17:13:44 +04:00
Richard Marko
bfede6f650 core: Allow algebraic-graphs 0.7 2023-11-11 19:00:20 +01:00
Richard Marko
81700e6e7c Release core 0.6.1 2023-01-02 12:13:57 +01:00
Richard Marko
86cec2f801 Release core 0.6 2022-06-06 09:52:24 +02:00
Richard Marko
df0dd83f11 core: allow algebraic-graphs 0.6
Closes #180.
2022-03-07 17:17:40 +01:00
Anton-Latukha
aecfd03ecd dep: Core,Remote: relude >= 1.0 2022-02-21 14:31:01 +01:00
Anton-Latukha
8e3955f6a1
Core: cabal: declare default-extensions 2021-08-06 19:29:01 +03:00
Anton-Latukha
ef6343be35
Core: use relude as Prelude 2021-08-06 17:55:32 +03:00
Anton-Latukha
3f5d9092df
{Code, Remote}: require base >=4.12 (GHC 8.6) 2021-08-06 17:43:22 +03:00
Anton-Latukha
98da3481db Core: proclaim 0.5 2021-06-10 17:23:23 +03:00
Anton-Latukha
97146b41cc
treewide: migrate crypto(hash-* -> nite)
Reference:

Main cause:

https://github.com/haskell-hvr/cryptohash-sha512/issues/7

The whole `cryptohash-*` package family is abandoned, there is no
signs of maintainer activity there, so it stopped following Haskell ecosystem &
`base` releases. Knowing the human history & situation around it - it would not
be reviwed, which gives experience to not hardcode on the (specifically when
emotional) dependency.

Experience I drawn from this story is to keep things simplier when possible &
have more flexible systems as a result code.
It was "a bit too much" for what hashing is, for the code to have 2 hashing type
systems (external & internal) & reinventment of `HashAlgorithm` type duplicate.
The whole code was really rigid with a lot of type applicating the data kinds,
those are dependent type features & should be used cautiously, since interface
became rigid to changes, so afterwards it is easier & effective to dismantle
and recreate the subsystem then to evolve it.

Previous hashing history:
https://github.com/haskell-nix/hnix-store/issues/156
https://github.com/haskell-nix/hnix-store/issues/142
https://github.com/haskell-nix/hnix-store/pull/93
https://github.com/haskell-nix/hnix-store/issues/92
https://github.com/haskell-nix/hnix-store/issues/90
https://github.com/haskell-nix/hnix-store/issues/83
https://github.com/haskell-nix/hnix-store/pull/64
https://github.com/haskell-nix/hnix-store/pull/38
https://github.com/haskell-nix/hnix-store/pull/32
https://github.com/haskell-nix/hnix-store/pull/31
https://github.com/haskell-nix/hnix-store/pull/28
https://github.com/haskell-nix/hnix-store/pull/27
https://github.com/haskell-nix/hnix-store/pull/25
https://github.com/haskell-nix/hnix-store/issues/18
https://github.com/haskell-nix/hnix-store/pull/14
2021-06-10 15:17:40 +03:00
Anton-Latukha
8ddca09609
Core: Internal: add module Truncation 2021-06-10 13:18:41 +03:00
Anton-Latukha
79b461962f
Core: Internal: form Base
It is tiny, but it is a start of separation of the Base encodings from hashing subsystem.
2021-06-10 13:18:40 +03:00
Anton Latukha
0eb0e023c9
{Core, Remote}: proclaim 0.4.3.1 (#155) 2021-05-30 21:06:23 +03:00
Anton Latukha
b4377c753a
Release 0.4.3 (#153)
* Core: ChangeLog: add 0.4.3.0 section

* Remote: ChangeLog: add 0.4.3.0 section

* {Core, Remote}: cabal: proclaim 0.4.3.0
2021-05-30 18:55:50 +03:00
Anton-Latukha
722b431657
Core: tests: add dep hspec, {StorePath,Derivation}: fx import
>    No changes, but 1.1.7 should have been a major version bump due to dropping the Test.Hspec re-export.
https://hackage.haskell.org/package/tasty-hspec-1.2/changelog

M  hnix-store-core/tests/Hash.hs
M  hnix-store-core/tests/NarFormat.hs
2021-05-30 18:27:45 +03:00
Anton-Latukha
9dd468cbe2
Core: cabal: layout 2021-03-16 10:59:04 +02:00
Anton-Latukha
c677ecdb3b
Core: cabal: make -rtsopts a part of the bounded-memory flag 2021-03-16 10:59:04 +02:00
Anton Latukha
3068acd592
Core, Remote: version 0.4.2.0 (Cabal ver & ChangeLogs)
* Core: ChangeLog: add recent changes

* Remote: ChangeLog: add recent changes

* Core, Remote: version `0.4.2.0`
2021-03-12 19:38:54 +02:00
Anton Latukha
5d03ffc43c
Declare tasty-discover a testing build tool (#130)
This properly fixes the use of the tasty-discover,
the report & info were sent upstream to fix it in docs:
https://github.com/haskell-works/tasty-discover/issues/4.
Closes: #129
2021-01-19 13:08:32 +02:00
Anton-Latukha
9c58218c28
Core: prepare 0.4.1.0: cabal version, ChangeLog
M  hnix-store-core/hnix-store-core.cabal
2021-01-16 09:35:10 +02:00
Anton-Latukha
f325cdb7ca Core, Remote: tasty-discover dep: rm from Cabal desc, add to Nix drv
`tasty-discover` is a run-time executable dependency, it does not belong in the
package description.
2021-01-15 02:43:27 +02:00
Anton Latukha
35b8e2c4b8
Core, Remote: deps clean-up (#117)
Closing: #116
#115 allowed to reduce some deps in descriptions.
2021-01-14 22:20:00 +02:00
Richard Marko
22a3f367d2 core: drop unused io-streams and process-extras deps
Closes #106.
2021-01-06 13:26:32 +01:00
Richard Marko
2779bf9705 treewide: switch to cabal 2.2, add commons stanza with Wall & Wunused-packages 2021-01-06 13:26:32 +01:00
Richard Marko
660cb2f190 treewide: fix cabal file indentation 2021-01-06 13:26:32 +01:00
Richard Marko
3d6487d0e3 Release 0.4 2020-12-30 14:14:57 +01:00