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

Fail to sync changed static mounts when mount target is in sub folder #6209

Closed
XhmikosR opened this issue Aug 14, 2019 · 3 comments · Fixed by #6223

Comments

@XhmikosR
Copy link
Contributor

commented Aug 14, 2019

Same as #6165 but now with v0.57.0.

Steps to reproduce:

  1. git clone https://github.com/twbs/bootstrap.git -b master-xmr-hugo-reload-error
  2. npm i
  3. npm run docs-serve
  4. Modify any file from the dist folder like dist/css/bootstrap.css

Result:

xmr@xmr-VirtualBox:~/Desktop/bootstrap$ npm run docs-serve

> bootstrap@4.3.1 docs-serve /home/xmr/Desktop/bootstrap
> hugo version && hugo server --port 9001 --disableFastRender

Hugo Static Site Generator v0.57.0-9B00E647 linux/amd64 BuildDate: 2019-08-14T08:06:27Z

                   | EN   
+------------------+-----+
  Pages            | 105  
  Paginator pages  |   0  
  Non-page files   |  20  
  Static files     | 125  
  Processed images |   0  
  Aliases          |  16  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 393 ms
Watching for changes in /home/xmr/Desktop/bootstrap/{dist,site}
Watching for config changes in /home/xmr/Desktop/bootstrap/config.yml
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:9001/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change of Static files detected, rebuilding site.
2019-08-14 16:06:50.025 +0300
Syncing /css/bootstrap.css to /
ERROR 2019/08/14 16:06:50 file does not exist

On Windows the path is different but the error the same:

C:\Users\xmr\Desktop\bootstrap>npm run docs-serve

> bootstrap@4.3.1 docs-serve C:\Users\xmr\Desktop\bootstrap
> hugo version && hugo server --port 9001 --disableFastRender

Hugo Static Site Generator v0.57.0-9B00E647 windows/amd64 BuildDate: 2019-08-14T08:05:40Z
Building sites …
                   | EN
+------------------+-----+
  Pages            | 105
  Paginator pages  |   0
  Non-page files   |  20
  Static files     | 125
  Processed images |   0
  Aliases          |  16
  Sitemaps         |   1
  Cleaned          |   0

Total in 375 ms
Watching for changes in C:\Users\xmr\Desktop\bootstrap\{dist,site}
Watching for config changes in C:\Users\xmr\Desktop\bootstrap\config.yml
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:9001/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change of Static files detected, rebuilding site.
2019-08-14 16:12:22.793 +0300
Syncing \css\bootstrap.css to C:\Users\xmr\Desktop\bootstrap\
ERROR 2019/08/14 16:12:22 file does not exist
ERROR 2019/08/14 16:12:22 file does not exist

@bep bep modified the milestones: v0.57, v0.57.1 Aug 14, 2019

@bep

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

OK, but this is a different case than #6165, which was:

    - source:           dist
      target:           static/dist

Your setup has "holes" in the directory structure, which makes them somehow unreachable:

    - source:           dist
      target:           static/docs/4.3/dist

Remember that this all ends up in one, big virtual filesystem, which is a tree of directories. I will have a look at this, but it looks a little odd.

@bep bep added Enhancement and removed NeedsInvestigation labels Aug 15, 2019

@bep bep changed the title File does not exist error with mounts using 0.57.0 Allow "holes" in the file mounts Aug 15, 2019

@XhmikosR

This comment has been minimized.

Copy link
Contributor Author

commented Aug 15, 2019

Ah, I see. I expected that to work already, but this explains why while investigating dropping the version folder from our structure causes failures.

This specific issue in that branch only affects watch mode; the build seems to be fine.

Thanks for looking into it!

@bep bep added Bug and removed Enhancement labels Aug 15, 2019

@bep bep changed the title Allow "holes" in the file mounts Fail to sync changed static mounts when mount target is in sub folder Aug 15, 2019

@bep

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

OK, a second look tells me that my original patch for this had some assumptions that didn't hold water very long. It's a bug, OK.

bep added a commit to bep/hugo that referenced this issue Aug 15, 2019

@bep bep closed this in #6223 Aug 15, 2019

bep added a commit that referenced this issue Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.