Skip to content

Fix rojo plugin install by adding Vfs::exists#1169

Merged
Dekkonot merged 4 commits intorojo-rbx:masterfrom
kennethloeffler:fix-plugin-install
Nov 21, 2025
Merged

Fix rojo plugin install by adding Vfs::exists#1169
Dekkonot merged 4 commits intorojo-rbx:masterfrom
kennethloeffler:fix-plugin-install

Conversation

@kennethloeffler
Copy link
Copy Markdown
Member

@kennethloeffler kennethloeffler commented Nov 21, 2025

In #1159, we added a new helper function for loading a project file:

rojo/src/project.rs

Lines 291 to 307 in 2b47861

pub(crate) fn load_initial_project(vfs: &Vfs, path: &Path) -> Result<Self, ProjectError> {
if Self::is_project_file(path) {
Self::load_exact(vfs, path, None)
} else {
// Check for default projects.
for default_project_name in DEFAULT_PROJECT_NAMES {
let project_path = path.join(default_project_name);
if project_path.exists() {
return Self::load_exact(vfs, &project_path, None);
}
}
Err(Error::NoProjectFound {
path: path.to_path_buf(),
}
.into())
}
}

At line 298, we use Path::exists. This doesn't work at all when we're using the in memory file system, or in general, because the virtual file system need not have any correspondence to the host's file system. This causes the rojo plugin install command to always fail, because it uses the in memory file system to build the plugin RBXM.

This PR fixes this problem by adding a Vfs::exists method that is equivalent to std::fs::exists, and using it in load_initial_project. It also adds a smoke test to the plugin install command to ensure the plugin initializes correctly.

I also moved the create_dir and create_dir_all memofs changelog entry under the unreleased header, because that change has not made it into a memofs release yet, and we missed this during review.

@kennethloeffler kennethloeffler added the skip changelog PRs that may skip the changelog enforcement check label Nov 21, 2025
@Dekkonot Dekkonot merged commit 93e9c51 into rojo-rbx:master Nov 21, 2025
8 checks passed
@kennethloeffler kennethloeffler deleted the fix-plugin-install branch November 21, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog PRs that may skip the changelog enforcement check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants