1use std::path::{Path, PathBuf};
8
9use serde::{Deserialize, Serialize};
10
11use super::InapplicableReason;
12use crate::compat::arg_shape::ArgShape;
13use crate::model::names::{
14 ApplicationName, Arity, CommitSha, FieldName, FunctionName, GitRef, MacroName, MapKey,
15 ModuleName, ProjectName, RecordName, RelativePath, SchemaFeature, TagName, TypeName,
16 vocabulary,
17};
18use crate::model::resolver_coverage::ResolverClass;
19use crate::model::symbol::SymbolRef;
20
21#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
22#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
23#[serde(tag = "verdict", rename_all = "snake_case")]
24pub enum Verdict {
25 Compatible,
26 RequiresAdaptation { reasons: Vec<Reason> },
27 Incompatible { reasons: Vec<Reason> },
28 Inapplicable { reason: InapplicableReason },
29}
30
31impl Verdict {
32 pub fn from_reasons(reasons: Vec<Reason>) -> Self {
33 if reasons.is_empty() {
34 return Self::Compatible;
35 }
36 if reasons.iter().any(Reason::is_blocking) {
37 Self::Incompatible { reasons }
38 } else {
39 Self::RequiresAdaptation { reasons }
40 }
41 }
42
43 pub fn is_compatible(&self) -> bool {
44 matches!(self, Self::Compatible)
45 }
46
47 pub fn reasons(&self) -> &[Reason] {
48 match self {
49 Self::Compatible | Self::Inapplicable { .. } => &[],
50 Self::RequiresAdaptation { reasons } | Self::Incompatible { reasons } => reasons,
51 }
52 }
53}
54
55#[non_exhaustive]
56#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
57#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
58#[serde(tag = "kind", rename_all = "snake_case")]
59pub enum Reason {
60 MissingSymbol {
61 symbol: SymbolRef,
62 first_seen_at_tag: Option<TagName>,
66 #[serde(default, skip_serializing_if = "Option::is_none")]
67 needs_pin_at_least: Option<NeedsPin>,
68 suggested_replacement: Option<SymbolRef>,
69 },
70 ArityChanged {
71 module: ModuleName,
72 function: FunctionName,
73 expected: Arity,
74 found: Vec<Arity>,
75 #[serde(default, skip_serializing_if = "Option::is_none")]
79 expected_available_at: Option<TagName>,
80 #[serde(default, skip_serializing_if = "Option::is_none")]
81 needs_pin_at_least: Option<NeedsPin>,
82 },
83 SignatureChanged {
84 module: ModuleName,
85 function: FunctionName,
86 arity: Arity,
87 expected_spec: String,
88 found_spec: String,
89 },
90 FileAbsent {
91 path: PathBuf,
92 },
93 ContextDrift {
94 path: PathBuf,
95 hunk_index: usize,
96 },
97 PreimageDrifted {
103 path: PathBuf,
104 hunk_index: usize,
105 line_delta: isize,
106 },
107 PostimageCollision {
113 path: PathBuf,
114 hunk_index: usize,
115 },
116 PreimageMissing {
121 path: PathBuf,
122 hunk_index: usize,
123 preimage_excerpt: String,
124 },
125 DeprecatedUsage {
126 symbol: SymbolRef,
127 since: Option<TagName>,
128 replacement: Option<SymbolRef>,
129 },
130 NowHidden {
131 module: ModuleName,
132 },
133 RecordFieldsChanged {
134 record: RecordName,
135 expected: Vec<FieldName>,
136 found: Vec<FieldName>,
137 },
138 UnsupportedFileType {
139 path: PathBuf,
140 },
141 UntrackedModuleMissing {
142 module: ModuleName,
143 },
144 ClauseMismatch {
149 module: ModuleName,
150 function: FunctionName,
151 arity: Arity,
152 call_args: Vec<ArgShape>,
153 pin_clauses: Vec<Vec<ArgShape>>,
154 },
155 MissingPrereq {
159 symbol: SymbolRef,
160 self_branch: GitRef,
161 suggested_source_for_prereq: Option<CommitSha>,
162 },
163 SyntacticArtifact {
166 path: PathBuf,
167 line: usize,
168 artifact: ArtifactKind,
169 },
170 BehaviourCallbackSignatureChanged {
172 behaviour: ModuleName,
173 callback: FunctionName,
174 arity: Arity,
175 expected_after_patch: String,
176 implementer: ModuleName,
177 implementer_signature: String,
178 },
179 BehaviourCallbackRemoved {
181 behaviour: ModuleName,
182 callback: FunctionName,
183 arity: Arity,
184 implementer: ModuleName,
185 },
186 BehaviourCallbackAdded {
188 behaviour: ModuleName,
189 callback: FunctionName,
190 arity: Arity,
191 implementer: ModuleName,
192 },
193 ModuleRelocated {
195 module: ModuleName,
196 patch_path: PathBuf,
197 },
198 WireConstantChanged {
200 module: ModuleName,
201 macro_name: String,
202 before: String,
203 after: String,
204 },
205 HistoricalImplementationMissing {
207 module: ModuleName,
208 advertised_version_before: u32,
209 advertised_version_after: u32,
210 expected_historical_module: ModuleName,
211 },
212 WireContractBodyDrift {
214 module: ModuleName,
215 functions: Vec<FunctionName>,
216 advertised_version: u32,
217 },
218 WireContractRegression {
220 module: ModuleName,
221 pin_version: u32,
222 patch_version: u32,
223 },
224 ReturnShapeMismatch {
226 module: ModuleName,
227 function: FunctionName,
228 arity: Arity,
229 source_signature: String,
230 pin_signature: String,
231 },
232 MissingType {
237 module: ModuleName,
238 name: TypeName,
239 arity: Arity,
240 },
241 PathRename {
246 source_path: PathBuf,
247 target_path: PathBuf,
248 translation: TranslationSource,
249 },
250 TargetPathAbsent {
255 path: RelativePath,
256 },
257 TestModuleSymbolMissing {
270 suite_path: RelativePath,
271 missing_module: ModuleName,
272 call_sites: Vec<TestCallSite>,
273 },
274 BehaviourModuleMissing {
281 source_path: RelativePath,
282 behaviour: ModuleName,
283 },
284 HeaderFileMissing {
291 source_path: RelativePath,
292 include_directive: IncludeDirective,
293 attempted_paths: Vec<RelativePath>,
294 },
295 MacroUndefinedOnTarget {
301 source_path: RelativePath,
302 macro_name: String,
303 line: u32,
304 },
305 RecordUndefinedOnTarget {
310 source_path: RelativePath,
311 record_name: RecordName,
312 line: u32,
313 },
314 LocalCallUndefinedOnTarget {
319 source_path: RelativePath,
320 function: FunctionName,
321 arity: Arity,
322 line: u32,
323 },
324 QualifiedCallUndefinedOnTarget {
333 source_path: RelativePath,
334 module: ModuleName,
335 function: FunctionName,
336 arity: Arity,
337 line: u32,
338 },
339 QualifiedCallReturnShapeDrift {
347 source_path: RelativePath,
348 module: ModuleName,
349 function: FunctionName,
350 arity: Arity,
351 source_signature: String,
352 target_signature: String,
353 line: u32,
354 },
355 LocalCallReturnShapeDrift {
361 source_path: RelativePath,
362 function: FunctionName,
363 arity: Arity,
364 source_signature: String,
365 target_signature: String,
366 line: u32,
367 },
368 MacroValueDrift {
373 source_path: RelativePath,
374 macro_name: String,
375 source_value: String,
376 target_value: String,
377 line: u32,
378 },
379 BehaviourCallbackAddedOnTarget {
385 source_path: RelativePath,
386 behaviour: ModuleName,
387 callback: FunctionName,
388 arity: Arity,
389 line: u32,
390 },
391 BehaviourCallbackDriftOnTarget {
397 source_path: RelativePath,
398 behaviour: ModuleName,
399 callback: FunctionName,
400 arity: Arity,
401 source_signature: String,
402 target_signature: String,
403 line: u32,
404 },
405 VersionedMachineSnapshotMissing {
409 module: ModuleName,
410 side: SnapshotSide,
411 },
412 WireConstantBindingsMissing {
416 module: ModuleName,
417 macros: Vec<MacroName>,
418 side: SnapshotSide,
419 },
420 IndirectCallUndefinedOnTarget {
427 source_path: RelativePath,
428 module: ModuleName,
429 function: FunctionName,
430 arity: Arity,
431 via: IndirectCallForm,
432 line: u32,
433 },
434 ExportedTypeUndefinedOnTarget {
442 source_path: RelativePath,
443 type_name: TypeName,
444 arity: Arity,
445 line: u32,
446 },
447 BehaviourCallbackUnknownOnPin {
453 behaviour: ModuleName,
454 callback: FunctionName,
455 arity: Arity,
456 pin_arities: Vec<Arity>,
457 implementer: ModuleName,
458 evidence: DriftEvidence,
459 },
460 BehaviourCallbackMissingOnPin {
464 behaviour: ModuleName,
465 callback: FunctionName,
466 arity: Arity,
467 implementer: ModuleName,
468 },
469 OptionKeyUnknownOnPin {
474 project: ProjectName,
475 module: ModuleName,
476 type_name: TypeName,
477 key: MapKey,
478 pin_tag: TagName,
479 },
480 SuiteNotRegisteredForCt {
485 suite_path: RelativePath,
486 makefile_path: RelativePath,
487 },
488 SchemaFeatureUnsupportedOnPin {
492 schema_path: RelativePath,
493 conf_key: Option<String>,
494 feature: SchemaFeature,
495 required_version: String,
496 pinned_version: String,
497 },
498 SchemaKeyReaderMissing {
503 schema_path: RelativePath,
504 target_key: String,
505 searched_apps: Vec<ApplicationName>,
506 absent_apps: Vec<ApplicationName>,
509 },
510}
511
512#[non_exhaustive]
516#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
517#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
518#[serde(rename_all = "snake_case")]
519pub enum DriftEvidence {
520 SourceSideSetDifference,
523 NameAnchored,
526}
527
528#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
530#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
531#[serde(rename_all = "snake_case")]
532pub enum SnapshotSide {
533 Source,
534 Target,
535 Both,
536}
537
538#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Serialize, Deserialize)]
542#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
543pub struct TestCallSite {
544 pub function: FunctionName,
545 pub arity: Arity,
546 pub line: u32,
547}
548
549#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
555#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
556#[serde(tag = "form", rename_all = "snake_case")]
557pub enum IncludeDirective {
558 Include { path: String },
559 IncludeLib { path: String },
560}
561
562impl IncludeDirective {
563 pub fn path(&self) -> &str {
564 match self {
565 Self::Include { path } | Self::IncludeLib { path } => path,
566 }
567 }
568}
569
570#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
571#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
572#[serde(tag = "kind", rename_all = "snake_case")]
573pub enum TranslationSource {
574 ConfigStanza { name: String },
575 ExternalFile { path: PathBuf, name: String },
576}
577
578#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
579#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
580#[serde(tag = "artifact_kind", rename_all = "snake_case")]
581pub enum ArtifactKind {
582 ConflictMarker { marker: ConflictMarker },
585 ExportWithoutBody {
588 module: ModuleName,
589 function: FunctionName,
590 arity: Arity,
591 },
592}
593
594#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
595#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
596#[serde(rename_all = "snake_case")]
597pub enum ConflictMarker {
598 Ours,
600 Divider,
602 Theirs,
604 Ancestor,
606}
607
608impl ConflictMarker {
609 pub fn detect(line: &str) -> Option<Self> {
616 Self::detect_with_marker(line, '<', Self::Ours)
617 .or_else(|| Self::detect_with_marker(line, '=', Self::Divider))
618 .or_else(|| Self::detect_with_marker(line, '>', Self::Theirs))
619 .or_else(|| Self::detect_with_marker(line, '|', Self::Ancestor))
620 }
621
622 fn detect_with_marker(line: &str, token: char, marker: Self) -> Option<Self> {
623 const MIN_RUN: usize = 7;
624 let mut count = 0usize;
625 for c in line.chars() {
626 if c == token {
627 count += 1;
628 continue;
629 }
630 return if count >= MIN_RUN && (c == ' ' || c == '\t') {
631 Some(marker)
632 } else {
633 None
634 };
635 }
636 if count >= MIN_RUN { Some(marker) } else { None }
637 }
638}
639
640vocabulary!(
641 #[derive(PartialOrd, Ord)]
645 pub enum ApplyConflictKind: "apply conflict kind" {
646 PostimageCollision => "postimage_collision",
647 PreimageMissing => "preimage_missing",
648 FileAbsent => "file_absent",
649 }
650);
651
652#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
656#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
657#[serde(rename_all = "snake_case")]
658pub enum IndirectCallForm {
659 MeckExpect,
660 RpcCall,
661 ErpcCall,
662 CtBrokerHelperRpc,
663 RabbitMiscRpcCall,
664}
665
666impl IndirectCallForm {
667 #[must_use]
670 pub fn display_form(self) -> &'static str {
671 match self {
672 Self::MeckExpect => "meck:expect",
673 Self::RpcCall => "rpc:call",
674 Self::ErpcCall => "erpc:call",
675 Self::CtBrokerHelperRpc => "rabbit_ct_broker_helpers:rpc",
676 Self::RabbitMiscRpcCall => "rabbit_misc:rpc_call",
677 }
678 }
679}
680
681impl Reason {
682 pub fn apply_conflict(&self) -> Option<(&Path, ApplyConflictKind)> {
687 match self {
688 Self::PostimageCollision { path, .. } => {
689 Some((path, ApplyConflictKind::PostimageCollision))
690 }
691 Self::PreimageMissing { path, .. } => Some((path, ApplyConflictKind::PreimageMissing)),
692 Self::FileAbsent { path } => Some((path, ApplyConflictKind::FileAbsent)),
693 Self::MissingSymbol { .. }
694 | Self::ArityChanged { .. }
695 | Self::SignatureChanged { .. }
696 | Self::ContextDrift { .. }
697 | Self::PreimageDrifted { .. }
698 | Self::DeprecatedUsage { .. }
699 | Self::NowHidden { .. }
700 | Self::RecordFieldsChanged { .. }
701 | Self::UnsupportedFileType { .. }
702 | Self::UntrackedModuleMissing { .. }
703 | Self::ClauseMismatch { .. }
704 | Self::MissingPrereq { .. }
705 | Self::SyntacticArtifact { .. }
706 | Self::BehaviourCallbackSignatureChanged { .. }
707 | Self::BehaviourCallbackRemoved { .. }
708 | Self::BehaviourCallbackAdded { .. }
709 | Self::ModuleRelocated { .. }
710 | Self::WireConstantChanged { .. }
711 | Self::HistoricalImplementationMissing { .. }
712 | Self::WireContractBodyDrift { .. }
713 | Self::WireContractRegression { .. }
714 | Self::ReturnShapeMismatch { .. }
715 | Self::MissingType { .. }
716 | Self::PathRename { .. }
717 | Self::TargetPathAbsent { .. }
718 | Self::TestModuleSymbolMissing { .. }
719 | Self::BehaviourModuleMissing { .. }
720 | Self::HeaderFileMissing { .. }
721 | Self::MacroUndefinedOnTarget { .. }
722 | Self::RecordUndefinedOnTarget { .. }
723 | Self::LocalCallUndefinedOnTarget { .. }
724 | Self::ExportedTypeUndefinedOnTarget { .. }
725 | Self::QualifiedCallUndefinedOnTarget { .. }
726 | Self::IndirectCallUndefinedOnTarget { .. }
727 | Self::QualifiedCallReturnShapeDrift { .. }
728 | Self::LocalCallReturnShapeDrift { .. }
729 | Self::MacroValueDrift { .. }
730 | Self::BehaviourCallbackAddedOnTarget { .. }
731 | Self::BehaviourCallbackDriftOnTarget { .. }
732 | Self::VersionedMachineSnapshotMissing { .. }
733 | Self::WireConstantBindingsMissing { .. }
734 | Self::BehaviourCallbackUnknownOnPin { .. }
735 | Self::BehaviourCallbackMissingOnPin { .. }
736 | Self::OptionKeyUnknownOnPin { .. }
737 | Self::SuiteNotRegisteredForCt { .. }
738 | Self::SchemaFeatureUnsupportedOnPin { .. }
739 | Self::SchemaKeyReaderMissing { .. } => None,
740 }
741 }
742
743 pub fn resolver_class(&self) -> Option<ResolverClass> {
747 match self {
748 Self::MissingSymbol { symbol, .. } | Self::MissingPrereq { symbol, .. } => {
749 Some(ResolverClass::of_symbol_kind(&symbol.kind))
750 }
751 Self::MissingType { .. } => Some(ResolverClass::Type),
752 Self::MacroUndefinedOnTarget { .. } | Self::MacroValueDrift { .. } => {
753 Some(ResolverClass::Macro)
754 }
755 Self::RecordUndefinedOnTarget { .. } => Some(ResolverClass::Record),
756 Self::ExportedTypeUndefinedOnTarget { .. } => Some(ResolverClass::Type),
757 Self::LocalCallUndefinedOnTarget { .. } | Self::LocalCallReturnShapeDrift { .. } => {
758 Some(ResolverClass::LocalCall)
759 }
760 Self::QualifiedCallUndefinedOnTarget { .. }
761 | Self::QualifiedCallReturnShapeDrift { .. } => Some(ResolverClass::QualifiedCall),
762 Self::IndirectCallUndefinedOnTarget { .. } => Some(ResolverClass::IndirectCall),
763 Self::HeaderFileMissing { .. } => Some(ResolverClass::Include),
764 Self::BehaviourModuleMissing { .. }
765 | Self::BehaviourCallbackAddedOnTarget { .. }
766 | Self::BehaviourCallbackDriftOnTarget { .. } => Some(ResolverClass::Behaviour),
767 Self::ArityChanged { .. }
768 | Self::SignatureChanged { .. }
769 | Self::FileAbsent { .. }
770 | Self::ContextDrift { .. }
771 | Self::PreimageDrifted { .. }
772 | Self::PostimageCollision { .. }
773 | Self::PreimageMissing { .. }
774 | Self::DeprecatedUsage { .. }
775 | Self::NowHidden { .. }
776 | Self::RecordFieldsChanged { .. }
777 | Self::UnsupportedFileType { .. }
778 | Self::UntrackedModuleMissing { .. }
779 | Self::ClauseMismatch { .. }
780 | Self::SyntacticArtifact { .. }
781 | Self::BehaviourCallbackSignatureChanged { .. }
782 | Self::BehaviourCallbackRemoved { .. }
783 | Self::BehaviourCallbackAdded { .. }
784 | Self::ModuleRelocated { .. }
785 | Self::WireConstantChanged { .. }
786 | Self::HistoricalImplementationMissing { .. }
787 | Self::WireContractBodyDrift { .. }
788 | Self::WireContractRegression { .. }
789 | Self::ReturnShapeMismatch { .. }
790 | Self::PathRename { .. }
791 | Self::TargetPathAbsent { .. }
792 | Self::TestModuleSymbolMissing { .. }
793 | Self::VersionedMachineSnapshotMissing { .. }
794 | Self::WireConstantBindingsMissing { .. }
795 | Self::BehaviourCallbackUnknownOnPin { .. }
796 | Self::BehaviourCallbackMissingOnPin { .. }
797 | Self::OptionKeyUnknownOnPin { .. }
798 | Self::SuiteNotRegisteredForCt { .. }
799 | Self::SchemaFeatureUnsupportedOnPin { .. }
800 | Self::SchemaKeyReaderMissing { .. } => None,
801 }
802 }
803
804 pub fn is_blocking(&self) -> bool {
806 match self {
807 Self::MissingSymbol {
809 first_seen_at_tag: Some(_),
810 ..
811 } => false,
812 Self::ArityChanged {
813 expected_available_at: Some(_),
814 ..
815 } => false,
816 Self::MissingSymbol { .. }
817 | Self::ArityChanged { .. }
818 | Self::SignatureChanged { .. }
819 | Self::FileAbsent { .. }
820 | Self::RecordFieldsChanged { .. }
821 | Self::UntrackedModuleMissing { .. }
822 | Self::ClauseMismatch { .. }
823 | Self::MissingPrereq { .. }
824 | Self::SyntacticArtifact { .. }
825 | Self::BehaviourCallbackSignatureChanged { .. }
826 | Self::BehaviourCallbackRemoved { .. }
827 | Self::BehaviourCallbackAdded { .. }
828 | Self::WireConstantChanged { .. }
829 | Self::HistoricalImplementationMissing { .. }
830 | Self::WireContractRegression { .. }
831 | Self::ReturnShapeMismatch { .. }
832 | Self::BehaviourCallbackMissingOnPin { .. }
833 | Self::SchemaFeatureUnsupportedOnPin { .. } => true,
834 Self::NowHidden { .. }
836 | Self::ContextDrift { .. }
837 | Self::PreimageDrifted { .. }
838 | Self::PreimageMissing { .. }
839 | Self::PostimageCollision { .. }
840 | Self::DeprecatedUsage { .. }
841 | Self::UnsupportedFileType { .. }
842 | Self::ModuleRelocated { .. }
843 | Self::WireContractBodyDrift { .. }
844 | Self::MissingType { .. }
845 | Self::PathRename { .. }
846 | Self::TargetPathAbsent { .. }
847 | Self::TestModuleSymbolMissing { .. }
848 | Self::BehaviourModuleMissing { .. }
849 | Self::HeaderFileMissing { .. }
850 | Self::MacroUndefinedOnTarget { .. }
851 | Self::RecordUndefinedOnTarget { .. }
852 | Self::LocalCallUndefinedOnTarget { .. }
853 | Self::ExportedTypeUndefinedOnTarget { .. }
854 | Self::QualifiedCallUndefinedOnTarget { .. }
855 | Self::IndirectCallUndefinedOnTarget { .. }
856 | Self::QualifiedCallReturnShapeDrift { .. }
857 | Self::LocalCallReturnShapeDrift { .. }
858 | Self::MacroValueDrift { .. }
859 | Self::BehaviourCallbackAddedOnTarget { .. }
860 | Self::BehaviourCallbackDriftOnTarget { .. }
861 | Self::VersionedMachineSnapshotMissing { .. }
862 | Self::WireConstantBindingsMissing { .. }
863 | Self::BehaviourCallbackUnknownOnPin { .. }
864 | Self::OptionKeyUnknownOnPin { .. }
865 | Self::SuiteNotRegisteredForCt { .. }
866 | Self::SchemaKeyReaderMissing { .. } => false,
867 }
868 }
869
870 pub fn is_path_scoped(&self) -> bool {
875 match self {
876 Self::FileAbsent { .. }
877 | Self::ModuleRelocated { .. }
878 | Self::PreimageDrifted { .. }
879 | Self::PreimageMissing { .. }
880 | Self::PostimageCollision { .. }
881 | Self::ContextDrift { .. }
882 | Self::PathRename { .. }
883 | Self::TargetPathAbsent { .. }
884 | Self::UnsupportedFileType { .. }
885 | Self::SyntacticArtifact { .. } => true,
886 Self::MissingSymbol { .. }
887 | Self::ArityChanged { .. }
888 | Self::SignatureChanged { .. }
889 | Self::DeprecatedUsage { .. }
890 | Self::NowHidden { .. }
891 | Self::RecordFieldsChanged { .. }
892 | Self::UntrackedModuleMissing { .. }
893 | Self::ClauseMismatch { .. }
894 | Self::MissingPrereq { .. }
895 | Self::BehaviourCallbackSignatureChanged { .. }
896 | Self::BehaviourCallbackRemoved { .. }
897 | Self::BehaviourCallbackAdded { .. }
898 | Self::WireConstantChanged { .. }
899 | Self::HistoricalImplementationMissing { .. }
900 | Self::WireContractBodyDrift { .. }
901 | Self::WireContractRegression { .. }
902 | Self::ReturnShapeMismatch { .. }
903 | Self::MissingType { .. }
904 | Self::TestModuleSymbolMissing { .. }
905 | Self::BehaviourModuleMissing { .. }
906 | Self::HeaderFileMissing { .. }
907 | Self::MacroUndefinedOnTarget { .. }
908 | Self::RecordUndefinedOnTarget { .. }
909 | Self::LocalCallUndefinedOnTarget { .. }
910 | Self::ExportedTypeUndefinedOnTarget { .. }
911 | Self::QualifiedCallUndefinedOnTarget { .. }
912 | Self::IndirectCallUndefinedOnTarget { .. }
913 | Self::QualifiedCallReturnShapeDrift { .. }
914 | Self::LocalCallReturnShapeDrift { .. }
915 | Self::MacroValueDrift { .. }
916 | Self::BehaviourCallbackAddedOnTarget { .. }
917 | Self::BehaviourCallbackDriftOnTarget { .. }
918 | Self::VersionedMachineSnapshotMissing { .. }
919 | Self::WireConstantBindingsMissing { .. }
920 | Self::BehaviourCallbackUnknownOnPin { .. }
921 | Self::BehaviourCallbackMissingOnPin { .. }
922 | Self::OptionKeyUnknownOnPin { .. }
923 | Self::SuiteNotRegisteredForCt { .. }
924 | Self::SchemaFeatureUnsupportedOnPin { .. }
925 | Self::SchemaKeyReaderMissing { .. } => false,
926 }
927 }
928}
929
930#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
933#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
934pub struct NeedsPin {
935 pub project: ProjectName,
936 pub tag: TagName,
937}