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

fix: Add empty folder to stop macro complaining #125

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GeckoEidechse
Copy link
Member

@GeckoEidechse GeckoEidechse commented Jan 4, 2023

A Tauri macro complains when the dist folder does not exist. Adding a .gitkeep means that cloning the repo, the folder will be created.

Talking about this macro error
image

Note that the macro error does not prevent compilation in any way. It's purely an annoyance thing :P

A Tauri macro complains when the dist folder does not exist.
Adding a `.gitkeep` means that cloning the repo, the folder will be
created.
@GeckoEidechse
Copy link
Member Author

Actually adding that .gitkeep does "not work" in the sense that it gets deleted when a build is triggered which will show up in the diff and might get added when someone commits.
So in other words, someone making changes, building a release (npx tauri build), and then adding all changes will delete the .gitkeep again in their commit.

@Alystrasz any other ideas how to get the folder to exist when cloning (or at least on running npx tauri dev)?

@Alystrasz
Copy link
Contributor

Is this issue still a problem?
I can't reproduce it on my side.

image

@GeckoEidechse
Copy link
Member Author

Is this issue still a problem?
I can't reproduce it on my side.

Yes. It's cause once you run npx tauri build just once or any other action that creates src-vue/dist, the folder exists and it no longer complains. This means you won't notice it unless you do a fresh clone or run it in e.g. CI where the environment is always fresh. In fact, I had to add special handling in CI for creating the folder first cause running cargo test also makes sure that macros do not panic ^^

@GeckoEidechse
Copy link
Member Author

Turns out it's not just the IDE complaining but actually gives an error on a complete fresh clone when only compiling Rust code first:

image

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.

2 participants