yesodweb/shakespeare

GHC does not detect changes to I18N message files

ygale opened this issue · 1 comments

ygale commented

If you change an I18N message file and then run stack build, nothing happens.

Reproduction:

File ShakespeareTest.hs:

{-# LANGUAGE
   OverloadedStrings
 , TemplateHaskell
 , MultiParamTypeClasses
 #-}
module ShakespeareTest where

import Text.Shakespeare.I18N
import Data.Text (Text)

data App = App
mkMessage "App" "messages" "en"

testMessage :: Text
testMessage = renderMessage App ["en"] MsgTest

File messages/en.msg:
Test: This is the original test.

  1. Make the above into a trivial stack project.
  2. Run stack build. The project builds.
  3. Change the contents of messages/en.msg to:
    Test: This is the changed test.
  4. Run stack build. Expected: The project rebuilds. Actual: Nothing happens.

Tested with shakespeare 2.0.19, with its provided stack.yaml on resolver lts-12.8, using a patched version of stack 1.9.1 including @snoyberg 's fix for detecting dependent files in GHC >= 8.4.

ygale commented

See also #230.