Coder Social home page Coder Social logo

Comments (2)

radu-matei avatar radu-matei commented on June 20, 2024 1

The current implicit assumption is that the module source is 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)]
pub enum ApplicationOrigin {
/// 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.

from spin.

michelleN avatar michelleN commented on June 20, 2024

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

from spin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.