commercialhaskell / commercialhaskell/stack

Build with custom package-indices

Open
#5,069 4 comments 0 reactions 0 assignees View on GitHub
component: package index further investigation required
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments

We need to use private libraries. Thus we cannot use global hackage server. Before stack version 1.9.1 we can used two package-indices: one was global hackage (with all public libraries), another was our local hackage (with private libraries). Since 1.9.1 we cannot use two package indices, so we copied all public libraries to our local hackage server.

### Expected

That libraries will be build :).

### Actual

We make following configuration in `stack.yaml`:

```
package-indices:
- download-prefix: https://hackage.biocad.ru/package/
hackage-security:
keyids:
- ...
key-threshold: 1 # number of keys required
ignore-expiry: true
```

```
$ stack build --verbose
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
2019-10-29 08:50:43.670480: [debug] Checking for project config at: /Users/bogdan/code/git/avtogene-back/stack.yaml
2019-10-29 08:50:43.670850: [debug] Loading project config file stack.yaml
2019-10-29 08:50:43.671932: [warn] Warning: /Users/bogdan/code/git/avtogene-back/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: ignore-revision-mismatch
2019-10-29 08:50:43.675932: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-10-28 05:50:43.675879 UTC]
2019-10-29 08:50:43.676389: [debug] Not reading lock file
2019-10-29 08:50:43.801396: [debug] Completing package location information from bcd-config-0.1.1.1
2019-10-29 08:50:43.801856: [info] Cabal file info not found for bcd-config-0.1.1.1, updating
2019-10-29 08:50:43.802437: [info] Selected mirror https://hackage.biocad.ru/package/
2019-10-29 08:50:43.805322: [info] Downloading timestamp
2019-10-29 08:50:43.962546: [info] Verification error: Could not deserialize /timestamp.json: Malformed: (line 1, column 1):
unexpected "P"
expecting white space or JSON value
2019-10-29 08:50:43.962776: [info] Downloading root
2019-10-29 08:50:44.017236: [info] Exception Could not deserialize /root.json: Malformed: (line 1, column 1):
unexpected "P"
expecting white space or JSON value when using mirror https://hackage.biocad.ru/package/
2019-10-29 08:50:44.017332: [info] Selected mirror http://hackage.fpcomplete.com/
2019-10-29 08:50:44.020097: [info] Downloading timestamp
2019-10-29 08:50:44.573584: [info] Downloading snapshot
2019-10-29 08:50:44.778085: [info] Cannot update index (server does not provide incremental downloads)
```

Error in deserialization. We checked `root.json` and `timestamp.json` in our hackage-server. They are valid JSON-files.

### Stack version

```
$ stack --version
Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
```

### Method of installation

* Official binary, downloaded from stackage.org or fpcomplete's package repository

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.