mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-23 14:15:24 +00:00
Rename vfs -> memofs across the codebase
This commit is contained in:
18
Cargo.lock
generated
18
Cargo.lock
generated
@@ -922,6 +922,14 @@ dependencies = [
|
|||||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memofs"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.3.16"
|
version = "0.3.16"
|
||||||
@@ -1670,6 +1678,7 @@ dependencies = [
|
|||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memofs 0.1.0",
|
||||||
"notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"paste 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"paste 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -1691,7 +1700,6 @@ dependencies = [
|
|||||||
"termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"vfs 0.1.0",
|
|
||||||
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -2365,14 +2373,6 @@ name = "version_check"
|
|||||||
version = "0.9.1"
|
version = "0.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "vfs"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"crossbeam-channel 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "walkdir"
|
name = "walkdir"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ members = [
|
|||||||
"rojo-test",
|
"rojo-test",
|
||||||
"rojo-insta-ext",
|
"rojo-insta-ext",
|
||||||
"clibrojo",
|
"clibrojo",
|
||||||
"vfs",
|
"memofs",
|
||||||
]
|
]
|
||||||
|
|
||||||
default-members = [
|
default-members = [
|
||||||
".",
|
".",
|
||||||
"rojo-test",
|
"rojo-test",
|
||||||
"rojo-insta-ext",
|
"rojo-insta-ext",
|
||||||
"vfs",
|
"memofs",
|
||||||
]
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -82,7 +82,7 @@ structopt = "0.3.5"
|
|||||||
termcolor = "1.0.5"
|
termcolor = "1.0.5"
|
||||||
tokio = "0.1.22"
|
tokio = "0.1.22"
|
||||||
uuid = { version = "0.8.1", features = ["v4", "serde"] }
|
uuid = { version = "0.8.1", features = ["v4", "serde"] }
|
||||||
vfs = { path = "vfs" }
|
memofs = { path = "memofs" }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winreg = "0.6.2"
|
winreg = "0.6.2"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vfs"
|
name = "memofs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
homepage = "https://github.com/rojo-rbx/rojo/tree/master/vfs"
|
homepage = "https://github.com/rojo-rbx/rojo/tree/master/memofs"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
/*!
|
/*!
|
||||||
Implementation of a virtual filesystem with a configurable backend and file watching.
|
Implementation of a virtual filesystem with a configurable backend and file
|
||||||
|
watching.
|
||||||
|
|
||||||
memofs is currently an unstable minimum viable library. Its primary consumer is [Rojo](https://github.com/rojo-rbx/rojo), a build system for Roblox.
|
memofs is currently an unstable minimum viable library. Its primary consumer is
|
||||||
|
[Rojo](https://github.com/rojo-rbx/rojo), a build system for Roblox.
|
||||||
|
|
||||||
## Current Features
|
## Current Features
|
||||||
* API similar to `std::fs`
|
* API similar to `std::fs`
|
||||||
@@ -5,8 +5,8 @@ use std::{
|
|||||||
|
|
||||||
use crossbeam_channel::{select, Receiver, RecvError, Sender};
|
use crossbeam_channel::{select, Receiver, RecvError, Sender};
|
||||||
use jod_thread::JoinHandle;
|
use jod_thread::JoinHandle;
|
||||||
|
use memofs::{IoResultExt, Vfs, VfsEvent};
|
||||||
use rbx_dom_weak::{RbxId, RbxValue};
|
use rbx_dom_weak::{RbxId, RbxValue};
|
||||||
use vfs::{IoResultExt, Vfs, VfsEvent};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
message_queue::MessageQueue,
|
message_queue::MessageQueue,
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ use std::{
|
|||||||
io::{self, BufWriter, Write},
|
io::{self, BufWriter, Write},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use memofs::Vfs;
|
||||||
use snafu::{ResultExt, Snafu};
|
use snafu::{ResultExt, Snafu};
|
||||||
use tokio::runtime::Runtime;
|
use tokio::runtime::Runtime;
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
cli::BuildCommand, project::ProjectError, serve_session::ServeSession, snapshot::RojoTree,
|
cli::BuildCommand, project::ProjectError, serve_session::ServeSession, snapshot::RojoTree,
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ use std::{
|
|||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use memofs::Vfs;
|
||||||
use snafu::Snafu;
|
use snafu::Snafu;
|
||||||
use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor};
|
use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor};
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::{cli::ServeCommand, serve_session::ServeSession, web::LiveServer};
|
use crate::{cli::ServeCommand, serve_session::ServeSession, web::LiveServer};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
use memofs::Vfs;
|
||||||
use reqwest::header::{ACCEPT, CONTENT_TYPE, COOKIE, USER_AGENT};
|
use reqwest::header::{ACCEPT, CONTENT_TYPE, COOKIE, USER_AGENT};
|
||||||
use snafu::{ResultExt, Snafu};
|
use snafu::{ResultExt, Snafu};
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::{auth_cookie::get_auth_cookie, cli::UploadCommand, common_setup};
|
use crate::{auth_cookie::get_auth_cookie, cli::UploadCommand, common_setup};
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
use memofs::Vfs;
|
||||||
use rbx_dom_weak::RbxInstanceProperties;
|
use rbx_dom_weak::RbxInstanceProperties;
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
project::Project,
|
project::Project,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use crossbeam_channel::Sender;
|
use crossbeam_channel::Sender;
|
||||||
use vfs::Vfs;
|
use memofs::Vfs;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
change_processor::ChangeProcessor,
|
change_processor::ChangeProcessor,
|
||||||
@@ -190,9 +190,9 @@ mod serve_session {
|
|||||||
use std::{path::PathBuf, time::Duration};
|
use std::{path::PathBuf, time::Duration};
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
use memofs::{InMemoryFs, VfsEvent, VfsSnapshot};
|
||||||
use rojo_insta_ext::RedactionMap;
|
use rojo_insta_ext::RedactionMap;
|
||||||
use tokio::{runtime::Runtime, timer::Timeout};
|
use tokio::{runtime::Runtime, timer::Timeout};
|
||||||
use vfs::{InMemoryFs, VfsEvent, VfsSnapshot};
|
|
||||||
|
|
||||||
use crate::tree_view::view_tree;
|
use crate::tree_view::view_tree;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
use std::{collections::BTreeMap, path::Path};
|
use std::{collections::BTreeMap, path::Path};
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
use memofs::{IoResultExt, Vfs};
|
||||||
use rbx_dom_weak::RbxValue;
|
use rbx_dom_weak::RbxValue;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use vfs::{IoResultExt, Vfs};
|
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use vfs::{DirEntry, IoResultExt, Vfs};
|
use memofs::{DirEntry, IoResultExt, Vfs};
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ mod test {
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty_folder() {
|
fn empty_folder() {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
use std::{borrow::Cow, collections::HashMap, path::Path};
|
use std::{borrow::Cow, collections::HashMap, path::Path};
|
||||||
|
|
||||||
|
use memofs::Vfs;
|
||||||
use rbx_dom_weak::UnresolvedRbxValue;
|
use rbx_dom_weak::UnresolvedRbxValue;
|
||||||
use rbx_reflection::try_resolve_value;
|
use rbx_reflection::try_resolve_value;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ impl JsonModelCore {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_from_vfs() {
|
fn model_from_vfs() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{path::Path, str};
|
use std::{path::Path, str};
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
use memofs::{IoResultExt, Vfs};
|
||||||
use rbx_dom_weak::RbxValue;
|
use rbx_dom_weak::RbxValue;
|
||||||
use vfs::{IoResultExt, Vfs};
|
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ fn snapshot_init(
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn module_from_vfs() {
|
fn module_from_vfs() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use vfs::Vfs;
|
use memofs::Vfs;
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceSnapshot};
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ pub use self::error::*;
|
|||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use vfs::Vfs;
|
use memofs::Vfs;
|
||||||
|
|
||||||
use self::middleware::{SnapshotInstanceResult, SnapshotMiddleware};
|
use self::middleware::{SnapshotInstanceResult, SnapshotMiddleware};
|
||||||
use self::{
|
use self::{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{borrow::Cow, collections::HashMap, path::Path};
|
use std::{borrow::Cow, collections::HashMap, path::Path};
|
||||||
|
|
||||||
|
use memofs::{IoResultExt, Vfs};
|
||||||
use rbx_reflection::try_resolve_value;
|
use rbx_reflection::try_resolve_value;
|
||||||
use vfs::{IoResultExt, Vfs};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
project::{Project, ProjectNode},
|
project::{Project, ProjectNode},
|
||||||
@@ -211,7 +211,7 @@ mod test {
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn project_from_folder() {
|
fn project_from_folder() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use vfs::Vfs;
|
use memofs::Vfs;
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{collections::HashMap, path::Path};
|
use std::{collections::HashMap, path::Path};
|
||||||
|
|
||||||
|
use memofs::Vfs;
|
||||||
use rbx_dom_weak::{RbxInstanceProperties, RbxTree};
|
use rbx_dom_weak::{RbxInstanceProperties, RbxTree};
|
||||||
use vfs::Vfs;
|
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ impl SnapshotMiddleware for SnapshotRbxm {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn model_from_vfs() {
|
fn model_from_vfs() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use vfs::Vfs;
|
use memofs::Vfs;
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ impl SnapshotMiddleware for SnapshotRbxmx {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn plain_folder() {
|
fn plain_folder() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{path::Path, str};
|
use std::{path::Path, str};
|
||||||
|
|
||||||
use maplit::hashmap;
|
use maplit::hashmap;
|
||||||
|
use memofs::{IoResultExt, Vfs};
|
||||||
use rbx_dom_weak::RbxValue;
|
use rbx_dom_weak::RbxValue;
|
||||||
use vfs::{IoResultExt, Vfs};
|
|
||||||
|
|
||||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ impl SnapshotMiddleware for SnapshotTxt {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use vfs::{InMemoryFs, VfsSnapshot};
|
use memofs::{InMemoryFs, VfsSnapshot};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn instance_from_vfs() {
|
fn instance_from_vfs() {
|
||||||
|
|||||||
Reference in New Issue
Block a user