You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spin up --app spin.toml must currently be run from the same directory as spin.toml, because a relative path for the component source is not handled properly:
Should we make it so that the path must be relative to the directory that the Spin.toml file lives? What happens if the user wants to specify absolutely path?
Right now I'm thinking.. if component source is a path, check if it is relative or not. Relative paths are relative to the directory where the Spin.toml file lives. If not relative, use absolute path given. How should a user denote they're supplying an absolute path? Should it be by using / at the beginning of the component source string? Should they specify the file URI scheme? https://en.wikipedia.org/wiki/File_URI_scheme
The current implicit assumption is that the module sourceis relative to spin.toml, and I think the newly introduced ApplicationOrigin structure in the configuration should help with this —
/// The location from which an application was loaded.
#[derive(Clone,Debug)]
pubenumApplicationOrigin{
/// The application was loaded from the specified file.
File(PathBuf),
}
I'd start with implicit relative vs. absolute path (i.e. "if it starts with /), and stay away of the file scheme for now. We could add it later if we think it's a use case we want to support.
spin up --app spin.toml
must currently be run from the same directory asspin.toml
, because a relative path for the componentsource
is not handled properly:spin/src/commands/up.rs
Lines 19 to 25 in 751cda3
The text was updated successfully, but these errors were encountered: