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

Latest go-toml doesn't work #3142

Closed
sasanrose opened this issue Mar 8, 2017 · 4 comments
Closed

Latest go-toml doesn't work #3142

sasanrose opened this issue Mar 8, 2017 · 4 comments
Labels
Milestone

Comments

@sasanrose
Copy link

sasanrose commented Mar 8, 2017

Using hugo v0.19 on linux and trying to create a new site, will generate an empty config.toml:

hugo new site .

I investigated the problem a little bit and it turned out that the a recent commit in go-toml broke the backward compatibility pelletier/go-toml@7e6e4b1

They changed the tree.String function and it now calls ToWrite which asserts each config value against tomlValue type that will fail.
I am not sure what is the correct way to fix it, but I like help if you give me some hints. For instance maybe change the default config defined in createConfig before sending it to TreeFromMap

@bep bep added the Bug label Mar 8, 2017
@bep bep added this to the v0.20 milestone Mar 8, 2017
@bep
Copy link
Member

bep commented Mar 8, 2017

Looks like it is Windows only? See #3146

@sasanrose
Copy link
Author

@bep I ran the same test on my Debian machine and here is the result (Well, part of it):

--- FAIL: TestNewContent (0.02s)
        content_test.go:68: [0] "title = \"Post Arch title\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [1] "test = \"test1\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [2] "date = \"2015-01-12T19:20:04-07:00\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [0] "title = \"Empty Date Arch title\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [1] "test = \"test1\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [0] "title = \"sample 2\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [0] "title = \"sample 3\"" missing from output:
                "+++\n\n+++\n\n"
        content_test.go:68: [0] "title = \"sample 4\"" missing from output:
                "+++\n\n+++\n\n"
FAIL
exit status 1
FAIL    github.com/spf13/hugo/create    0.029s

This was referenced Mar 8, 2017
@bep
Copy link
Member

bep commented Mar 8, 2017

OK, I'll assume you're not vendoring (i.e. using govendor and make check), which we also seem to have some issues with on the Windows build. The related PR also fails in the referenced PR, but now with an actual error message.

@bep bep removed the Bug label Mar 8, 2017
@bep bep changed the title go-toml: invalid key type at baseURL: string Latest go-toml doesn't work Mar 8, 2017
moorereason added a commit to moorereason/hugo that referenced this issue Mar 9, 2017
Remove "image" setting as the "WMF 5" image is deprecated.

Fixes gohugoio#3061, gohugoio#3142
bep pushed a commit that referenced this issue Mar 9, 2017
Remove "image" setting as the "WMF 5" image is deprecated.

Fixes #3061, #3142
bep added a commit to bep/hugo that referenced this issue Mar 12, 2017
bep added a commit to bep/hugo that referenced this issue Mar 12, 2017
@bep bep closed this as completed in d8923eb Mar 15, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants