yesodweb / yesodweb/persistent

persistent-template does not package up benchmark files

Open
#941 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

persistent-template currently does not package up the benchmark files as part of its Hackage release.

This manifests in the following failure when trying to run the benchmarks from the release package:

    /var/stackage/work/unpack-dir/unpacked/persistent-template-2.7.2-dd4aa468a9b26d3c0f64
261d0a238ff6b9adf9b4889e112709826a23b6abfd8d/bench/Main.hs:20:49: error:
        • Exception when trying to run compile-time code:
            bench/models-slowly: openFile: does not exist (No such file or directory)
          Code: persistFileWith lowerCaseSettings "bench/models-slowly"
        • In the untyped splice:
            $(persistFileWith lowerCaseSettings "bench/models-slowly")
       |
    20 |         [ bench "From File" $ nfIO $ mkPersist' $(persistFileWith lowerCaseSetti
ngs "bench/models-slowly")
       |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^

I believe the relevant line to add this is here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect persistent-template/persistent-template.cabal around line 15 and the benchmark paths named in the failure. Confirm how the Hackage release package is assembled, then verify that the benchmark files are included and the released benchmarks no longer fail because bench/models-slowly is missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, release
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.