Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master -> central-server 11/2024 #1341

Merged
merged 79 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
aec125c
Bump cachix/cachix-action from 12 to 13
dependabot[bot] Dec 4, 2023
92f0451
Bump cachix/install-nix-action from 23 to 24
dependabot[bot] Dec 4, 2023
f939e97
feat: Add support for sublibrary module listings
414owen Dec 30, 2023
9b8be6f
Merge pull request #1279 from 414owen/os/support-sublibrary-mods-sigs
gbaz Dec 30, 2023
fc4ec43
feat: Specify component types in detailed deps page
414owen Jan 1, 2024
aa9ab98
check `nix develop` shell in GitHub Action
peterbecich Jan 11, 2024
898b521
Merge pull request #1284 from peterbecich/check-nix-develop-in-github…
peterbecich Jan 11, 2024
c4655d2
update Nix Flake
peterbecich Jan 12, 2024
e6d4cfe
Merge pull request #1285 from peterbecich/update-nix-flake
peterbecich Jan 12, 2024
6b71d16
Migrate to tar-0.6
Bodigrim Jan 7, 2024
ff6c6c6
Merge pull request #1271 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jan 12, 2024
1daf748
Merge pull request #1270 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jan 12, 2024
4ec595c
Bump cachix/cachix-action from 13 to 14
dependabot[bot] Jan 15, 2024
729e667
Bump cachix/install-nix-action from 24 to 25
dependabot[bot] Jan 15, 2024
9540c0c
auto-approve Dependabot
peterbecich Jan 18, 2024
219af1c
Merge pull request #1288 from peterbecich/auto-approve-dependabot
peterbecich Jan 18, 2024
bcd5feb
Merge pull request #1286 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jan 18, 2024
97a66b8
Merge pull request #1287 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jan 18, 2024
fe13617
Merge pull request #1283 from haskell/tar-0.6
ysangkok Jan 21, 2024
cf764e1
Bump actions/cache from 3 to 4
dependabot[bot] Jan 22, 2024
5988f76
Merge pull request #1289 from haskell/dependabot/github_actions/actio…
ysangkok Jan 22, 2024
c44fc6e
`nix flake update`
peterbecich Jan 28, 2024
991f21d
Merge pull request #1290 from peterbecich/nix-flake-update
peterbecich Jan 28, 2024
95a3c9d
feature: add 'reporting vulnerabilities' link on package pages (haske…
blackheaven Feb 8, 2024
f672a3d
`nix flake update`
peterbecich Mar 8, 2024
66b13d9
fix badge
peterbecich Mar 8, 2024
7ca3dd8
Merge pull request #1293 from peterbecich/nix-flake-update
peterbecich Mar 8, 2024
4f22c4d
Make an exception for bzip2 licenses
hasufell Mar 9, 2024
204b69a
Bump cachix/install-nix-action from 25 to 26
dependabot[bot] Mar 11, 2024
dc00b48
Merge pull request #1297 from haskell/dependabot/github_actions/cachi…
peterbecich Mar 23, 2024
be8af5b
`nix flake update` (#1301)
peterbecich Mar 23, 2024
5f94939
fix Flake (#1302)
peterbecich Mar 23, 2024
3ce2fe8
fix Flake (#1303)
peterbecich Mar 23, 2024
e36f969
fix Flake (#1304)
peterbecich Mar 23, 2024
46758c7
revert Flake update to f672a3d
peterbecich Mar 24, 2024
0b20673
Merge pull request #1306 from peterbecich/revert-flake
peterbecich Mar 24, 2024
b1523b3
Bump dependabot/fetch-metadata from 1 to 2
dependabot[bot] Mar 25, 2024
19b4737
Merge pull request #1307 from haskell/dependabot/github_actions/depen…
peterbecich Apr 6, 2024
7c8b019
Add Tested-With to package page
ysangkok Apr 7, 2024
88de93c
Merge pull request #1308 from haskell/janus/tested-with
ysangkok Apr 17, 2024
a62f180
Bump cachix/cachix-action from 14 to 15
dependabot[bot] May 20, 2024
2fd51cd
Bump cachix/install-nix-action from 26 to 27
dependabot[bot] May 20, 2024
bf960e7
Merge pull request #1313 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jun 1, 2024
a6bd75a
Merge pull request #1312 from haskell/dependabot/github_actions/cachi…
dependabot[bot] Jun 1, 2024
ec69e3a
check `nix develop` shell is working in GitHub Action
peterbecich Jun 20, 2024
9c28148
Merge pull request #1316 from peterbecich/check-develop-shell
peterbecich Jun 20, 2024
0b0aab7
`nix flake update`
peterbecich Jun 20, 2024
1037f20
Merge pull request #1317 from peterbecich/update-flake-3
peterbecich Jun 20, 2024
081a103
fix quote color
peterbecich Jun 22, 2024
bc548b5
improve contrast ratio
peterbecich Jun 22, 2024
bb3b5ad
simplify Nix workflow
peterbecich Jun 22, 2024
abdde44
simple package mirroring workflow
peterbecich Jun 22, 2024
6dbd9ed
Merge pull request #1320 from peterbecich/simplify-nix-workflow
peterbecich Jun 22, 2024
4d5aebe
Merge pull request #1319 from peterbecich/fix-quote-color
peterbecich Jun 22, 2024
7fd400b
more simplification of Nix Flake
peterbecich Jun 23, 2024
bec983d
Merge pull request #1321 from peterbecich/more-flake-simplification
peterbecich Jun 23, 2024
d9ed57d
style: Apply input padding spacing tweaks
414owen Jan 3, 2024
7b34592
Merge pull request #1281 from 414owen/os/input-padding-and-colour
ysangkok Jun 25, 2024
6146b5f
Clean cabal.project
andreasabel Jul 2, 2024
a2bccea
Default library (hackage-server) instead of internal library lib-server
andreasabel Jul 2, 2024
66e7c9e
.cabal: remove outdated conditional
andreasabel Jul 2, 2024
c7f3edd
Tags feature: replace some clumsy code
andreasabel Jul 2, 2024
c322e12
Support Cabal-3.12 and GHC 9.10
andreasabel Jul 2, 2024
54f3385
Commit to Cabal-3.12.1.0
andreasabel Jul 3, 2024
8a8d739
Merge pull request #1322 from haskell/Cabal-3.12
ysangkok Jul 5, 2024
c0de63c
update Nix Flake with Cabal 3.12
peterbecich Jul 20, 2024
adfcbd9
cabal-install
peterbecich Jul 20, 2024
e9831a7
fix `nix develop` shell
peterbecich Jul 26, 2024
c0735c1
Merge pull request #1323 from peterbecich/nix-cabal-3.12
peterbecich Jul 26, 2024
ef574c0
remove unnecessary Nix cache
peterbecich Aug 11, 2024
73cf952
Merge pull request #1328 from peterbecich/remove-unneeded-resolver
peterbecich Aug 11, 2024
88b384a
Merge pull request #1292 from blackheaven/feature/report-vuln-button
ysangkok Sep 8, 2024
4796040
Merge pull request #1280 from 414owen/os/revamp-detailed-deps-page
ysangkok Sep 8, 2024
9013cfd
Merge pull request #1296 from hasufell/issue-1294
ysangkok Sep 8, 2024
4ebc59f
Bump cachix/install-nix-action from V27 to 28
dependabot[bot] Sep 16, 2024
bc29c61
Merge pull request #1331 from haskell/dependabot/github_actions/cachi…
peterbecich Sep 25, 2024
3d4b921
Bump cachix/install-nix-action from V28 to 30
dependabot[bot] Oct 7, 2024
5b0d3b0
Merge pull request #1336 from haskell/dependabot/github_actions/cachi…
peterbecich Oct 17, 2024
4b11c7a
Merge branch 'central-server' into master2central-nov2024
gbaz Nov 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
34 changes: 19 additions & 15 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/andreasabel/haskell-ci
#
# version: 0.17.20231012
# version: 0.19.20240630
#
# REGENDATA ("0.17.20231012",["github","hackage-server.cabal"])
# REGENDATA ("0.19.20240630",["github","hackage-server.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand Down Expand Up @@ -74,11 +79,10 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev libgd-dev
env:
Expand All @@ -98,7 +102,7 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
Expand Down Expand Up @@ -183,15 +187,15 @@ jobs:
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|hackage-server|parsec|process|text)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -221,7 +225,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/nix-flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
nix:
strategy:
fail-fast: false
fail-fast: true
matrix:
os:
- ubuntu-latest
Expand All @@ -18,16 +18,23 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY=
substituters = https://hydra.iohk.io https://cache.nixos.org/ https://hackage-server.cachix.org/
- uses: cachix/cachix-action@v12
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hackage-server.cachix.org-1:iw0iRh6+gsFIrxROFaAt5gKNgIHejKjIfyRdbpPYevY=
substituters = https://cache.nixos.org/ https://hackage-server.cachix.org/
- uses: cachix/cachix-action@v15
with:
# https://nix.dev/tutorials/continuous-integration-github-actions#setting-up-github-actions
name: hackage-server
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: "Check `nix develop` shell"
run: nix develop --check

- name: "Check `nix develop` shell can run command"
run: nix develop --command "echo"

- run: nix build

- continue-on-error: false
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
central-server branch: the hackage.haskell.org instance
=======================================================

This is the branch for the "official" Hackage server at hackage.haskell.org. Most changes should not be here, but should be made to master.

# General Documentation
=======
[![Build Status](https://travis-ci.org/haskell/hackage-server.png?branch=master)](https://travis-ci.org/haskell/hackage-server)
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/haskell-ci.yml)
[![Build status](https://github.com/haskell/hackage-server/actions/workflows/nix-shell.yml/badge.svg)](https://github.com/haskell/hackage-server/actions/workflows/nix-shell.yml)
20 changes: 0 additions & 20 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ packages:

-- This project config requires cabal 2.4 or later

-- If in doubt, use GHC 8.8 to build hackage-server; see
-- 'tested-with' in 'hackage-server.cabal' for a list of currently
-- CI-validated GHC versions
--
-- with-compiler: ghc-8.8


allow-newer: rss:time, rss:base

-- Andreas, 2022-10-28: `Cabal-3.8.1.0` wants `process >= 1.6.14`
-- which is too new for the `ghc < 9.4` package that is pulled in
-- by `doctest-parallel`.
-- Since, Cabal-3.8.1.0 has no reason to want such a new version
-- of process, we can solve the conflict here by allowing
-- `Cabal` to use the shipped version of `process`.
-- This workaround can be removed once `Cabal-3.8` drops
-- its (unreasonable) constraint on `process`.
-- See: https://github.com/haskell/cabal/issues/8554
allow-older: Cabal:process

-----------------------------------------------------------------------------
-- Anti-constraints

Expand Down
46 changes: 42 additions & 4 deletions datafiles/static/hackage.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,28 @@ h4 { font-size: 100%; /* 13px */ }
h5 { font-size: 100%; /* 13px */ }
h6 { font-size: 100%; /* 13px */ }

select, input, button, textarea {
select, input, button, textarea, input::file-selector-button {
font-size: 1rem;
margin: 0.5em;
padding: 0.1em;
padding: 0.5em 0.8em;
border: 1px solid #444;
border-radius: 3px;
background: #eee;
}

select:hover, input:hover, button:hover, textarea:hover, input::file-selector-button:hover {
background: #dcdcdc;
}

input[type=file] {
background: none;
border: 0;
}

@media (prefers-color-scheme: dark) {
select, input, button, textarea, input::file-selector-button {
border: 0;
}
}

table {
Expand Down Expand Up @@ -267,9 +285,21 @@ pre + pre {
margin-top: 0.5em;
}

@media (prefers-color-scheme: dark) {
blockquote {
border-left: 3px solid #2f2842;
background-color: #4c4771;
}
}

@media (prefers-color-scheme: light) {
blockquote {
border-left: 3px solid #c7a5d3;
background-color: #eee4f1;
}
}

blockquote {
border-left: 3px solid #c7a5d3;
background-color: #eee4f1;
margin: 0.5em;
padding: 0.0005em 0.3em 0.5em 0.5em;
}
Expand Down Expand Up @@ -1147,6 +1177,14 @@ a.deprecated[href]:visited {
color: #61B01E;
}

.lib-contents {
margin-left: 20px;
}

.lib-contents > h3 {
margin: 0.7em 0;
}

/* Paginator */
#paginatorContainer {
display: flex;
Expand Down
10 changes: 10 additions & 0 deletions datafiles/templates/Html/package-page.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<div style="font-size: small">
[ $tags$ ]
[ <a href="/package/$package.name$/tags/edit">Propose Tags</a> ]
[ <a href="https://github.com/haskell/security-advisories/blob/main/CONTRIBUTING.md">Report a vulnerability</a> ]
</div>

$if(isDeprecated)$
Expand Down Expand Up @@ -139,6 +140,15 @@
<td>$package.buildDepends$</td>
</tr>

$if(package.optional.hasTestedWith)$
<tr>
<th>Tested with</th>
<td class="word-wrap">
$package.optional.testedWith$
</td>
</tr>
$endif$

<tr>
<th>License</th>
<td class="word-wrap">$package.license$</td>
Expand Down
14 changes: 13 additions & 1 deletion exes/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{-# LANGUAGE CPP #-}

{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}

module Main where

import qualified Distribution.Server as Server
Expand Down Expand Up @@ -65,7 +68,11 @@ main :: IO ()
main = topHandler $ do
hSetBuffering stdout LineBuffering
args <- getArgs
#if !MIN_VERSION_Cabal(3,12,0)
case commandsRun (globalCommand commands) commands args of
#else
commandsRun (globalCommand commands) commands args >>= \case
#endif
CommandHelp help -> printHelp help
CommandList opts -> printOptionsList opts
CommandErrors errs -> printErrors errs
Expand All @@ -79,6 +86,7 @@ main = topHandler $ do

where
printHelp help = getProgName >>= putStr . help
printOptionsList :: [String] -> IO ()
printOptionsList = putStr . unlines
printErrors errs = do
putStr (intercalate "\n" errs)
Expand Down Expand Up @@ -154,7 +162,11 @@ optionVerbosity getter setter =
"Control verbosity (n is 0--3, default verbosity level is 1)"
getter setter
(optArg "n" (fmap Flag Verbosity.flagToVerbosity)
(Flag Verbosity.verbose)
(
#if MIN_VERSION_Cabal(3,12,0)
show Verbosity.verbose,
#endif
Flag Verbosity.verbose)
(fmap (Just . showForCabal) . flagToList))

optionStateDir :: (a -> Flag FilePath)
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading