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

Resource busy when creating multiple versions from one file #972

Closed
rqy2002 opened this issue Mar 7, 2023 · 1 comment
Closed

Resource busy when creating multiple versions from one file #972

rqy2002 opened this issue Mar 7, 2023 · 1 comment
Labels

Comments

@rqy2002
Copy link

rqy2002 commented Mar 7, 2023

I has bug #903 again. Using hakyll 4.15.1.1, I get

[ERROR] _cache\1358274680180442700 for Hakyll.Core.Resource.Provider.MetadataCache/posts\2022-10-30-test.md/metadata: Store.set: resource busy (file is locked)

every time I change the content of 2022-10-30-test.md and run stack run -- build.
But the bug does'nt appear when I rebuild all pages. Maybe it's since that the time between generating different versions are longer in this case ?
It doesn't depend on whether I use "-threaded" or not -- I get the same bug in both situation.

This bug occurs when I want to produce two version of a file, one page and one raw, as in the tutorial.

This is part of my site.hs:

  match "posts/*" $ version "raw" $ do
    route idRoute
    compile getResourceBody

  match "posts/*.md" $ do
    route $ setExtension "html"
    compile $ pandocCompiler'
      >>= loadAndApplyTemplate "templates/post.html" postCtx
      >>= loadAndApplyTemplate "templates/default.html" postCtx
      -- >>= relativizeUrls

(where pandocCompiler' is pandoc with some configuration).
I don't modify other parts in default site.hs.
If I remove the raw version, then the bug doesn't occur.

@Minoru
Copy link
Collaborator

Minoru commented Apr 27, 2023

Sorry for the long wait! The fix for #903 was made after 4.15.1.1, so that release is buggy. I just cut a new one, 4.16.0.0, which does include a fix. Please upgrade to that and if the bug persists, comment on #903 again so we can re-open it.

@Minoru Minoru closed this as completed Apr 27, 2023
@Minoru Minoru added the bug label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants