-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nargo): split
nargo
into core and cli packages (#1065)
* feat(nargo): perform initial split into core + cli * chore: split manifest errors from definition * chore: rename `nargo` to `nargo_cli` and `nargo_core` to `nargo` * chore: add comment for binary renaming
- Loading branch information
1 parent
fd3c99a
commit 7c388f9
Showing
221 changed files
with
300 additions
and
239 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use std::path::PathBuf; | ||
use thiserror::Error; | ||
|
||
/// Errors covering situations where a package is either missing or malformed. | ||
#[derive(Debug, Error)] | ||
pub enum InvalidPackageError { | ||
/// Package doesn't have a manifest file | ||
#[error("cannot find a Nargo.toml in {}", .0.display())] | ||
MissingManifestFile(PathBuf), | ||
|
||
/// Package manifest is unreadable. | ||
#[error("Nargo.toml is badly formed, could not parse.\n\n {0}")] | ||
MalformedManifestFile(#[from] toml::de::Error), | ||
|
||
/// Package does not contain Noir source files. | ||
#[error("cannot find src directory in path {}", .0.display())] | ||
NoSourceDir(PathBuf), | ||
|
||
/// Package has neither of `main.nr` and `lib.nr`. | ||
#[error("package must contain either a `lib.nr`(Library) or a `main.nr`(Binary).")] | ||
ContainsZeroCrates, | ||
|
||
/// Package has both a `main.nr` (for binaries) and `lib.nr` (for libraries) | ||
#[error("package cannot contain both a `lib.nr` and a `main.nr`")] | ||
ContainsMultipleCrates, | ||
} |
Oops, something went wrong.