Commit Graph

209 Commits

Author SHA1 Message Date
Anton-Latukha
145e7de63f
Core: Internal.Hash: qualify GHC.TypeList as Kind
A preparation for further work.
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
bd00d387e7
Core: System.Nix.Internal.Signature: support saltine 0.2.0 2021-05-30 18:27: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
285bf4256f
Core: tests: {StorePath,Derivation}: fx Text function type 2021-05-30 18:24:52 +03:00
Guillaume Maudoux
db71ecea31 computeStorePathForPath: force SHA256 as it's the only valid choice 2021-03-24 09:19:23 +01:00
Guillaume Maudoux
b85f7c875f add a readonly computeStorePathForPath 2021-03-24 09:19:23 +01:00
Guillaume Maudoux
5fddf3c66b Reorder references in makeTextPath 2021-03-24 02:26:50 +01: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
b4203b2e4d
treewide: "@ '" -> "@'"
Should fix builds for GHC 9.0.
2021-03-15 22:06:58 +02:00
Anton Latukha
c582d0a015
Core, Remote: m fx to ChangeLogs (#139) 2021-03-12 20:17:11 +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
Richard Marko
2a897ab581 core: fix nar test failing when there's no /proc
Closes #109.
2021-02-25 12:49:23 +02:00
Anton-Latukha
a5b7a614c0 Core: rm Setup.hs as it becomes deprecated and puzles HLS
The HLS had problem that it was detecting the cabal.project in root of our
monorepo, but also was founding the Setup.hs that promised that it is a simple
project structure. And was trying to run the Core with `runhaskell`.

So HLS was throwing several errors. The explicit definition of cradles allowed
HLS to understand that it is a monorepo. And the removement of Setup.hs is
because it is not recommended anymore, and upstream work plans to deprecate it
completely in favour of arriving proper solution.
2021-02-09 00:12:02 +02:00
Anton-Latukha
e2378e0eea
Core, Remote: map -> fmap
Allow not only lists.
This for example should allow NonEmpty lists at least.

Also do not think I do this things on a whim.
I did some research on: is there a reason to use map over fmap, and are the
performance reasons?
In short - there is 0 infornamation on why some people use `map` over `fmap`, there
are no reports of performance reasons.

Well, I know that there is a possibility of a minor type class interface
compilation & runtime use cost. But I think GHC is good enough to infer zero
cost for the concrete list type for which `map` gets used.

And overall we not did thorough profiling/perfommans walkthrough so far. I am
sure that use of standard fmap for code flexibility is not a bottleneck in the
design, I've seen some performance problems design has.

And we not even did the profiling to do inlining and specialize work yet. It is
more effective to keep using `fmap`, and supply specialization, which allows to
keep the code polymorhic, portable to write for and effective in performance.
2021-02-03 13:47:00 +02:00
Anton-Latukha
f86235758a
Core, Remote: (++) -> (<>)
*afaik* (++) does not even work with OverloadedStrings with Text or ByteString.

Lets allow ourselves to switch from [] & Strings in Haskell in any part of the code.
2021-02-03 13:02:03 +02:00
Anton-Latukha
c49eb9b6d7
Core, Remote: return -> pure
I wonder why type system needs to infer Monad constraint where Applicative would
suffice.
2021-02-03 12:52:48 +02:00
Anton Latukha
792c76b0af
Core, Remote: handcrafted code clean-up (#134)
`brittany` was used.

Then all changes passed through manual supervision.

Then handcrafted code cleanup was done.

All changes are pure lambda code refactoring,
there should be no changes to the functionality.
2021-02-03 12:44:58 +02:00
Anton-Latukha
3a169c762b
Core: Internal.Nar.Streamer: m cosmetics 2021-02-01 20:21:27 +02:00
Anton-Latukha
ab2d35b47e
Core: Internal.Nar.Parser: m cosmetics 2021-02-01 20:12:26 +02:00
Anton-Latukha
8bf6f26f6b
Core: Internal.Nar.Effects: m cosmetics 2021-02-01 19:25:19 +02:00
Anton-Latukha
3cdfdd1512
Core: Internal.StorePath: m cosmetics 2021-02-01 19:25:15 +02:00
Anton-Latukha
6897edd546
Core: Internal.Signature: m cosmetics 2021-02-01 19:25:11 +02:00
Anton-Latukha
cc7844a9bb
Core: Internal.Base32: m cosmetics 2021-02-01 19:25:06 +02:00
Anton-Latukha
3891df627a
Core: Internal.Base32: m cosmetics 2021-02-01 19:25:00 +02:00
Anton-Latukha
85bb89c6a0
Core: Internal.StorePath: m cosmetics 2021-02-01 19:24:50 +02:00
Anton-Latukha
81706d7e22
Core: Nar: m cosmetic 2021-02-01 00:56:39 +02:00
Anton-Latukha
af36469a75
Core: Hash: m cosmetic 2021-02-01 00:56:39 +02:00
Anton-Latukha
f0f68e8199
Core: Derivation: improve readability 2021-02-01 00:56:39 +02:00
Anton-Latukha
6a50a53097
Core: Build: m cosmetic 2021-02-01 00:56:39 +02:00
Anton-Latukha
d7adcaefb5
Core: ReadonlyStore: m cosmetics 2021-02-01 00:56:33 +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
Richard Marko
be3ab4f548 Next changelog sections 2021-01-16 10:24:59 +01:00
Richard Marko
0ab60a0d6b Release 0.4.1
Closes #111.
2021-01-16 09:57:26 +01: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
637cf0a938 core: fix all warnings 2021-01-14 11:08:42 +01:00
Anton-Latukha
5eac46f6d5
cabal: rm cryptohash-sha512 override
https://github.com/haskell-hvr/cryptohash-sha512/pull/5#issuecomment-757068529
2021-01-09 21:14:15 +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
862e01b0c3 Next changelog sections 2020-12-30 14:46:26 +01:00
Richard Marko
3e043dc99d README tweaks and pruning 2020-12-30 14:46:26 +01:00
Richard Marko
3d6487d0e3 Release 0.4 2020-12-30 14:14:57 +01:00
Anton-Latukha
3ece3b4e50
hnix-store-{core,remote}: support both base16-bytestring epochs 2020-12-30 13:47:28 +02:00
Anton Latukha
43313d0870
hnix-store-{core,remote}: allow also base16-bytestring < 1.0 (#100) 2020-12-30 01:54:31 +02:00
Anton-Latukha
10bb0aefab
core: tmp-override-cryptohash-sha512
cryptohash-sha512 unmaintained, PR adds support of base 4.14 (GHC 8.10).

The fork got version restriction and several tests removed.

A  hnix-store-core/cabal.project
2020-12-22 21:04:53 +02:00
Anton Latukha
72eaf6c01d
readme: sync doc links to source
Closes #49
2020-12-19 13:47:40 +02:00
Anton-Latukha
5d160cd5c5
core & remote: cosmetics 2020-12-17 00:58:07 +02:00
Richard Marko
ee42448154
core: qualified Base32 in Hash test
Related to #87.
2020-12-17 00:56:58 +02:00
Anton-Latukha
54ec4855ba
core & remote: refactor (Digest <-> BaseNN) encodeInBase & decodeBase
also rename functions `encodeIn` `decode` to `encodeInBase` `decodeBase`
2020-12-17 00:56:00 +02:00
Anton-Latukha
3e33dc2f5e
core:System/Nix/Internal/Hash: unify decodeBase* fun under decode 2020-12-17 00:42:31 +02:00
Anton-Latukha
24435f0b87
core:System/Nix/Internal/Hash: unify encodeBase* fun under encodeIn 2020-12-17 00:42:19 +02:00
Anton-Latukha
901f23ee88
core:System/Nix/Internal/Hash: sort encode*/decode* functions 2020-12-17 00:28:01 +02:00
Anton Latukha
4a1c1a2697
Merge request #86: use base16-bytestring >= 1, & updating according tests 2020-12-14 11:47:06 +02:00
Richard Marko
9126129372 core: fix tests due to B16.decode changing type 2020-12-14 10:15:25 +01:00
Anton-Latukha
7a81be7ae1
hnix-store-core.cabal: use base16-bytestring >= 1 2020-12-14 10:52:36 +02:00
Richard Marko
bb2a91c09e core: Add derivation test samples to extra-source-files 2020-12-14 10:43:39 +02:00
Anton Latukha
ab190513af
System/Nix/Internal/Hash: fx decodeBase16, unify decodeBase{16,32,64} functions (#84)
Yes. One just needed to look at the previous decode* set of functions to understand why they got unified.

Now they can be unified into one function and get Left handled predictably & uniformly.
2020-12-13 16:00:44 +02:00
Greg Hale
e602dc927a version bump 2020-11-29 09:23:00 -05:00
Richard Marko
353ac1511c ChangeLog(s): release 0.3.0.0 2020-11-29 15:14:26 +01:00
Richard Marko
69f9af2c00 core: update ChangeLog (base64, SHA512, NAR streaming) 2020-11-16 11:56:31 +01:00
Richard Marko
474725b3de
Merge pull request #73 from layus/sha512
Sha512 and base64 support
2020-11-09 12:34:34 +01:00
Guillaume Maudoux
f0d0d12f83 Add support for base64 and sha512
cryptohash-sha512 is not yet updated to work with ghc 8.10.
Some jailbreaking is required.
2020-11-03 22:40:56 +01:00
Guillaume Maudoux
a139b6ff12 Do not break everyone's code
Force named hashes to be valid. After all, what would be the point of
naming an invalid hash ?
This avoids propagating manually the ValidAlgo requirement everywhere.
2020-10-28 10:15:11 +01:00
Greg Hale
3de47a36e7 Use constant-space encoding and decoding for NARs 2020-08-05 21:00:52 -04:00
Guillaume Maudoux
4fc581ad08 Fix hash computation in makeFixedOutputPath 2020-07-24 12:44:09 +02:00
Guillaume Maudoux
68f85696db Add mkNamedDigest to parse text digests 2020-07-24 12:44:09 +02:00
Richard Marko
84cbca23e3 core: Update ChangeLog 2020-07-14 13:27:24 +02:00
Richard Marko
4ddea5b1e9 core: derive Ord for StorePathTrust 2020-07-14 13:27:24 +02:00
Richard Marko
1076926515 core: add System.Nix.Derivation and tests 2020-07-14 13:27:24 +02:00
Richard Marko
11277253c0 switch hackage category from System to Nix 2020-07-14 13:27:24 +02:00
Richard Marko
1f862114c6 simple store path root, remote store rework
Closes #15, #16, #21, #22, #62.
2020-07-14 13:27:24 +02:00
Richard Marko
cbe0c49083
Merge pull request #60 from haskell-nix/gh-tmp-changelog
hnix-store-core changelog for 0.2.0.0
2020-06-28 10:41:08 +02:00
John Ericson
46cf3fc58f
Merge pull request #36 from puffnfresh/makeFixedOutputPath
Add makeFixedOutputPath
2020-03-28 09:58:14 -04:00
Greg Hale
7e61a7ca22
Merge pull request #57 from sorki/b32
Base16/Base32 decoding, props/tests
2020-03-22 11:17:17 -04:00
Greg Hale
fe87726b02 hnix-store-core changelog for 0.2.0.0 2020-03-12 09:50:07 -04:00
Richard Marko
8b8e675039 fix nar test lookup for src directory
Now also looks in `hnix-store-core/src` as well and won't fail
even if either of them doesn't exist (which is not a big deal
in this case).
2020-03-05 12:06:15 +01:00
Richard Marko
d82ba9f3a7 Base16/Base32 decoding, props/tests 2020-03-04 10:41:04 +01:00
Drew Hess
516af6f95f
regex-tdfa 1.3.1.0 replaces regex-tdfa-text.
See https://github.com/haskell-hvr/regex-tdfa/issues/4
2020-01-26 18:54:34 +00:00
Brian McKenna
c02177dd7e Only use source fixed output path if SHA256 algorithm 2019-06-25 22:11:57 +05:30
Shea Levy
671d3c58dd
Derive Ord for StorePath 2019-04-05 05:45:22 -04:00
Shea Levy
b6e9680437
StorePath: Derive Eq to make StorePathSet usable. 2019-04-03 06:50:52 -04:00
Brian McKenna
21d3eaf84c Add makeFixedOutputPath 2019-03-28 08:45:19 +05:30
Shea Levy
6e4b72f021
Add type for metadata about StorePaths.
This is a stronger-typed version of ValidPathInfo, so this fixes #43.
2019-03-27 12:04:56 -04:00
Shea Levy
61a536504d
makeStorePath: Generalize toall named hash algorithms. 2019-03-24 16:50:02 -04:00
Shea Levy
f2beabb10f
Remove as-yet unused System.Nix.Build 2019-03-23 10:52:00 -04:00
Shea Levy
2ad76d2b8b
Fix build on GHC 8.4 2019-03-22 10:00:08 -04:00
Shea Levy
a9312d91d3
Remove now-unused System.Nix.Path 2019-03-22 09:45:19 -04:00
Shea Levy
5a270eff70
NarFormat test: Remove dependency on System.Nix.Path. 2019-03-22 09:43:12 -04:00
Shea Levy
8dd4805936
Hash test: Depend on new StorePath module. 2019-03-22 09:42:33 -04:00
Shea Levy
194261bffa
KnownStoreDir: Note pathiness requirement in haddocks. 2019-03-22 09:40:16 -04:00
Shea Levy
8fa011942e
ReadonlyStore: Update to use new StorePath module. 2019-03-22 09:21:30 -04:00
Shea Levy
aabde18a4a
Move FilePathPart from Path.hs to Nar.hs.
This has nothing to do with store paths...
2019-03-22 08:57:51 -04:00
Shea Levy
03d9a212e8
Remove GC types.
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:52:46 -04:00
Shea Levy
ac24e61148
Remove Derivation types.
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:50:47 -04:00
Shea Levy
63643e953a
Remove StoreEffects.
In its current incarnation it is never used, we will resurrect a much
simpler pared-down version based on hnix's actual needs later.
2019-03-22 08:46:43 -04:00