Skip to content

fix: fix plugins/fs infinite loop on autoregen#1029

Merged
amrbashir merged 4 commits into
tauri-apps:v2from
otamam818:file-autogen-fix
Mar 6, 2024
Merged

fix: fix plugins/fs infinite loop on autoregen#1029
amrbashir merged 4 commits into
tauri-apps:v2from
otamam818:file-autogen-fix

Conversation

@otamam818
Copy link
Copy Markdown
Contributor

The auto-regen from plugins/fs/build.rs would keep generating on compile time. Upon check-up, it made more sense to just make sure it doesn't regenerate files redundantly, so I implemented a check to see if the files are redundant or not.

Please let me know if I missed something

@otamam818 otamam818 requested a review from a team as a code owner March 5, 2024 13:31
@FabianLars
Copy link
Copy Markdown
Member

Thanks for contributing!

To merge this we'll need a changefile similar to https://github.com/tauri-apps/plugins-workspace/blob/v2/.changes/fix-zbus-import.md

Also, the if statement is a bit incorrect. As it is, it won't write the file if it doesn't exist already.

@otamam818
Copy link
Copy Markdown
Contributor Author

Also, the if statement is a bit incorrect. As it is, it won't write the file if it doesn't exist already.

Thanks @FabianLars for pointing that out, I appreciate it. I see it now. Give me a moment, I'll update this PR and address that

To merge this we'll need a changefile similar to https://github.com/tauri-apps/plugins-workspace/blob/v2/.changes/fix-zbus-import.md

I'll also add a file to .changes called file-autogen-fix.md

Copy link
Copy Markdown
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the way we handle this on the tauri side

Comment thread plugins/fs/build.rs Outdated
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
@amrbashir amrbashir requested a review from lucasfernog March 6, 2024 17:23
@amrbashir amrbashir changed the title Fix plugins/fs infinite loop on autoregen fix: fix plugins/fs infinite loop on autoregen Mar 6, 2024
@amrbashir amrbashir merged commit 7358102 into tauri-apps:v2 Mar 6, 2024
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

Successfully merging this pull request may close these issues.

4 participants