gdharness 1.3.53 → 1.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -574,10 +574,21 @@ static func _import_staleness(resource_path: String, sidecar: ConfigFile) -> Dic
574
574
  if not sidecar.has_section_key("remap", "uid"):
575
575
  return _stale("its import file has no uid, which the import writes")
576
576
 
577
+ # A tool that writes a sidecar for the engine to import from leaves out what the import writes,
578
+ # and every load of the resource then fails. The engine's scan without its cache takes such a
579
+ # sidecar as imported while the record of the last import still matches the source.
580
+ var outputs: Array[String] = _outputs_of(sidecar)
581
+ if outputs.is_empty() and not _names_a_path(sidecar):
582
+ return _stale(
583
+ (
584
+ "its import file names no imported output, as one written before the engine "
585
+ + "imports from it does"
586
+ )
587
+ )
588
+
577
589
  # The sidecar alone does not say the import is there: deleting the outputs under
578
590
  # .godot/imported is the ordinary way to force one, and a resource whose output is gone was
579
591
  # answered as current, which is what a reimport is then skipped on.
580
- var outputs: Array[String] = _outputs_of(sidecar)
581
592
  var missing: Array[String] = []
582
593
  for output: String in outputs:
583
594
  if not FileAccess.file_exists(output):
@@ -786,6 +797,17 @@ static func _outputs_of(sidecar: ConfigFile) -> Array[String]:
786
797
  return outputs
787
798
 
788
799
 
800
+ ## Whether [param sidecar]'s remap names where a load finds the import, as [code]path[/code] or a
801
+ ## [code]path.<feature>[/code] key.
802
+ static func _names_a_path(sidecar: ConfigFile) -> bool:
803
+ if not sidecar.has_section("remap"):
804
+ return false
805
+ for key: String in sidecar.get_section_keys("remap"):
806
+ if key.begins_with("path"):
807
+ return true
808
+ return false
809
+
810
+
789
811
  ## The image files a glTF scene refers to by path, resolved against the scene's own directory.
790
812
  ## Embedded images and every other scene format answer nothing.
791
813
  static func _images_of(scene_path: String) -> Array[String]: