@@ -62,7 +62,6 @@ pub struct RequirementConfig {
6262#[ derive( Serialize , Deserialize , Debug , Clone ) ]
6363pub struct ContractConfig {
6464 pub path : String ,
65- pub depends_on : Vec < String > ,
6665 pub deployer : Option < String > ,
6766}
6867
@@ -77,8 +76,7 @@ impl ProjectManifest {
7776 let file = match File :: open ( path) {
7877 Ok ( path) => path,
7978 Err ( _e) => {
80- println ! ( "Error: unable to locate Clarinet.toml in current directory" ) ;
81- std:: process:: exit ( 1 ) ;
79+ return Err ( "unable to locate Clarinet.toml in current directory" . to_string ( ) ) ;
8280 }
8381 } ;
8482 let mut project_manifest_file_reader = BufReader :: new ( file) ;
@@ -91,12 +89,7 @@ impl ProjectManifest {
9189 match toml:: from_slice ( & project_manifest_file_buffer[ ..] ) {
9290 Ok ( s) => s,
9391 Err ( e) => {
94- println ! (
95- "{}: Clarinet.toml file malformatted.\n {:?}" ,
96- red!( "error" ) ,
97- e
98- ) ;
99- std:: process:: exit ( 1 ) ;
92+ return Err ( format ! ( "Clarinet.toml file malformatted {:?}" , e) ) ;
10093 }
10194 } ;
10295
@@ -127,11 +120,7 @@ impl ProjectManifest {
127120 let path = match PathBuf :: from_str ( path) {
128121 Ok ( path) => path,
129122 Err ( _e) => {
130- println ! (
131- "{}: Clarinet.toml file malformatted, the entry cache_dir is not a valid path" ,
132- red!( "error" )
133- ) ;
134- std:: process:: exit ( 1 ) ;
123+ return Err ( "setting cache_dir is not a valid path" . to_string ( ) ) ;
135124 }
136125 } ;
137126 if path. is_relative ( ) {
@@ -206,13 +195,10 @@ impl ProjectManifest {
206195 Some ( Value :: String ( path) ) => path. to_string ( ) ,
207196 _ => continue ,
208197 } ;
209- let depends_on = match contract_settings. get ( "depends_on" ) {
210- Some ( Value :: Array ( depends_on) ) => depends_on
211- . iter ( )
212- . map ( |v| v. as_str ( ) . unwrap ( ) . to_string ( ) )
213- . collect :: < Vec < String > > ( ) ,
214- _ => continue ,
215- } ;
198+ if contract_settings. get ( "depends_on" ) . is_some ( ) {
199+ // We could print a deprecation notice here if that code path
200+ // was not used by the LSP.
201+ }
216202 let deployer = match contract_settings. get ( "deployer" ) {
217203 Some ( Value :: String ( path) ) => Some ( path. to_string ( ) ) ,
218204 _ => None ,
@@ -221,7 +207,6 @@ impl ProjectManifest {
221207 contract_name. to_string ( ) ,
222208 ContractConfig {
223209 path,
224- depends_on,
225210 deployer,
226211 } ,
227212 ) ;
0 commit comments