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.
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
Manganis: Add Flag To Disable Folder Optimization #3293
Manganis: Add Flag To Disable Folder Optimization #3293
Changes from 4 commits
48a9205
7d03603
b69dacf
99ed1ae
ec652e1
af0f430
66c4c70
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very unfortunate, but this struct was public and had no fields, meaning before this change it could be crafted and now it can't, meaning this technically doesn't follow semver.
We should have added a #[non_exhaustive] attribute on this strict.
To make this semver-safe we can add a new type that is non_exhaustive and use that as the FolderOptions going forward, marking the old one as deprecated. IE in the AssetOptions enum, we add a new variant that is something like "FolderLiteral" or something.
https://doc.rust-lang.org/cargo/reference/semver.html#struct-add-public-field-when-no-private
Take a look at our options if you can - we might be do something like converting FolderAssetOptions to PreservedFolder or something with a utility method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to avoid extra types and such and if this is only a temporary solution until 0.7, I'd be fine with it.
Originally the playground didn't need this PR but at one point, optimizations were enabled for the original asset/public folder breaking the workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making it temporary is fine or forcing an opt-in with a feature flag might also work.
That way in the playground you can directly import manganis-core in the dep tree and enable the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have gone with a new asset option type
PreservedFolderAssetOptions
. TheFolderAssetOptions
type has aninto_preserved()
method which converts it into the preserved type.Additionally, a trait
FolderAsset
has been created so thatcli-opt
can accept either asset options for a folder asset. All the temporary structs, methods, and traits are markeddoc_hidden
to discourage use.Let me know what you think.