tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

Feat/configurations guide

Open lorenzolewis opened this issue 3 years ago • 10 comments

Helps get https://github.com/tauri-apps/tauri-docs/issues/252 closer to closing, still want to have a section that explains what each of the generated folders are outside of the guides

lorenzolewis avatar Jul 16 '22 13:07 lorenzolewis

🚀 Deployed on https://deploy-preview-776--tauri.netlify.app

github-actions[bot] avatar Jul 16 '22 14:07 github-actions[bot]

@FabianLars checking in if GitHub timed out for you again on this one

lorenzolewis avatar Jul 22 '22 15:07 lorenzolewis

shit, got nobody/nothing to blame for this time, just forgot it, sorryyy

FabianLars avatar Jul 22 '22 15:07 FabianLars

So, the technical stuff etc looks correct, i still think some sentences sound a little rough, but my english is too bad to really point it out x)

FabianLars avatar Jul 22 '22 15:07 FabianLars

@FabianLars I did some re-wording. lmk if there are any bits that stick out or are rough around the edges

lorenzolewis avatar Jul 23 '22 16:07 lorenzolewis

Updated the Tauri Config section to look like the below screenshot. @FabianLars let me know if something should be added for tauri-build feature flag.

Screenshot 2022-08-12 at 17 38 23

lorenzolewis avatar Aug 12 '22 16:08 lorenzolewis

Okay so it's a little weird. In theory it needs it because the cargo:rerun-if-changed lines are behind a flag check (and also if we want to be on the safer side with its dependency on tauri-utils which otherwise would rely on tauri enabling its feature). "In theory" because while normally these rerun thingies are needed to tell cargo when to rerun the build script, it seems to always rebuild it anyway. That sounds like a bug, and i think i saw an issue or PR about it too but can't seem to find it.

Anywayyy there's an even bigger bug because even tho it seems to rerun the build script every time, it doesn't actually apply the changes. Edit: Or is that an issue with the cli? What i tested was changing the app name and modifying the allowlist.

Btw, i tested this on the latest released versions, Can't try the git version right now. Also i only tested it on json5 rn (with and without the feature flag).

cc @lucasfernog

FabianLars avatar Aug 12 '22 17:08 FabianLars

Sorry i'm a bit lost, can you guys explain what's the issue?

lucasfernog avatar Aug 12 '22 20:08 lucasfernog

@lucasfernog

  1. documentation question: Do users need to add the config-json5 feature flag to tauri-build too, or is it enough on tauri? https://github.com/tauri-apps/tauri/blob/dev/core/tauri-build/src/lib.rs#L203 suggests that it is indeed needed. (even though the script re-runs on json5 changes if the flag is disabled)

  2. Bug: While you're in tauri dev mode, changes to the config file won't get applied unless you manually rerun tauri dev (even though the file watcher correctly triggers a rebuild). For example changing the allowlist doesn't update the feature flag in Cargo.toml without a manual restart. Edit: To clarify: it does try to rebuild automatically, but you get an issue about incorrect feature flags.

FabianLars avatar Aug 12 '22 20:08 FabianLars

For #1 ideally it should only be for one (either tauri or tauri-build) and only exist as a feature flag on one to avoid confusion I'd think. One less thing to have to double-check is synced up.

lorenzolewis avatar Aug 13 '22 12:08 lorenzolewis

I think we can make it required only on tauri. Need to check that though.

lucasfernog avatar Aug 14 '22 15:08 lucasfernog

@FabianLars can you file an issue for #2?

lucasfernog avatar Aug 14 '22 15:08 lucasfernog

Okay, if that's the direction we go then I think this is accurate once 1.1 is released, right? Any other feedback on it?

P.S., after this is merged I'm going to start working on separating out "concept"/"reference" type things like we were discussing on Discord before

lorenzolewis avatar Aug 14 '22 15:08 lorenzolewis