Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

This repo and the tutorial on the website are out of sync. Tutorial code will not compile. #123

Open
amackillop opened this issue Mar 13, 2019 · 0 comments

Comments

@amackillop
Copy link

The link to download this repo located here (as of 2019-03-12) as 'Play Starter Example Project' is out of sync with the rest of the tutorial that follows. This leads to the project being unable to compile if the instructions are followed exactly.

For example, the instructions for making the hello.scala.html here:

@main("Hello") {
    <section id="top">
        <div class="wrapper">
            <h1>Hello World</h1>
        </div>
    </section>
}

will not work because the main.scala.html template expects another explicit parameter which is an AssetsFinder. From source file here:

@(title: String, assetsFinder: AssetsFinder)(content: Html)

The solution is that you need to accept this parameter as an implicit and then pass it to main explicitly like so:

@()(implicit assetsFinder: AssetsFinder)

@main("Hello", assetsFinder) {
<section id="top">
    <div class="wrapper">
        <h1>Hello World</h1>
    </div>
</section>
}

Long story short, I think that either the download link or the tutorial instructions need to be updated in order to resolve this issue.

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

No branches or pull requests

1 participant