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

Cache question: Rendered template is not change even if the .stpl file is changed #132

Open
0xqd opened this issue Aug 17, 2023 · 13 comments

Comments

@0xqd
Copy link

0xqd commented Aug 17, 2023

I'm on Windows, I'm not sure this is a known behaviour from the lib, or is there anyway that we can always clear cache when in development, and only enable it in production?
Thanks

@dodalovicgran
Copy link

same issue here

@vthg2themax
Copy link
Collaborator

I don't normally use a windows box for development, so I had to setup a virtual machine for this with Windows 11 Pro 64 bit to test if I can reproduce. I was unable to reproduce, but with 2 reports, I am willing to look into this further. Can you share a sample bit of code, or project with a minimum amount needed to build, that I can replicate this behavior? @rhacker @dodalovicgran

@0xqd
Copy link
Author

0xqd commented Aug 26, 2023

@vthg2themax i think it's the normal behavior of the lib when we use template once. the pre-rendered template is in an out folder of compiler. what i ask is if there is any other way that only enable this default behavior only in production ( through env var )

@aalowlevel
Copy link

aalowlevel commented Sep 8, 2023

Any progress on this problem? This keeps me from upgrading from ~0.7.0

@vthg2themax
Copy link
Collaborator

@rhacker @aalowlevel Does this change help out any?

@0xqd
Copy link
Author

0xqd commented Oct 11, 2023

@vthg2themax thanks for the update, I will check the latest update to see if it works in my case.

@0xqd
Copy link
Author

0xqd commented Oct 17, 2023

@vthg2themax I didn't have time to go through the changes, however, the new merge, the compiler breaks some working parts in my application. I will need time to go through the change in the compiler to see what's wrong.

@vthg2themax
Copy link
Collaborator

@rhacker Thank you very much for looking into this! I tested it with my site first, (which to be fair isn't very complicated), and it didn't seem to cause an issue, so if you have any pointers for it, I'd very much appreciate any information you would be willing to share.

@aalowlevel
Copy link

@vthg2themax @rhacker

error: proc-macro derive panicked --> {..} | 6 | #[derive(TemplateOnce, Clone, Default, Debug)] | ^^^^^^^^^^^^ | = help: message: Lock file "{..}\\target\\debug\\build\\sailfish-compiler-fb8e9dce29b49683\\out\\templates\\{..}.lock" is stuck. Try deleting it.

@nwtnni
Copy link
Contributor

nwtnni commented Oct 25, 2023

I can also help debug if we can get some more information about what broke.

@aalowlevel, do you get the same error after deleting the lock file and/or after running cargo clean?

@aalowlevel
Copy link

@nwtnni No.

@PaulDotSH
Copy link
Contributor

PaulDotSH commented Dec 28, 2023

It is working fine on linux on 0.8.3

@PaulDotSH
Copy link
Contributor

It is working fine on linux on 0.8.3

I just got this same problem randomly, I couldn't reproduce it though, if anyone finds reproduction steps I would be open for a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants