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

fix: Add assets cleanup target when calling dotnet clean, clarify ref out of sync issues #2629

Merged
merged 3 commits into from
Feb 15, 2025

Conversation

Eideren
Copy link
Collaborator

@Eideren Eideren commented Feb 5, 2025

PR Details

Content out of sync exception triggers when removing/adding a property to a custom asset, this change ensures users are aware of how to proceed when encountering this issue.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

Kindly pinging @Jklawreszuk to check this one as he is more experienced with the build system than I am

@Kryptos-FR Kryptos-FR self-requested a review February 5, 2025 18:50
namespace Stride.Core.Serialization;

public class ContentRefOutOfSyncException()
: InvalidOperationException("Serialization contentRef indices are out of sync, assets need to be rebuilt, clean your projects and rebuild");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for later: there are ways to localize exception messages. We should decide whether we want to do it, or not. It can be painful sometimes when errors are localized (in term of discovery), but it could also help users of languages we already support.

@@ -160,6 +160,11 @@
</Target>

<!-- Clean assets -->
<Target Name="StrideCleanAssetsOnClean" AfterTargets="Clean">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Prehabs simply "StrideCleanAssets" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was what I went with initially but there's already a target named StrideCleanAsset

@Eideren Eideren merged commit 2087a58 into stride3d:master Feb 15, 2025
3 checks passed
@Eideren Eideren deleted the contentref_ex branch February 15, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants