Commit Graph

87 Commits

Author SHA1 Message Date
Andrea Bedini
3769268895 WIP 2023-05-30 16:40:14 +08:00
Andrea Bedini
42a2e7f52f Merge remote-tracking branch 'origin/main' into tidy-up 2023-05-23 14:37:11 +08:00
Andrea Bedini
a32da0b49c Tidy-up
- Bump Cabal-syntax to 3.10
- Drop Distribution.PackageDescription.FieldGrammar.Copy
- Drop cabal-install dependency
- Tidy up bounds
2023-05-23 14:31:46 +08:00
Andrea Bedini
8fef0cd997 Fix up, print root keys but create the other keys too 2023-05-15 17:51:26 +08:00
Andrea Bedini
01a693789f
Merge branch 'main' into show-public-keys 2023-05-15 17:10:06 +08:00
Yvan Sraka
f40673352f
Update app/Foliage/HackageSecurity.hs
Co-authored-by: Andrea Bedini <andrea@andreabedini.com>
2023-05-15 10:58:44 +02:00
Andrea Bedini
4cafbe75a1 Improve deprecation label on the webpages
- Add label also to revisions
- Resize the label on package versions page
2023-05-15 15:23:36 +08:00
Andrea Bedini
4f706f9bd9 Fix page formatting issue 2023-05-15 15:06:46 +08:00
Andrea Bedini
285c8e31b1 Comments and formatting 2023-05-15 14:43:16 +08:00
Andrea Bedini
754a1c1bd7 Remove dead code 2023-05-15 14:12:42 +08:00
Andrea Bedini
a93eb62daa Add more comments 2023-05-15 14:12:22 +08:00
Yvan Sraka
59e0d72cb9
Fix #13: create keys should show the public keys 2023-05-05 15:43:42 +02:00
Andrea Bedini
9948cc7d56 Add comments about revisions timestamps 2023-04-24 22:40:56 +08:00
Andrea Bedini
9c142e3702 Properly render version ranges 2023-04-24 22:26:13 +08:00
Andrea Bedini
62789a17e8 Revisions at the same time as publication is allowed
(Apparently)
2023-04-24 22:23:24 +08:00
Andrea Bedini
16d75ecc16 Rework the metadata validation 2023-04-24 22:09:17 +08:00
Andrea Bedini
33edc7773d Put a bandage on cmdImportIndex 2023-04-24 11:52:03 +08:00
Yvan Sraka
7da6927247
Fix #18: add support for deprecated-versions
Co-authored-by: Andrea Bedini <andrea@andreabedini.com>
2023-04-20 16:45:08 +02:00
Andrea Bedini
234f8fcbf1
Maybe fix issue 2023-03-10 13:29:22 +08:00
Andrea Bedini
b5e4f43dd2 Fix revisions timestamp on package page 2023-03-03 18:48:14 +08:00
Andrea Bedini
3e99be2211 Better diagnostics
- Fold most of getPackageVersions into preparePackageVersion

  We pass to preparePackageVersion the metadata file we are dealing with
  so it can be mentioned in case of errors.

- Replace `fail` by `error`. Shake uses exceptions to signal build
  failures. It turns out `error` gets displayed slightly better when
  caught by shake. Also we can use it in pure code.
2023-03-03 12:30:37 +08:00
Andrea Bedini
899a79cd53 Parsing the cabal file should go in preparePackageVersion 2023-03-03 08:51:33 +08:00
Andrea Bedini
5a3d546bdc Add more comments 2023-03-03 08:46:07 +08:00
Andrea Bedini
7ec1fb6ef2 Use NonEmpty to avoid partiality 2023-03-03 08:23:01 +08:00
Andrea Bedini
9a4d097cde Rework internals and add consistency check
The function preparePackageVersion is now responsible for doing
everything we need to do to be able to include the package in the index.

The function also returns a denormalised view of the package information
which can be taken as a proof that everything is consistent.
2023-03-03 08:15:19 +08:00
Andrea Bedini
4b6fed5d6a Drop PackageVersionMeta
It's not the right abstraction
2023-03-03 08:15:19 +08:00
Andrea Bedini
eaff46e671 Whitespace 2023-03-03 08:15:19 +08:00
Andrea Bedini
b35bbd26c9 More resiliant code 2023-03-03 08:15:19 +08:00
Ben Gamari
e3e34324ff Don't use lazy IO when reading .cabal files
Lazy IO tends to keep file handles open until the entire file is read,
which in this case may never happen. This leads to the process exceeding
the system's file descriptor limit, resulting in #35.
2023-03-01 13:42:52 -05:00
Andrea Bedini
b12a27a984 Use dir query parameter to include subdir into url 2023-02-20 13:42:28 +08:00
Andrea Bedini
1e45bfc0fa List package name and version separately in metadata 2023-02-20 12:15:08 +08:00
Andrea Bedini
2631bf6067 Implement metadata output.
Implement a new flag "--write-metadata" which will create, in the output
directory, a file "foliage/packages.json" with metadata about the
package provenance.

The file package.json file looks like this

```
{
  "Win32-network-0.1.0.0": {
    "source": {
      "url": "github:input-output-hk/Win32-network/3825d3abf75f83f406c1f7161883c438dac7277d"
    },
    "timestamp": "2022-10-17T00:00:00Z"
  },
  "Win32-network-0.1.1.0": {
    ...
```

The idea is that tools fetching the repo can also fetch this file to
obtain information about the package provenance.
2023-02-14 10:29:16 +08:00
Andrea Bedini
9995734db5 Write json metedata to output dir 2023-02-13 16:54:39 +08:00
Andrea Bedini
0993761f7f Clean up 2023-01-29 12:27:04 +08:00
Michael Peyton Jones
33a645bc3b
Build in parallel
This cuts the time to build `cardano-haskell-packages` down to 30s from
>2mins.
2022-12-16 15:15:42 +00:00
Andrea Bedini
72f2efc615 Improve web pages 2022-10-27 12:19:37 +08:00
Andrea Bedini
37022542cc Rename summary to contents 2022-10-26 17:18:36 +08:00
Andrea Bedini
c0714b1b3d Finish off pages
- Summary page has the list of all packages available (with details of the latest version)
- Timeline page has the list of all entries as they appear in the index

Also:
- Rebuild sdists is they are missing
2022-10-26 14:12:40 +08:00
Andrea Bedini
db3fe215de Restore index/ paths creation 2022-10-24 16:55:58 +08:00
Andrea Bedini
e57d6ba5a6 Index page 2022-10-21 16:46:50 +08:00
Andrea Bedini
f697629717 WIP fix botched rebase 2022-10-21 12:30:55 +08:00
Andrea Bedini
9f22d7295d First go at generating html pages 2022-10-21 11:37:20 +08:00
Andrea Bedini
572e37cb8e WIP 2022-10-21 11:36:47 +08:00
Andrea Bedini
9cc19c70ea Move json stuff to its own module 2022-10-14 09:28:31 +08:00
Andrea Bedini
678943d4b6 WIP 2022-10-14 07:56:59 +08:00
Andrea Bedini
1b3969a4f5 Drop PackageRule 2022-10-10 11:27:29 +08:00
Andrea Bedini
889e0b0ba0 Rework prepareSdist 2022-10-05 16:34:22 +08:00
Andrea Bedini
b13ecafb31 Merge remote-tracking branch 'new' 2022-10-05 15:13:15 +08:00
Andrea Bedini
9151ec36b2 Implement GitHub backend 2022-09-29 15:49:42 +02:00
Andrea Bedini
cbb726a6f5 Avoid partial functions 2022-09-29 15:49:07 +02:00