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

Walk error when mount target more than one level down #6730

Closed
regisphilibert opened this issue Jan 8, 2020 · 6 comments · Fixed by #6839
Closed

Walk error when mount target more than one level down #6730

regisphilibert opened this issue Jan 8, 2020 · 6 comments · Fixed by #6839
Assignees
Milestone

Comments

@regisphilibert
Copy link
Member

regisphilibert commented Jan 8, 2020

When trying to map mounts with the following:

module:
  imports:
  - path: github.com/theNewDynamic/hugo-module-imgix
    mounts:
      - source: func
        target: layouts/partials/func
      - source: markup
        target: layouts/_markup
      - source: data
        target: data

I get

Error: add site dependencies: load resources: loading templates: walk: open "func" (""): file does not exist

func is the only failing mount, which might indicate it is due to it being in a"sub directory".
Might share some causes with #6209

Config

macOS Catalina 10.15.2 (19C57)
go version go1.12.4 darwin/amd64
Hugo Static Site Generator v0.62.2-83E50184/extended darwin/amd64 BuildDate: 2020-01-05T18:56:31Z

Repos

Project Test Repo: https://github.com/theNewDynamic/hugo-module-imgix/releases/tag/v0.0.1 (dedicated release)
Module Repo: https://github.com/theNewDynamic/hugo-module-imgix

Step to reproduce:

  1. Clone Project Test Repo
  2. Hit hugo or hugo serve using latest Hugo version.
@bep bep added the Bug label Jan 30, 2020
@bep bep added this to the v0.64 milestone Jan 30, 2020
@bep
Copy link
Member

bep commented Jan 30, 2020

Just tested this. The v0.0.1 tag is missing a config file, but both that and the master builds fine -- not sure what else to expect.

@regisphilibert
Copy link
Member Author

I'm sorry I think I mixed up test repos. Will clean that up and get back to you with better "testing" material.

@bep bep modified the milestones: v0.64, v0.65 Jan 31, 2020
@bep
Copy link
Member

bep commented Jan 31, 2020

Never mind, I can reproduce this myself.

@regisphilibert
Copy link
Member Author

regisphilibert commented Jan 31, 2020

I just created the new repos though... You can do what you want with them.

Project: https://github.com/regisphilibert/hugo-6730
Module: https://github.com/regisphilibert/hugo-6730--module

bep added a commit to bep/hugo that referenced this issue Jan 31, 2020
bep added a commit to bep/hugo that referenced this issue Jan 31, 2020
Also make the Walker more robust in "file not found" situations.

Fixes gohugoio#6730
@bep bep self-assigned this Jan 31, 2020
@bep bep changed the title Module: Error when mount target is in sub folder Walk error when mount target is in sub folder Jan 31, 2020
@bep
Copy link
Member

bep commented Jan 31, 2020

@regisphilibert OK, so this is a bug and I have a fix for this. There is one caveat, though, that I don't think I'm going to address, at least not now.

So, for the filesystems that do directory walking (layouts, data, content):

This worked:

 target: layouts/partials

This failed:

 target: layouts/partials/func

@bep bep closed this as completed Jan 31, 2020
@bep bep changed the title Walk error when mount target is in sub folder Walk error when mount target more than one level down Jan 31, 2020
@bep bep reopened this Jan 31, 2020
bep added a commit to bep/hugo that referenced this issue Feb 2, 2020
Also make the Walker more robust in "file not found" situations.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
bep added a commit to bep/hugo that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes gohugoio#6730
@bep bep closed this as completed in #6839 Feb 3, 2020
bep added a commit that referenced this issue Feb 3, 2020
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes #6730
@github-actions
Copy link

github-actions bot commented Feb 8, 2022

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 Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants