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

Dependency checking regression #907

Closed
jtojnar opened this issue Nov 28, 2021 · 5 comments · Fixed by #909
Closed

Dependency checking regression #907

jtojnar opened this issue Nov 28, 2021 · 5 comments · Fixed by #909
Labels

Comments

@jtojnar
Copy link
Contributor

jtojnar commented Nov 28, 2021

When I try to to build my site with Hakyll 4.15.1.0, it fails as follows:

Build log on 4.15.1.0
$ cabal run -- site rebuild -v
Removing _site...
Removing _cache...
Removing _cache/tmp...
Initialising...
  Creating store...
  Creating provider...
  Running rules...
Checking for out-of-date items
  [DEBUG] content/cs/news/2021-11-22-website-launch.md is out-of-date because it is new
  [DEBUG] content/cs/news/index.html is out-of-date because it is new
  [DEBUG] content/en/news/2021-11-22-website-launch.md is out-of-date because it is new
  [DEBUG] content/en/news/index.html is out-of-date because it is new
  [DEBUG] templates/layout.html is out-of-date because it is new
  [DEBUG] templates/post.html is out-of-date because it is new
  [DEBUG] templates/posts.html is out-of-date because it is new
  [DEBUG] content/cs/news/2021-11-22-website-launch.md (menu) is out-of-date because it is new
  [DEBUG] content/en/news/2021-11-22-website-launch.md (menu) is out-of-date because it is new
Compiling
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/news/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/cs/",CaptureMany,Literal ""]))) (fromList [content/cs/news/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/news/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/en/",CaptureMany,Literal ""]))) (fromList [content/en/news/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing templates/layout.html
  updated templates/layout.html
  [DEBUG] Processing templates/post.html
  updated templates/post.html
  [DEBUG] Processing templates/posts.html
  updated templates/posts.html
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md (menu)
  updated content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md (menu)
  updated content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/post.html
  [DEBUG] Compiler requirement found for: content/cs/news/2021-11-22-website-launch.md: templates/post.html (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/post.html
  [DEBUG] Compiler requirement found for: content/en/news/2021-11-22-website-launch.md: templates/post.html (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/news/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/news/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])) (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Compiler requirement found for: content/cs/news/2021-11-22-website-launch.md: content/cs/news/2021-11-22-website-launch.md (menu) (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])) (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Compiler requirement found for: content/en/news/2021-11-22-website-launch.md: content/cs/news/2021-11-22-website-launch.md (menu) (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/2021-11-22-website-launch.md (menu)])) (fromList [content/en/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Compiler requirement found for: content/cs/news/2021-11-22-website-launch.md: content/en/news/2021-11-22-website-launch.md (menu) (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/2021-11-22-website-launch.md (menu)])) (fromList [content/en/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Compiler requirement found for: content/en/news/2021-11-22-website-launch.md: content/en/news/2021-11-22-website-launch.md (menu) (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  updated content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/cs/news/2021-11-22-website-launch.html
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: content/cs/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  updated content/en/news/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/en/news/2021-11-22-website-launch.html
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: content/en/news/2021-11-22-website-launch.md (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: templates/posts.html (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: templates/posts.html (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/news/index.html: templates/layout.html (snapshot _final)
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/news/index.html: templates/layout.html (snapshot _final)
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/index.html (menu)])) (fromList [])
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/index.html (menu)])) (fromList [])
  [ERROR] Hakyll.Core.Runtime.pickAndChase: Dependency cycle detected: content/cs/news/index.html depends on [(content/cs/news/2021-11-22-website-launch.md,"_final")], content/en/news/index.html depends on [(content/en/news/2021-11-22-website-launch.md,"_final")]

It worked with hakyll 4.14.0.0

Build log on 4.14.0.0
$ cabal run -- site rebuild -v
Removing _site...
Removing _cache...
Removing _cache/tmp...
Initialising...
  Creating store...
  Creating provider...
  Running rules...
Checking for out-of-date items
  [DEBUG] content/cs/news/2021-11-22-website-launch.md is out-of-date because it is new
  [DEBUG] content/cs/news/index.html is out-of-date because it is new
  [DEBUG] content/en/news/2021-11-22-website-launch.md is out-of-date because it is new
  [DEBUG] content/en/news/index.html is out-of-date because it is new
  [DEBUG] templates/layout.html is out-of-date because it is new
  [DEBUG] templates/post.html is out-of-date because it is new
  [DEBUG] templates/posts.html is out-of-date because it is new
  [DEBUG] content/cs/news/2021-11-22-website-launch.md (menu) is out-of-date because it is new
  [DEBUG] content/en/news/2021-11-22-website-launch.md (menu) is out-of-date because it is new
Compiling
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/post.html
  [DEBUG] Require templates/post.html (snapshot _final): chasing
  [DEBUG] Processing templates/post.html
  updated templates/post.html
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Require templates/post.html (snapshot _final): OK
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Require templates/layout.html (snapshot _final): chasing
  [DEBUG] Processing templates/layout.html
  updated templates/layout.html
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Require templates/layout.html (snapshot _final): OK
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])) (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Require content/cs/news/2021-11-22-website-launch.md (menu) (snapshot _final): chasing
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md (menu)
  updated content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Require content/cs/news/2021-11-22-website-launch.md (menu) (snapshot _final): OK
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/2021-11-22-website-launch.md (menu)])) (fromList [content/en/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Require content/en/news/2021-11-22-website-launch.md (menu) (snapshot _final): chasing
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md (menu)
  updated content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Require content/en/news/2021-11-22-website-launch.md (menu) (snapshot _final): OK
  [DEBUG] Processing content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  updated content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/cs/news/2021-11-22-website-launch.html
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/news/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/cs/",CaptureMany,Literal ""]))) (fromList [content/cs/news/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Require content/cs/news/2021-11-22-website-launch.md (snapshot _final): OK
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Require templates/posts.html (snapshot _final): chasing
  [DEBUG] Processing templates/posts.html
  updated templates/posts.html
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Require templates/posts.html (snapshot _final): OK
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Require templates/layout.html (snapshot _final): OK
  [DEBUG] Processing content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/index.html (menu)])) (fromList [])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/index.html (menu)])) (fromList [])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/index.html
  updated content/cs/news/index.html
  [DEBUG] Routed to _site/cs/news/index.html
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/post.html
  [DEBUG] Require templates/post.html (snapshot _final): OK
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Require templates/layout.html (snapshot _final): OK
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])) (fromList [content/cs/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Require content/cs/news/2021-11-22-website-launch.md (menu) (snapshot _final): OK
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/2021-11-22-website-launch.md (menu)])) (fromList [content/en/news/2021-11-22-website-launch.md (menu)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md (menu)
  [DEBUG] Require content/en/news/2021-11-22-website-launch.md (menu) (snapshot _final): OK
  [DEBUG] Processing content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  updated content/en/news/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/en/news/2021-11-22-website-launch.html
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/news/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/en/",CaptureMany,Literal ""]))) (fromList [content/en/news/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Require content/en/news/2021-11-22-website-launch.md (snapshot _final): OK
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Require templates/posts.html (snapshot _final): OK
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Require templates/layout.html (snapshot _final): OK
  [DEBUG] Processing content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/news/index.html (menu)])) (fromList [])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/news/index.html (menu)])) (fromList [])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/news/index.html
  updated content/en/news/index.html
  [DEBUG] Routed to _site/en/news/index.html
Success
  [DEBUG] Removing tmp directory...

There is no cycle, according to the graph generated by #906:

Dependency graph
digraph {
    subgraph "cluster_content/cs/news/2021-11-22-website-launch.md" {
        "content/cs/news/2021-11-22-website-launch.md";
        "content/cs/news/2021-11-22-website-launch.md (menu)";
    }
    subgraph "cluster_content/cs/news/index.html" {
        "content/cs/news/index.html";
    }
    subgraph "cluster_content/en/news/2021-11-22-website-launch.md" {
        "content/en/news/2021-11-22-website-launch.md";
        "content/en/news/2021-11-22-website-launch.md (menu)";
    }
    subgraph "cluster_content/en/news/index.html" {
        "content/en/news/index.html";
    }
    subgraph "cluster_templates/layout.html" {
        "templates/layout.html";
    }
    subgraph "cluster_templates/post.html" {
        "templates/post.html";
    }
    subgraph "cluster_templates/posts.html" {
        "templates/posts.html";
    }
    "content/cs/news/2021-11-22-website-launch.md" -> "templates/layout.html" [label=_final];
    "content/cs/news/2021-11-22-website-launch.md" -> "templates/post.html" [label=_final];
    "content/cs/news/2021-11-22-website-launch.md" -> "content/cs/news/2021-11-22-website-launch.md (menu)" [label=_final];
    "content/cs/news/2021-11-22-website-launch.md" -> "content/en/news/2021-11-22-website-launch.md (menu)" [label=_final];
    "content/cs/news/index.html" -> "content/cs/news/2021-11-22-website-launch.md" [label=_final];
    "content/cs/news/index.html" -> "templates/layout.html" [label=_final];
    "content/cs/news/index.html" -> "templates/posts.html" [label=_final];
    "content/en/news/2021-11-22-website-launch.md" -> "templates/layout.html" [label=_final];
    "content/en/news/2021-11-22-website-launch.md" -> "templates/post.html" [label=_final];
    "content/en/news/2021-11-22-website-launch.md" -> "content/cs/news/2021-11-22-website-launch.md (menu)" [label=_final];
    "content/en/news/2021-11-22-website-launch.md" -> "content/en/news/2021-11-22-website-launch.md (menu)" [label=_final];
    "content/en/news/index.html" -> "content/en/news/2021-11-22-website-launch.md" [label=_final];
    "content/en/news/index.html" -> "templates/layout.html" [label=_final];
    "content/en/news/index.html" -> "templates/posts.html" [label=_final];
}

I recommend xdot for viewing the graphs. Edotor works in the web browser but does not support highlighting adjacent edges. Passing -f fdp to xdot might lay out the graph slightly more manageably.

POC code: https://github.com/jtojnar/repro/tree/main/hakyll-poc-messed-cycle


Bisect points to 142fc79

cc @LaurentRDC

@Minoru Minoru added the bug label Nov 29, 2021
@LaurentRDC
Copy link
Collaborator

Hi @jtojnar,

The current implementation of dependency cycle checking does not handle graphs. Instead, a dependency cycle is detected when the runtime state reaches a fixed point, that is, if the state does not evolve over two consecutive steps.

Currently, the detection of the fixed point is based on the length of the list of items remaining to process. I'm guessing that the problem is that this does not identify fixed points correctly, and that your example is a false positive.

I don't have much free time these days. It would be very helpful if you could reduce your example to an absolute smallest example which I can add as a test case, and work on a fix from there. Is this possible?

@jtojnar
Copy link
Contributor Author

jtojnar commented Nov 30, 2021

I tried simplifying it a bit more. I also updated the graph generator to distinguish the non-done (dashed borders) nodes from the done (thicker borders). Looks like only the root nodes remain to be done:

image

I tried to dump the deps and reqs and it appears that at the end, both are empty lists, hence unable to advance:

Log
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html,templates/layout.html,templates/posts.html,content/cs/2021-11-22-website-launch.md (destination),content/en/2021-11-22-website-launch.md (destination)]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/cs/",CaptureMany,Literal ""]))) (fromList [content/cs/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/en/",CaptureMany,Literal ""]))) (fromList [content/en/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing templates/layout.html
  updated templates/layout.html
  [DEBUG] Processing templates/posts.html
  updated templates/posts.html
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md (destination)
  updated content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Processing content/en/2021-11-22-website-launch.md (destination)
  updated content/en/2021-11-22-website-launch.md (destination)
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/2021-11-22-website-launch.md (destination)])) (fromList [content/cs/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: content/cs/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/2021-11-22-website-launch.md (destination)])) (fromList [content/cs/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: content/cs/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/2021-11-22-website-launch.md (destination)])) (fromList [content/en/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: content/en/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/2021-11-22-website-launch.md (destination)])) (fromList [content/en/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: content/en/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  updated content/cs/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/cs/2021-11-22-website-launch.html
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  updated content/en/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/en/2021-11-22-website-launch.html
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: templates/posts.html (snapshot _final)
  deps: []
  reqs: [(templates/posts.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/en/index.html: templates/posts.html (snapshot _final)
  deps: []
  reqs: [(templates/posts.html,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/index.html: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
[ERROR] Hakyll.Core.Runtime.pickAndChase: Dependency cycle detected: content/cs/index.html depends on [(content/cs/2021-11-22-website-launch.md,"_final")], content/en/index.html depends on [(content/en/2021-11-22-website-launch.md,"_final")]
Patch
diff --git a/lib/Hakyll/Core/Runtime.hs b/lib/Hakyll/Core/Runtime.hs
index 0d05e5b..86ffd22 100644
--- a/lib/Hakyll/Core/Runtime.hs
+++ b/lib/Hakyll/Core/Runtime.hs
@@ -214,8 +214,10 @@ scheduleOutOfDate = do
 --------------------------------------------------------------------------------
 pickAndChase :: Runtime ()
 pickAndChase = do
+    logger <- runtimeLogger <$> ask
     todo <- runtimeTodo <$> getRuntimeState
     unless (null todo) $ do
+        Logger.debug logger ("todo: " ++ show (M.keys todo))
         acted <- mconcat <$> forConcurrently (M.keys todo) chase
         when (acted == Idled) $ do
             -- This clause happens when chasing *every item* in `todo` resulted in 
@@ -375,6 +377,9 @@ chase id' = do
                 , runtimeFullDependencies = M.insertWith S.union id' (S.fromList reqs) (runtimeFullDependencies s)
                 }
 
+            Logger.debug logger ("deps: " ++ show deps)
+            Logger.debug logger ("reqs: " ++ show reqs)
+
             -- Progress has been made if at least one of the 
             -- requirements can move forwards at the next pass
             let progress | length deps < length reqs = Progressed

@jtojnar
Copy link
Contributor Author

jtojnar commented Nov 30, 2021

I can make it succeed by considering empty deps as progressed, however, I am not sure if that is correct.

--- a/lib/Hakyll/Core/Runtime.hs
+++ b/lib/Hakyll/Core/Runtime.hs
@@ -377,7 +379,7 @@ chase id' = do
 
             -- Progress has been made if at least one of the 
             -- requirements can move forwards at the next pass
-            let progress | length deps < length reqs = Progressed
+            let progress | length deps < length reqs || null deps = Progressed
                          | otherwise                 = Idled
 
             return progress
Log
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html,templates/layout.html,templates/posts.html,content/cs/2021-11-22-website-launch.md (destination),content/en/2021-11-22-website-launch.md (destination)]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/cs/",CaptureMany,Literal ""]))) (fromList [content/cs/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Storing snapshot: content
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (And (Glob [Literal "content/",Capture,Literal "/",Capture,Literal ".md"]) (And (Version Nothing) (Glob [Literal "content/en/",CaptureMany,Literal ""]))) (fromList [content/en/2021-11-22-website-launch.md])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing templates/layout.html
  updated templates/layout.html
  [DEBUG] Processing templates/posts.html
  updated templates/posts.html
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md (destination)
  updated content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Processing content/en/2021-11-22-website-launch.md (destination)
  updated content/en/2021-11-22-website-launch.md (destination)
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/2021-11-22-website-launch.md (destination)])) (fromList [content/cs/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: content/cs/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/2021-11-22-website-launch.md (destination)])) (fromList [content/cs/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: content/cs/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/2021-11-22-website-launch.md (destination)])) (fromList [content/en/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/cs/2021-11-22-website-launch.md: content/en/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/cs/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/2021-11-22-website-launch.md (destination)])) (fromList [content/en/2021-11-22-website-launch.md (destination)])
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md (destination)
  [DEBUG] Compiler requirement found for: content/en/2021-11-22-website-launch.md: content/en/2021-11-22-website-launch.md (destination) (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md (destination),"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: [(content/en/2021-11-22-website-launch.md,"_final")]
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/2021-11-22-website-launch.md,content/cs/index.html,content/en/2021-11-22-website-launch.md,content/en/index.html]
  [DEBUG] Processing content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  updated content/cs/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/cs/2021-11-22-website-launch.html
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: content/cs/2021-11-22-website-launch.md (snapshot _final)
  deps: []
  reqs: [(content/cs/2021-11-22-website-launch.md,"_final")]
  [DEBUG] Processing content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  updated content/en/2021-11-22-website-launch.md
  [DEBUG] Routed to _site/en/2021-11-22-website-launch.html
  [DEBUG] Processing content/en/index.html
  [DEBUG] Compiler requirement found for: content/en/index.html: content/en/2021-11-22-website-launch.md (snapshot _final)
  deps: []
  reqs: [(content/en/2021-11-22-website-launch.md,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: templates/posts.html (snapshot _final)
  deps: []
  reqs: [(templates/posts.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/2021-11-22-website-launch.md
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/posts.html
  [DEBUG] Compiler requirement found for: content/en/index.html: templates/posts.html (snapshot _final)
  deps: []
  reqs: [(templates/posts.html,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/cs/index.html: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency templates/layout.html
  [DEBUG] Compiler requirement found for: content/en/index.html: templates/layout.html (snapshot _final)
  deps: []
  reqs: [(templates/layout.html,"_final")]
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/cs/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: PatternDependency (List (fromList [content/en/index.html (destination)])) (fromList [])
  deps: []
  reqs: []
todo: [content/cs/index.html,content/en/index.html]
  [DEBUG] Processing content/cs/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/cs/index.html
  updated content/cs/index.html
  [DEBUG] Routed to _site/cs/index.html
  [DEBUG] Processing content/en/index.html
  [DEBUG] Hakyll.Core.Compiler.Internal: Adding dependency: IdentifierDependency content/en/index.html
  updated content/en/index.html
  [DEBUG] Routed to _site/en/index.html

@LaurentRDC
Copy link
Collaborator

I think this makes sense, and even further: what does an empty reqs really mean? Is CompilerRequire [] c valid?

Should we just run c if reqs is empty? I think so, but I can't play around right now (maybe tonight). You can give it a go if you want

@LaurentRDC
Copy link
Collaborator

LaurentRDC commented Nov 30, 2021

Ahh yes, look here:

modifyRuntimeState $ \s -> s
                { runtimeTodo         = M.insert id'
                    (if null deps then c else compilerResult result) -- <----------- if null deps then move on to computing c
                    (runtimeTodo s)
                 -- We track dependencies only to inform users when an infinite loop is detected
                , runtimeDependencies = M.insertWith S.union id' (S.fromList deps) (runtimeDependencies s)
                }

which means that your fix most probably right and was an oversight on my part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants