mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 06:05:24 +00:00
Rewrite Project, remove SourceProject (#274)
* Rewrite project file to have relative paths and drop SourceProject * Redo project error types * Tidy up and document Project type * Strip out init command
This commit is contained in:
committed by
GitHub
parent
47c7f63d75
commit
1f7f2b22e7
@@ -110,16 +110,24 @@ impl Default for InstanceContext {
|
||||
#[derive(Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum InstigatingSource {
|
||||
Path(#[serde(serialize_with = "path_serializer::serialize_absolute")] PathBuf),
|
||||
ProjectNode(String, ProjectNode),
|
||||
ProjectNode(
|
||||
#[serde(serialize_with = "path_serializer::serialize_absolute")] PathBuf,
|
||||
String,
|
||||
ProjectNode,
|
||||
),
|
||||
}
|
||||
|
||||
impl fmt::Debug for InstigatingSource {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
InstigatingSource::Path(path) => write!(formatter, "Path({})", path.display()),
|
||||
InstigatingSource::ProjectNode(name, node) => {
|
||||
write!(formatter, "ProjectNode({}: {:?}", name, node)
|
||||
}
|
||||
InstigatingSource::ProjectNode(path, name, node) => write!(
|
||||
formatter,
|
||||
"ProjectNode({}: {:?}) from path {}",
|
||||
name,
|
||||
node,
|
||||
path.display()
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user