#Default paths with remote modules

1 messages · Page 1 of 1 (latest)

buoyant wing
#

Hi guys,
are there special advices for default paths when it comes to implementing remote modules?
I tried to define a default path for a Dotnet remote module function like this:

   @function
    async def test(self,
                   source: Annotated[Directory, DefaultPath("/"), Ignore(["**/bin", "**/obj"]), Doc("Base directory")]) -> "Dotnet":
    (…)

The goal was to prevent module users from being forced to always set the source path, when most of the times it turns out to be ".".
But if I try to omit the argument, the source Directory appears to be the root directory of the module, not the one from the calling project.
Am I missing something?

shadow mirage
#

so for remote modules you specifically need to specify the --source argument

#

the other thing you can do is to create a contextual module and then call your remote module with the corresponding DefaultPath directive