Skip to content

fix: Add empty folder to stop macro complaining#125

Closed
GeckoEidechse wants to merge 3 commits into
mainfrom
fix/add-empty-dist-folder
Closed

fix: Add empty folder to stop macro complaining#125
GeckoEidechse wants to merge 3 commits into
mainfrom
fix/add-empty-dist-folder

Conversation

@GeckoEidechse

@GeckoEidechse GeckoEidechse commented Jan 4, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Collaborator

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

image

@GeckoEidechse

Copy link
Copy Markdown
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
Copy Markdown
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

@Alystrasz Alystrasz marked this pull request as ready for review July 14, 2026 23:21
@Alystrasz

Copy link
Copy Markdown
Collaborator

Looks like there's no need to create this directory anymore:

image

@Alystrasz Alystrasz closed this Jul 14, 2026
@Alystrasz Alystrasz deleted the fix/add-empty-dist-folder branch July 14, 2026 23:22
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