Skip to content

Commit fed2fec

Browse files
Merge pull request #6655 from jacinta-stacks/merge-aac-client-breaking-into-develop
Merge aac client breaking into develop
2 parents 70a97a3 + 3389471 commit fed2fec

File tree

152 files changed

+4941
-4132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+4941
-4132
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,10 @@ impl<'a, 'b> ReadOnlyChecker<'a, 'b> {
498498
///
499499
/// # Errors
500500
///
501-
/// - Returns CheckErrors::WriteAttemptedInReadOnly if there is a read-only
501+
/// - Returns CheckErrorKind::WriteAttemptedInReadOnly if there is a read-only
502502
/// violation, i.e. if some function marked read-only attempts to modify
503503
/// the chainstate.
504-
pub fn run(&mut self, contract_analysis: &ContractAnalysis) -> Result<(), CheckError>
504+
pub fn run(&mut self, contract_analysis: &ContractAnalysis) -> Result<(), StaticCheckError>
505505
```
506506

507507
This comment is considered positive because it explains the contract of the function in pseudo-code. Someone who understands the constructs mentioned could, e.g., write a test for this method from this description.

clarity-types/src/errors/analysis.rs

Lines changed: 391 additions & 188 deletions
Large diffs are not rendered by default.

clarity-types/src/errors/ast.rs

Lines changed: 182 additions & 83 deletions
Large diffs are not rendered by default.

clarity-types/src/errors/mod.rs

Lines changed: 173 additions & 70 deletions
Large diffs are not rendered by default.

clarity-types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub mod representations;
3131
pub mod token;
3232
pub mod types;
3333

34-
pub use errors::Error;
34+
pub use errors::VmExecutionError;
3535
pub use representations::{ClarityName, ContractName};
3636
pub use types::Value;
3737

clarity-types/src/representations.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use regex::Regex;
2323
use stacks_common::codec::{Error as codec_error, StacksMessageCodec, read_next, write_next};
2424

2525
use crate::Value;
26-
use crate::errors::RuntimeErrorType;
26+
use crate::errors::RuntimeError;
2727
use crate::types::TraitIdentifier;
2828

2929
pub const CONTRACT_MIN_NAME_LENGTH: usize = 1;
@@ -66,17 +66,17 @@ guarded_string!(
6666
"ClarityName",
6767
CLARITY_NAME_REGEX,
6868
MAX_STRING_LEN,
69-
RuntimeErrorType,
70-
RuntimeErrorType::BadNameValue
69+
RuntimeError,
70+
RuntimeError::BadNameValue
7171
);
7272

7373
guarded_string!(
7474
ContractName,
7575
"ContractName",
7676
CONTRACT_NAME_REGEX,
7777
MAX_STRING_LEN,
78-
RuntimeErrorType,
79-
RuntimeErrorType::BadNameValue
78+
RuntimeError,
79+
RuntimeError::BadNameValue
8080
);
8181

8282
impl StacksMessageCodec for ClarityName {
@@ -623,14 +623,14 @@ impl SymbolicExpression {
623623
}
624624

625625
/// Encode this SymbolicExpression as a String suitable for logging an error (such as in
626-
/// CheckErrors). The `developer-mode` feature includes the `span`.
626+
/// CheckErrorKind). The `developer-mode` feature includes the `span`.
627627
#[cfg(feature = "developer-mode")]
628628
pub fn as_error_string(&self) -> String {
629629
format!("{} at {:?}", &self.expr, &self.span)
630630
}
631631

632632
/// Encode this SymbolicExpression as a String suitable for logging an error (such as in
633-
/// CheckErrors).
633+
/// CheckErrorKind).
634634
#[cfg(not(feature = "developer-mode"))]
635635
pub fn as_error_string(&self) -> String {
636636
format!("{}", &self.expr)

clarity-types/src/tests/representations.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use rstest::rstest;
1717

18-
use crate::errors::RuntimeErrorType;
18+
use crate::errors::RuntimeError;
1919
use crate::representations::{
2020
CONTRACT_MAX_NAME_LENGTH, CONTRACT_MIN_NAME_LENGTH, ClarityName, ContractName, MAX_STRING_LEN,
2121
};
@@ -73,7 +73,7 @@ fn test_clarity_name_invalid(#[case] name: &str) {
7373
assert!(result.is_err());
7474
assert!(matches!(
7575
result.unwrap_err(),
76-
RuntimeErrorType::BadNameValue(_, _)
76+
RuntimeError::BadNameValue(_, _)
7777
));
7878
}
7979

@@ -157,7 +157,7 @@ fn test_contract_name_invalid(#[case] name: &str) {
157157
assert!(result.is_err());
158158
assert!(matches!(
159159
result.unwrap_err(),
160-
RuntimeErrorType::BadNameValue(_, _)
160+
RuntimeError::BadNameValue(_, _)
161161
));
162162
}
163163

0 commit comments

Comments
 (0)