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

File deleted from _site/ during watch if not changed #418

Closed
fserb opened this issue May 8, 2023 · 7 comments
Closed

File deleted from _site/ during watch if not changed #418

fserb opened this issue May 8, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@fserb
Copy link
Contributor

fserb commented May 8, 2023

Version

1.17.0

Platform

mac

What steps will reproduce the bug?

This is my minimal repro. _config.js:

import lume from "lume/mod.ts";

const site = lume();
site.copy([".js"]); // it also works if you do terser, for example, and also with css copy or css postcss.
export default site;

create a file a.js with a anything on it and run lume -w.

If you check, there will be a _site/a.js file with the correct content.

Now in a separate terminal, run touch a.js. Lume will show:

Changes detected:
- /a.js

but now the file disappears from _site. If you actually change a.js content, then everything works as expected (the file gets updated).

How often does it reproduce? Is there a required condition?

I tried to look into the code and I have no idea how this can be happening, so maybe is some weird OS-specific, thing? I've created a new project from scratch and I'm always able to repro.

What is the expected behavior?

The file to stay on _site when it changed but the content hasn't changed.

What do you see instead?

The file disappears from _site until I re-run lume.

Additional information

No response

@fserb fserb added the bug Something isn't working label May 8, 2023
@oscarotero
Copy link
Member

Thanks for opening this issue. I can confirm it's a bug on Lume 1.17, sorry for the trouble.
I will fix it ASAP.

@oscarotero
Copy link
Member

Fixed in v1.17.1.

@fserb
Copy link
Contributor Author

fserb commented May 25, 2023

Btw, I'm still getting errors like this, where the file disappears from _site if it's saved again but was supposed to generate the same output.

@oscarotero
Copy link
Member

Is there any way to reproduce the error?

@fserb
Copy link
Contributor Author

fserb commented May 25, 2023

Use the exact same set up as before, but instead of a.js, do it with index.md.
If it's any other .md it works fine, but if it's called index.md (and becomes index.html), then the same problem happens.

@fserb
Copy link
Contributor Author

fserb commented May 25, 2023

(btw, I can't re-open the bug)

@oscarotero
Copy link
Member

Fixed in 1.17.4
Sorry for the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants