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

Make AssetAction::Ignore not copy assets to imported_assets #12605

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

BeastLe9enD
Copy link
Contributor

@BeastLe9enD BeastLe9enD commented Mar 20, 2024

Objective

Lets say I have the following .meta file:

(
    meta_format_version: "1.0",
    asset: Ignore,
)

When a file is inside the assets directory and processing is enabled, the processor will copy the file into imported_assets although it should be ignored and therefore not copied.

Solution

  • I added a simple check that does not copy the assets if the AssetAction is Ignore.

Migration Guide

  • The public ProcessResult enum now has a ProcessResult::Ignore variant that must be handled.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds labels Mar 20, 2024
@alice-i-cecile alice-i-cecile added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Mar 20, 2024
Copy link
Contributor

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

@BeastLe9enD
Copy link
Contributor Author

@alice-i-cecile is this migration guide ok?:D I don't know what else to write

@alice-i-cecile
Copy link
Member

Updated your PR description to amend the migration guide :) It's unlikely to be particularly useful to folks, but this adding enum variants is a semver breaking change in Rust.

@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 21, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 21, 2024
Merged via the queue into bevyengine:main with commit cc31449 Mar 21, 2024
31 checks passed
@BeastLe9enD BeastLe9enD mentioned this pull request Mar 22, 2024
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants