hugo icon indicating copy to clipboard operation
hugo copied to clipboard

Issue with overlapping file mounts

Open bep opened this issue 5 years ago • 6 comments

I'm not sure what, but I see some odd behaviour when using it. Need to look into it.

bep avatar Apr 03 '20 14:04 bep

Note that is is about multiple, e.g. layouts mount in the same module -- not multiple modules (which I use all the time).

bep avatar Apr 03 '20 16:04 bep

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

stale[bot] avatar Aug 08 '20 07:08 stale[bot]

I can vouch for having this issue, especially with a multi-lingual site. When making multiple mounts from, say, the local (project) module, the behavior of the union file system is non-deterministic - e.g., sometimes I get files from the first mount, sometimes I get files from the second mount, etc.

This is especially relevant in a multi-lingual site where the content directories are mounted from the local project space, and there is module path overlap.

I'm happy to provide further specifics of what I see if it's helpful, but sounds like it's already a known issue

shauntarves avatar Feb 01 '21 20:02 shauntarves

@shauntarves, If you can put together a small demo site that reproduces the issue, it would be helpful.

moorereason avatar Feb 01 '21 21:02 moorereason

Hi @moorereason ,

Maybe I am just generally having issues understanding how the union virtual filesystem works. If I have the following content directory:

support/
  index.md
  images/
    banana.png

And then I import a module which attempts to override the banana.png with its own version, does that work? I've tried all kinds of import mount configurations, but it just doesn't seem to take. For example:

[[module.imports]]
  path = "github.com/starves/efe"
  disable = false
[[module.imports.mounts]]
  source = "content/support/images"
  target = "content/support/images"
[[module.imports.mounts]]
  source = "content/support/images/banana.png"
  target = "content/support/images/banana.png"
[[module.imports.mounts]]
  source = "content/support"
  target = "content/support"

Any thoughts?

shauntarves avatar Feb 01 '21 22:02 shauntarves

@bep Any chance you can help on this?

shauntarves avatar Feb 04 '21 16:02 shauntarves