Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 7390

Changelist Validation throws error when referencing engine content

$
0
0

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Unreal Revision Control

Summary

When using in-editor source control for perforce validating a changelist with an asset referencing engine content will throw an error like the following:

/Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial is referenced and must also be added to revision control ‘E:/projects/myProject/Engine/Content/EngineMaterials/WorldGridMaterial.uasset’
/Game/ChildMaterial Validating asset
/Game/ChildMaterial contains valid data.
Data validation SUCCEEDED.
Files Checked: 1, Passed: 1, Failed: 0, Skipped: 0, Unable to validate: 0

This seems to happen when ANY asset references engine content in any way.
Engine/Content is ignored on our project and not usually checked into source control.

Steps to Reproduce

  1. Enable perforce source control with a source engine. It’s possible this will also occur with a launcher version of the engine but have only tested with perforce depot with UGS and perforce depot with external source engine.
  2. Create a child material instance from Engine/Content/EngineMaterials/WorldGridMaterial named WorldGridManager_Instance. Save the asset.
  3. Open revision control and add the material instance to the default changelist. Tools > ViewChanges
  4. Right click the changelist >

Expected Result

Validation should succeed with the following console output.

Display LogContentValidation Validating asset /Game/WorldGridMaterial_Instance.WorldGridMaterial_Instance
Log AssetCheck /Game/WorldGridMaterial_Instance Validating asset
Log AssetCheck /Game/WorldGridMaterial_Instance contains valid data.
Log AssetCheck Data validation SUCCEEDED.

Observed Result

Changelists that reference engine content or other unversioned directories fail validation preventing submission when using in-engine source control.

Platform(s)

Windows

Additional Notes

We have an temporary engine fix to stop this error occuring for our designers.
At DataValidationChangelist.cpp line 161 we have changed:
else if (ExternalDependencyFileState->CanAdd())
to
else if (ExternalDependencyFileState->CanAdd() && !FPaths::IsUnderDirectory(ExternalDependencyFileState->GetFilename(), FPaths::EngineDir()))

This is just fixing the symptoms of the error - which is that the status of the file is set to EPerforceState::NotInDepot instead of EPerforceState::Ignored which is correct. The reason that NotInDepot is being set to the status is because it is because fstat is contains “no such file(s)” and the ignore status of the directory is not being checked. There needs to be more nuanced logic to properly set the p4 status. NotInDepot will result in FPerforceSourceControlState::CanAdd returning true incorrectly. This file is ignored so it should return false ideally.

This is what fstat returns when you run the command from the commandline (Expected):

p4 fstat E:/projects/myProject/Engine/Content/EngineMaterials/WorldGridMaterial.uasset
E:/projects/myProject/Engine/Content/EngineMaterials/WorldGridMaterial.uasset - no such file(s).

The result of the fstat command is being used to set the status to EPerforceState::NotInDepot on PerforceSourceControlOperations.cpp line 1501.
The command itself is being run earlier and the error messages are cached at PerforceConnection.cpp line 1153. (The error appears to be expected behavior for fstat)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 7390

Trending Articles