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

Absolute templates path #1691

Merged
merged 3 commits into from
Aug 9, 2020
Merged

Conversation

dten
Copy link
Contributor

@dten dten commented Aug 7, 2020

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

fixes #1690

i'm 99% certain this can't break any usages of widgetFileReload or widgetFileNoReload because those those Q Exp must have already been evaluated in the correct project. unless someone was jumping through a lot of hoops to run ghc manually

this will mean that files can be build from another directory whilst still finding the package's templates
Copy link
Member

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just a minor comment about version numbers

@@ -64,6 +66,11 @@ addStaticContentExternal minify hash staticDir toRoute ext' _ content = do
globFile :: String -> String -> FilePath
globFile kind x = "templates/" ++ x ++ "." ++ kind

-- | `globFile` but returned path is absolute and within the package the Q Exp is evaluated
-- @since 1.6.0.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this introduces a new identifier, the version number should be 1.6.1.0

@dten
Copy link
Contributor Author

dten commented Aug 9, 2020

sorted it :)

Copy link
Member

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snoyberg snoyberg merged commit eb5f7a9 into yesodweb:master Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

widgetFileReload cannot find "templates" directory when loaded from another dir
2 participants