-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 cache thrashing with runtime manganis support + introduce cross-platform asset resolver #58
Draft
jkelleyrtp
wants to merge
17
commits into
main
Choose a base branch
from
jk/cfg-via-file
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkelleyrtp
changed the title
wip: configure manganis via a file
configure manganis via a file
Aug 3, 2024
jkelleyrtp
changed the title
configure manganis via a file
Fix cache thrashing with runtime manganis support + introduce cross-platform asset resolver
Aug 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes our duplicate builds, long rebuilds, and cache thrashing by watching a specific file instead of the MANGANIS_SUPPORT env.
Since RA doesn't pass that env var, we were constantly making the entire dioxus graph recompile. Instead, you now pass a file with the env MG_CONFIG_PATH, and then manganis will use that file as its
rerun-if-changed
.This is "sticky," so to unset it, you either modify that file (remove it...) or set MG_CONFIG_PATH_RESET to some value and then the build script will re-run.
I'm not a big fan of "sticky" settings but it's either this or setting the env in config.toml which occasionally does have issues and still leads to rebuilds.
Alternatively, instead of the terrible CLI I grafted onto a build script, we could simply have a deterministic place to watch, but that's hard to acquire since there's no great way of getting the target dir from a proc macro.
rust-lang/cargo#8710
The more I think about this the more I think we should be doing one of the below:
[env]
[env]
env vars (and documenting it this way...)<base>
element and only relative asset uri?Link
also, funny, next doesn't do basepaths for images https://nextjs.org/docs/app/api-reference/next-config-js/basePath#images but does it for links